Cartman366

Untitled

Aug 8th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.32 KB | None | 0 0
  1. Player=game:GetService("Players").LocalPlayer
  2. Character=Player.Character
  3. PlayerGui=Player.PlayerGui
  4. Backpack=Player.Backpack
  5. Torso=Character.Torso
  6. Head=Character.Head
  7. Humanoid=Character.Humanoid
  8. m=Instance.new('Model',Character)
  9. LeftArm=Character["Left Arm"]
  10. LeftLeg=Character["Left Leg"]
  11. RightArm=Character["Right Arm"]
  12. RightLeg=Character["Right Leg"]
  13. LS=Torso["Left Shoulder"]
  14. LH=Torso["Left Hip"]
  15. RS=Torso["Right Shoulder"]
  16. RH=Torso["Right Hip"]
  17. Face = Head.face
  18. Neck=Torso.Neck
  19. it=Instance.new
  20. attacktype=1
  21. vt=Vector3.new
  22. cf=CFrame.new
  23. euler=CFrame.fromEulerAnglesXYZ
  24. angles=CFrame.Angles
  25. cloaked=false
  26. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  27. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  28. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  29. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  30. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  31. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  32. RootPart=Character.HumanoidRootPart
  33. RootJoint=RootPart.RootJoint
  34. RootCF=euler(-1.57,0,3.14)
  35. attack = false
  36. attackdebounce = false
  37. deb=false
  38. equipped=true
  39. hand=false
  40. MMouse=nil
  41. combo=0
  42. mana=0
  43. trispeed=1
  44. pathtrans=.7
  45. attackmode='none'
  46. local idle=0
  47. local Anim="Idle"
  48. local Effects={}
  49. local gun=false
  50. local shoot=false
  51. player=nil
  52. cloak=false
  53. lightcolor='Bright blue'
  54.  
  55. mouse=Player:GetMouse()
  56. --save shoulders
  57. RSH, LSH=nil, nil
  58. --welds
  59. function NoOutline(Part)
  60. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  61. end
  62. player=Player
  63. ch=Character
  64.  
  65. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  66. local fp=it("Part")
  67. fp.formFactor=formfactor
  68. fp.Parent=parent
  69. fp.Reflectance=reflectance
  70. fp.Transparency=transparency
  71. fp.CanCollide=false
  72. fp.Locked=true
  73. fp.BrickColor=brickcolor
  74. fp.Name=name
  75. fp.Size=size
  76. fp.Position=Torso.Position
  77. NoOutline(fp)
  78. fp.Material="SmoothPlastic"
  79. fp:BreakJoints()
  80. return fp
  81. end
  82.  
  83. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  84. local mesh=it(Mesh)
  85. mesh.Parent=part
  86. if Mesh=="SpecialMesh" then
  87. mesh.MeshType=meshtype
  88. if meshid~="nil" then
  89. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  90. end
  91. end
  92. mesh.Offset=offset
  93. mesh.Scale=scale
  94. return mesh
  95. end
  96.  
  97. function weld(parent,part0,part1,c0)
  98. local weld=it("Weld")
  99. weld.Parent=parent
  100. weld.Part0=part0
  101. weld.Part1=part1
  102. weld.C0=c0
  103. return weld
  104. end
  105.  
  106. local Color1=Torso.BrickColor
  107.  
  108. local bodvel=Instance.new("BodyVelocity")
  109. local bg=Instance.new("BodyGyro")
  110.  
  111. function swait(num)
  112. if num==0 or num==nil then
  113. game:service'RunService'.Stepped:wait(0)
  114. else
  115. for i=0,num do
  116. game:service'RunService'.Stepped:wait(0)
  117. end
  118. end
  119. end
  120.  
  121.  
  122. so = function(id,par,vol,pit)
  123. coroutine.resume(coroutine.create(function()
  124. local sou = Instance.new("Sound",par or workspace)
  125. sou.Volume=vol
  126. sou.Pitch=pit or 1
  127. sou.SoundId=id
  128. swait()
  129. sou:play()
  130. game:GetService("Debris"):AddItem(sou,6)
  131. end))
  132. end
  133.  
  134. function clerp(a,b,t)
  135. local qa = {QuaternionFromCFrame(a)}
  136. local qb = {QuaternionFromCFrame(b)}
  137. local ax, ay, az = a.x, a.y, a.z
  138. local bx, by, bz = b.x, b.y, b.z
  139. local _t = 1-t
  140. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  141. end
  142.  
  143. function QuaternionFromCFrame(cf)
  144. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  145. local trace = m00 + m11 + m22
  146. if trace > 0 then
  147. local s = math.sqrt(1 + trace)
  148. local recip = 0.5/s
  149. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  150. else
  151. local i = 0
  152. if m11 > m00 then
  153. i = 1
  154. end
  155. if m22 > (i == 0 and m00 or m11) then
  156. i = 2
  157. end
  158. if i == 0 then
  159. local s = math.sqrt(m00-m11-m22+1)
  160. local recip = 0.5/s
  161. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  162. elseif i == 1 then
  163. local s = math.sqrt(m11-m22-m00+1)
  164. local recip = 0.5/s
  165. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  166. elseif i == 2 then
  167. local s = math.sqrt(m22-m00-m11+1)
  168. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  169. end
  170. end
  171. end
  172.  
  173. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  174. local xs, ys, zs = x + x, y + y, z + z
  175. local wx, wy, wz = w*xs, w*ys, w*zs
  176. local xx = x*xs
  177. local xy = x*ys
  178. local xz = x*zs
  179. local yy = y*ys
  180. local yz = y*zs
  181. local zz = z*zs
  182. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  183. end
  184.  
  185. function QuaternionSlerp(a, b, t)
  186. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  187. local startInterp, finishInterp;
  188. if cosTheta >= 0.0001 then
  189. if (1 - cosTheta) > 0.0001 then
  190. local theta = math.acos(cosTheta)
  191. local invSinTheta = 1/math.sin(theta)
  192. startInterp = math.sin((1-t)*theta)*invSinTheta
  193. finishInterp = math.sin(t*theta)*invSinTheta
  194. else
  195. startInterp = 1-t
  196. finishInterp = t
  197. end
  198. else
  199. if (1+cosTheta) > 0.0001 then
  200. local theta = math.acos(-cosTheta)
  201. local invSinTheta = 1/math.sin(theta)
  202. startInterp = math.sin((t-1)*theta)*invSinTheta
  203. finishInterp = math.sin(t*theta)*invSinTheta
  204. else
  205. startInterp = t-1
  206. finishInterp = t
  207. end
  208. end
  209. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  210. end
  211.  
  212. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  213. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  214. end
  215.  
  216. function SkullEffect(brickcolor,cframe,x1,y1,z1,delay)
  217. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  218. prt.Anchored=true
  219. prt.CFrame=cframe
  220. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
  221. --http://www.roblox.com/asset/?id=4770560
  222. game:GetService("Debris"):AddItem(prt,2)
  223. CF=prt.CFrame
  224. coroutine.resume(coroutine.create(function(Part,Mesh,TehCF)
  225. for i=0,1,0.2 do
  226. wait()
  227. Part.CFrame=CF*cf(0,0,-0.4)
  228. end
  229. for i=0,1,delay do
  230. wait()
  231. --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5)
  232. Mesh.Scale=Mesh.Scale
  233. end
  234. for i=0,1,0.1 do
  235. wait()
  236. Part.Transparency=i
  237. end
  238. Part.Parent=nil
  239. end),prt,msh,CF)
  240. end
  241.  
  242. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  243. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  244. prt.Anchored=true
  245. prt.CFrame=cframe
  246. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  247. game:GetService("Debris"):AddItem(prt,5)
  248. coroutine.resume(coroutine.create(function(Part,Mesh)
  249. for i=0,1,delay do
  250. wait()
  251. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  252. Part.Transparency=i
  253. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  254. end
  255. Part.Parent=nil
  256. end),prt,msh)
  257. end
  258.  
  259. function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  260. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  261. prt.Anchored=false
  262. prt.CFrame=cframe
  263. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  264. local wld=weld(prt,prt,Parent,cframe)
  265. game:GetService("Debris"):AddItem(prt,5)
  266. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  267. for i=0,1,delay do
  268. wait()
  269. Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe
  270. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  271. Part.Transparency=i
  272. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  273. end
  274. Part.Parent=nil
  275. end),prt,msh,wld)
  276. end
  277.  
  278. function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  279. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  280. prt.Anchored=false
  281. prt.CFrame=cframe
  282. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  283. local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0))
  284. game:GetService("Debris"):AddItem(prt,5)
  285. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  286. for i=0,1,delay do
  287. wait()
  288. Weld.C0=euler(i*20,0,0)
  289. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  290. Part.Transparency=i
  291. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  292. end
  293. Part.Parent=nil
  294. end),prt,msh,wld)
  295. end
  296.  
  297. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  298. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  299. prt.Anchored=true
  300. prt.CFrame=cframe
  301. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  302. game:GetService("Debris"):AddItem(prt,2)
  303. coroutine.resume(coroutine.create(function(Part,Mesh)
  304. for i=0,1,delay do
  305. wait()
  306. Part.CFrame=Part.CFrame
  307. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  308. local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  309. prt2.Anchored=true
  310. prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  311. local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  312. game:GetService("Debris"):AddItem(prt2,2)
  313. coroutine.resume(coroutine.create(function(Part,Mesh)
  314. for i=0,1,0.1 do
  315. wait()
  316. Part.CFrame=Part.CFrame*cf(0,0.5,0)
  317. end
  318. Part.Parent=nil
  319. end),prt2,msh2)
  320. end
  321. for i=0,1,delay*2 do
  322. wait()
  323. Part.CFrame=Part.CFrame
  324. Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i)
  325. end
  326. Part.Parent=nil
  327. end),prt,msh)
  328. end
  329.  
  330. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  331. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  332. prt.Anchored=true
  333. prt.CFrame=cframe
  334. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  335. game:GetService("Debris"):AddItem(prt,2)
  336. coroutine.resume(coroutine.create(function(Part,Mesh)
  337. for i=0,1,delay do
  338. wait()
  339. Part.CFrame=Part.CFrame
  340. Part.Transparency=i
  341. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  342. end
  343. Part.Parent=nil
  344. end),prt,msh)
  345. end
  346.  
  347. function MagicRing(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  348. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  349. prt.Anchored=true
  350. prt.CFrame=cframe*euler(x2,y2,z2)
  351. --"http://www.roblox.com/asset/?id=168892465"
  352. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  353. game:GetService("Debris"):AddItem(prt,2)
  354. coroutine.resume(coroutine.create(function(Part,Mesh)
  355. for i=0,1,0.03 do
  356. wait()
  357. Part.CFrame=Part.CFrame
  358. Part.Transparency=i
  359. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  360. end
  361. Part.Parent=nil
  362. end),prt,msh)
  363. end
  364.  
  365. function BreakEffect(brickcolor,cframe,x1,y1,z1)
  366. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  367. prt.Anchored=true
  368. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  369. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  370. game:GetService("Debris"):AddItem(prt,2)
  371. coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
  372. CF=Part.CFrame
  373. Numbb=0
  374. randnumb=math.random()/10
  375. rand1=math.random()/10
  376. for i=0,1,rand1 do
  377. wait()
  378. CF=CF*cf(0,math.random()/2,0)
  379. --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
  380. Part.CFrame=CF*euler(Numbb,0,0)
  381. Part.Transparency=i
  382. Numbb=Numbb+randnumb
  383. end
  384. Part.Parent=nil
  385. end),prt,CF,Numbb,randnumb)
  386. end
  387.  
  388. function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  389. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  390. prt.Anchored=true
  391. prt.CFrame=cframe
  392. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
  393. game:GetService("Debris"):AddItem(prt,5)
  394. coroutine.resume(coroutine.create(function(Part,Mesh)
  395. for i=0,1,delay do
  396. wait()
  397. Part.CFrame=Part.CFrame*euler(0,0.7,0)
  398. Part.Transparency=i
  399. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  400. end
  401. Part.Parent=nil
  402. end),prt,msh)
  403. end
  404.  
  405. function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  406. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  407. prt.Anchored=true
  408. prt.CFrame=cframe
  409. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  410. game:GetService("Debris"):AddItem(prt,2)
  411. coroutine.resume(coroutine.create(function(Part,Mesh)
  412. for i=0,1,delay do
  413. wait()
  414. Part.CFrame=Part.CFrame*cf(0,y3/2,0)
  415. Part.Transparency=i
  416. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  417. end
  418. Part.Parent=nil
  419. end),prt,msh)
  420. end
  421.  
  422. function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay)
  423. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  424. prt.Anchored=true
  425. prt.CFrame=cframe*cf(x,y,z)
  426. msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1))
  427. game:GetService("Debris"):AddItem(prt,5)
  428. coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee)
  429. local num=math.random()
  430. local num2=math.random(-3,2)+math.random()
  431. local numm=0
  432. for i=0,1,delay*2 do
  433. swait()
  434. Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0)
  435. Part.Transparency=i
  436. numm=numm+0.01
  437. end
  438. Part.Parent=nil
  439. Mesh.Parent=nil
  440. end),prt,msh,x,y,z)
  441. end
  442.  
  443. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  444. if hit.Parent==nil then
  445. return
  446. end
  447. h=hit.Parent:FindFirstChild("Humanoid")
  448. for _,v in pairs(hit.Parent:children()) do
  449. if v:IsA("Humanoid") then
  450. h=v
  451. end
  452. end
  453. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  454. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  455. end
  456. if hit.Parent.className=="Hat" then
  457. hit=hit.Parent.Parent:findFirstChild("Head")
  458. end
  459. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  460. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  461. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  462. return
  463. end]]
  464. -- hs(hit,1.2)
  465. c=Instance.new("ObjectValue")
  466. c.Name="creator"
  467. c.Value=game:service("Players").LocalPlayer
  468. c.Parent=h
  469. game:GetService("Debris"):AddItem(c,.5)
  470. Damage=math.random(minim,maxim)
  471. -- h:TakeDamage(Damage)
  472. blocked=false
  473. block=hit.Parent:findFirstChild("Block")
  474. if block~=nil then
  475. print(block.className)
  476. if block.className=="NumberValue" then
  477. if block.Value>0 then
  478. blocked=true
  479. if decreaseblock==nil then
  480. block.Value=block.Value-1
  481. end
  482. end
  483. end
  484. if block.className=="IntValue" then
  485. if block.Value>0 then
  486. blocked=true
  487. if decreaseblock~=nil then
  488. block.Value=block.Value-1
  489. end
  490. end
  491. end
  492. end
  493. if blocked==false then
  494. -- h:TakeDamage(Damage)
  495. h.Health=h.Health-Damage
  496. showDamage(hit.Parent,Damage,.5,BrickColor.new("Navy blue"))
  497. else
  498. h.Health=h.Health-(Damage/2)
  499. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  500. end
  501. if Type=="Knockdown" then
  502. hum=hit.Parent.Humanoid
  503. hum.PlatformStand=true
  504. coroutine.resume(coroutine.create(function(HHumanoid)
  505. swait(1)
  506. HHumanoid.PlatformStand=false
  507. end),hum)
  508. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  509. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  510. local bodvol=Instance.new("BodyVelocity")
  511. bodvol.velocity=angle*knockback
  512. bodvol.P=5000
  513. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  514. bodvol.Parent=hit
  515. rl=Instance.new("BodyAngularVelocity")
  516. rl.P=3000
  517. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  518. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  519. rl.Parent=hit
  520. game:GetService("Debris"):AddItem(bodvol,.5)
  521. game:GetService("Debris"):AddItem(rl,.5)
  522. elseif Type=="Normal" then
  523. vp=Instance.new("BodyVelocity")
  524. vp.P=500
  525. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  526. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  527. if KnockbackType==1 then
  528. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  529. elseif KnockbackType==2 then
  530. vp.velocity=Property.CFrame.lookVector*knockback
  531. end
  532. if knockback>0 then
  533. vp.Parent=hit.Parent.Torso
  534. end
  535. game:GetService("Debris"):AddItem(vp,.5)
  536. elseif Type=="Up" then
  537. local bodyVelocity=Instance.new("BodyVelocity")
  538. bodyVelocity.velocity=vt(0,60,0)
  539. bodyVelocity.P=5000
  540. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  541. bodyVelocity.Parent=hit
  542. game:GetService("Debris"):AddItem(bodyVelocity,1)
  543. rl=Instance.new("BodyAngularVelocity")
  544. rl.P=3000
  545. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  546. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  547. rl.Parent=hit
  548. game:GetService("Debris"):AddItem(rl,.5)
  549. elseif Type=="Snare" then
  550. bp=Instance.new("BodyPosition")
  551. bp.P=2000
  552. bp.D=100
  553. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  554. bp.position=hit.Parent.Torso.Position
  555. bp.Parent=hit.Parent.Torso
  556. game:GetService("Debris"):AddItem(bp,1)
  557. elseif Type=="Target" then
  558. if Targetting==false then
  559. ZTarget=hit.Parent.Torso
  560. coroutine.resume(coroutine.create(function(Part)
  561. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  562. swait(5)
  563. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  564. end),ZTarget)
  565. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  566. targetgui=Instance.new("BillboardGui")
  567. targetgui.Parent=ZTarget
  568. targetgui.Size=UDim2.new(10,100,10,100)
  569. targ=Instance.new("ImageLabel")
  570. targ.Parent=targetgui
  571. targ.BackgroundTransparency=1
  572. targ.Image="rbxassetid://4834067"
  573. targ.Size=UDim2.new(1,0,1,0)
  574. cam.CameraType="Scriptable"
  575. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  576. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  577. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  578. Targetting=true
  579. RocketTarget=ZTarget
  580. for i=1,Property do
  581. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  582. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  583. swait()
  584. end
  585. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  586. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  587. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  588. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  589. end
  590. Targetting=false
  591. RocketTarget=nil
  592. targetgui.Parent=nil
  593. cam.CameraType="Custom"
  594. end
  595. end
  596. debounce=Instance.new("BoolValue")
  597. debounce.Name="DebounceHit"
  598. debounce.Parent=hit.Parent
  599. debounce.Value=true
  600. game:GetService("Debris"):AddItem(debounce,Delay)
  601. c=Instance.new("ObjectValue")
  602. c.Name="creator"
  603. c.Value=Player
  604. c.Parent=h
  605. game:GetService("Debris"):AddItem(c,.5)
  606. CRIT=false
  607. hitDeb=true
  608. AttackPos=6
  609. end
  610. end
  611.  
  612. showDamage=function(Char,Dealt,du,Color)
  613. m=Instance.new("Model")
  614. m.Name=tostring(Dealt)
  615. h=Instance.new("Humanoid")
  616. h.Health=0
  617. h.MaxHealth=0
  618. h.Parent=m
  619. c=Instance.new("Part")
  620. c.Transparency=0
  621. c.BrickColor=Color
  622. c.Name="Head"
  623. c.TopSurface=0
  624. c.BottomSurface=0
  625. c.formFactor="Plate"
  626. c.Size=Vector3.new(1,.4,1)
  627. ms=Instance.new("CylinderMesh")
  628. ms.Scale=Vector3.new(.8,.8,.8)
  629. if CRIT==true then
  630. ms.Scale=Vector3.new(1,1.25,1)
  631. end
  632. ms.Parent=c
  633. c.Reflectance=0
  634. Instance.new("BodyGyro").Parent=c
  635. c.Parent=m
  636. if Char:findFirstChild("Head")~=nil then
  637. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  638. elseif Char.Parent:findFirstChild("Head")~=nil then
  639. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  640. end
  641. f=Instance.new("BodyPosition")
  642. f.P=2000
  643. f.D=100
  644. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  645. f.position=c.Position+Vector3.new(0,3,0)
  646. f.Parent=c
  647. game:GetService("Debris"):AddItem(m,.5+du)
  648. c.CanCollide=false
  649. m.Parent=workspace
  650. c.CanCollide=false
  651. end
  652.  
  653. Player=game:GetService('Players').LocalPlayer
  654. Character=Player.Character
  655. Mouse=Player:GetMouse()
  656. m=Instance.new('Model',Character)
  657.  
  658.  
  659. local function weldBetween(a, b)
  660. local weldd = Instance.new("ManualWeld")
  661. weldd.Part0 = a
  662. weldd.Part1 = b
  663. weldd.C0 = CFrame.new()
  664. weldd.C1 = b.CFrame:inverse() * a.CFrame
  665. weldd.Parent = a
  666. return weldd
  667. end
  668.  
  669. it=Instance.new
  670.  
  671. function nooutline(part)
  672. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  673. end
  674.  
  675. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  676. local fp=it("Part")
  677. fp.formFactor=formfactor
  678. fp.Parent=parent
  679. fp.Reflectance=reflectance
  680. fp.Transparency=transparency
  681. fp.CanCollide=false
  682. fp.Locked=true
  683. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  684. fp.Name=name
  685. fp.Size=size
  686. fp.Position=Character.Torso.Position
  687. nooutline(fp)
  688. fp.Material=material
  689. fp:BreakJoints()
  690. return fp
  691. end
  692.  
  693. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  694. local mesh=it(Mesh)
  695. mesh.Parent=part
  696. if Mesh=="SpecialMesh" then
  697. mesh.MeshType=meshtype
  698. mesh.MeshId=meshid
  699. end
  700. mesh.Offset=offset
  701. mesh.Scale=scale
  702. return mesh
  703. end
  704.  
  705. function weld(parent,part0,part1,c0,c1)
  706. local weld=it("Weld")
  707. weld.Parent=parent
  708. weld.Part0=part0
  709. weld.Part1=part1
  710. weld.C0=c0
  711. weld.C1=c1
  712. return weld
  713. end
  714.  
  715. handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(2.39999986, 1.20000005, 1.39999998))
  716. handleweld=weld(m,Character["HumanoidRootPart"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.199987411, 1.80016804, -4.60002136, 0, 0, -1, 0, 1, 0, 1, 0, 0))
  717. mesh("SpecialMesh",handle,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  718. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"New Yeller","Part",Vector3.new(0.200000003, 1.39999998, 0.200000003))
  719. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.65226841, 0.615966797, 0.551956177, 0.506235778, 0.859788835, -0.0669874996, -0.842751443, 0.476726264, -0.250001729, -0.18301402, 0.183013633, 0.965925336))
  720. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  721. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.38, 0.600000024, 0.400000006))
  722. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00999450684, -1.20915127, -0.729335785, 0, 0, 1, 0.707106709, 0.707106769, 0, -0.707106769, 0.707106709, 0))
  723. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=188700920 ",Vector3.new(0, 0, 0),Vector3.new(0.600000024, 0.600000024, 0.600000024))
  724. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.400000006, 0.399999917))
  725. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.93805122, 1.01999724, 0.420043945, 0.995906591, -0.0903857201, 1.49011612e-008, -0.0903856158, -0.995906353, 2.98023224e-008, 3.59931391e-008, 9.79013635e-008, -0.999999762))
  726. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  727. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"New Yeller","Part",Vector3.new(1.79999983, 0.800000012, 0.200000003))
  728. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.95584869, 0.406936646, 1.44164658, 0.47444427, -0.224142253, -0.851271212, 0.224145442, 0.965925813, -0.129406735, 0.851270437, -0.129412293, 0.508518457))
  729. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  730. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"New Yeller","Part",Vector3.new(0.599999785, 0.400000006, 0.399999917))
  731. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.65242577, -1.32529449, -0.400039673, 0.965924919, -0.258818805, 0, 0.258818805, 0.965924919, 0, 0, 0, 1))
  732. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  733. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"New Yeller","Part",Vector3.new(0.200000003, 1.39999998, 0.200000003))
  734. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.6522727, 0.615947723, -0.5520401, 0.5062356, 0.859789014, 0.0669868737, -0.842752635, 0.476727337, 0.249995992, 0.183009356, -0.183010221, 0.965926886))
  735. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  736. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.400000006, 1.39999998, 0.400000006))
  737. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.85198402, 0.141452789, 0.451950073, 0.707106352, 0.707106471, -7.28711891e-009, -0.683012307, 0.683012307, -0.258819044, -0.183012635, 0.183012605, 0.965925813))
  738. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  739. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.99999988, 1, 1.39999998))
  740. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.680272102, 0.423443794, 0, 0.707106709, 0.707106769, 0, -0.707106769, 0.707106709, 0, 0, 0, 1))
  741. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  742. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.5999999, 0.800000012, 0.99999994))
  743. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.973374844, 0.834898949, 0, 0.499999911, 0.866025329, 0, -0.866025329, 0.499999911, 0, 0, 0, 1))
  744. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  745. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.400000006, 1.39999998, 0.400000006))
  746. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.85198402, 0.141433716, -0.452041626, 0.707106352, 0.707106471, 1.35665289e-007, -0.683012307, 0.683012307, 0.258819044, 0.183012515, -0.183012694, 0.965925813))
  747. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  748. BackLegL=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","BackLegL",Vector3.new(0.599999726, 1.20000005, 0.600000024))
  749. BackLegLweld=weld(m,handle,BackLegL,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.286300659, 0.849960327, 0.383811951, 0.87000972, -0.36868602, -0.327343285, 0.475175232, 0.804096043, 0.357264042, 0.131497145, -0.466368735, 0.874761939))
  750. mesh("SpecialMesh",BackLegL,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  751. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"New Yeller","Part",Vector3.new(0.599999785, 0.400000006, 0.399999917))
  752. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.65242577, -1.32529378, 0.39994812, 0.965924323, -0.258818656, 0, 0.258818656, 0.965924323, 0, 0, 0, 1))
  753. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  754. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.400000006, 0.399999917))
  755. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.73581696, -1.33545721, 0.409912109, 0.965924323, -0.258818656, 0, 0.258818656, 0.965924323, 0, 0, 0, 1))
  756. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  757. FrontLegR=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","FrontLegR",Vector3.new(0.599999726, 1.20000005, 0.600000024))
  758. FrontLegRweld=weld(m,handle,FrontLegR,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.434121132, 0.561666489, -0.51184082, 0.953878343, 0.277211905, 0.115193605, -0.270867169, 0.960225105, -0.0678125173, -0.129410267, 0.0334827155, 0.991025507))
  759. mesh("SpecialMesh",FrontLegR,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  760. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.39999974, 0.800000012, 0.799999952))
  761. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.29241943, 0.358634949, 1.08115387, 0.678603113, -0.249998689, -0.690650702, 0.224145085, 0.965925932, -0.129406422, 0.699468851, -0.0669903606, 0.71151638))
  762. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  763. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.59999979, 1, 1.19999993))
  764. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.34561443, -1.27705741, -4.57763672e-005, 0.965925455, -0.258818954, 0, 0.258818954, 0.965925455, 0, 0, 0, 1))
  765. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  766. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.99999976, 0.800000012, 0.99999994))
  767. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.800006866, 4.76837158e-007, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  768. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  769. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"New Yeller","Part",Vector3.new(1.00000012, 1.40000021, 0.400000006))
  770. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.276784897, -0.606216431, 0, 0, -1, -0.5, 0.866025388, 0, 0.866025388, 0.5, 0))
  771. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(1.21199989, 1.01800013, 1.45399988))
  772. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"New Yeller","Part",Vector3.new(1.79999983, 0.600000024, 0.200000003))
  773. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.04627228, 0.180041313, 1.44165039, 0.516291261, 0.0334951915, -0.855757654, 0.0937116966, 0.99102509, 0.0953273401, 0.851270437, -0.129411191, 0.508518755))
  774. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  775. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.39999986, 0.800000012, 0.799999952))
  776. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.70838928, 0.384521484, 1.45652008, 0.47444427, -0.224142253, -0.851271212, 0.224145442, 0.965925813, -0.129406735, 0.851270437, -0.129412293, 0.508518457))
  777. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  778. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"New Yeller","Part",Vector3.new(1.79999983, 0.600000024, 0.200000003))
  779. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.90304565, 0.627658844, 1.46753311, 0.400264859, -0.466504782, -0.788771927, 0.339302927, 0.875000358, -0.345322579, 0.851270497, -0.129412159, 0.508518398))
  780. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  781. FrontLegL=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","FrontLegL",Vector3.new(0.599999726, 1.20000005, 0.600000024))
  782. FrontLegLweld=weld(m,handle,FrontLegL,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.271951675, 0.623260498, 0.554595947, 0.953878343, 0.237951845, 0.183016196, -0.270867169, 0.945057452, 0.183022708, -0.129410267, -0.224154487, 0.965923131))
  783. mesh("SpecialMesh",FrontLegL,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  784. BackLegR=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","BackLegR",Vector3.new(0.599999726, 1.20000005, 0.600000024))
  785. BackLegRweld=weld(m,handle,BackLegR,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.284496307, 0.802337646, -0.511047363, 0.866025388, -0.433013082, 0.249999315, 0.482963204, 0.853853405, -0.194114745, -0.129408613, 0.288848788, 0.948588192))
  786. mesh("SpecialMesh",BackLegR,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  787.  
  788. local sine = 0
  789. local change = 1
  790. local val = 0
  791.  
  792. while true do
  793. swait()
  794. sine = sine + change
  795. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  796. local velderp=RootPart.Velocity.y
  797. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  798. if equipped==true or equipped==false then
  799. if attack==false then
  800. idle=idle+1
  801. else
  802. idle=0
  803. end
  804. if idle>=500 then
  805. if attack==false then
  806. --Sheath()
  807. end
  808. end
  809. if RootPart.Velocity.y > 1 and hitfloor==nil then
  810. Anim="Jump"
  811. if attack==false then
  812. FrontLegRweld.C0=clerp(FrontLegRweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(30)),.3)
  813. FrontLegLweld.C0=clerp(FrontLegLweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(30)),.3)
  814. BackLegRweld.C0=clerp(BackLegRweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-30)),.3)
  815. BackLegLweld.C0=clerp(BackLegLweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-30)),.3)
  816. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  817. end
  818. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  819. Anim="Fall"
  820. if attack==false then
  821. FrontLegRweld.C0=clerp(FrontLegRweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-30)),.3)
  822. FrontLegLweld.C0=clerp(FrontLegLweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-30)),.3)
  823. BackLegRweld.C0=clerp(BackLegRweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(30)),.3)
  824. BackLegLweld.C0=clerp(BackLegLweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(30)),.3)
  825. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  826. end
  827. elseif torvel<1 and hitfloor~=nil then
  828. Anim="Idle"
  829. if attack==false then
  830. FrontLegRweld.C0=clerp(FrontLegRweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  831. FrontLegLweld.C0=clerp(FrontLegLweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  832. BackLegRweld.C0=clerp(BackLegRweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  833. BackLegLweld.C0=clerp(BackLegLweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  834. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  835. end
  836. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  837. local idleanim=0
  838. Anim="Walk"
  839. if attack==false then
  840. change=3
  841. FrontLegRweld.C0=clerp(FrontLegRweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(20)),.3)
  842. FrontLegLweld.C0=clerp(FrontLegLweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(20)),.3)
  843. BackLegRweld.C0=clerp(BackLegRweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-20)),.3)
  844. BackLegLweld.C0=clerp(BackLegLweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-20)),.3)
  845. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  846. end
  847. elseif torvel>=22 and hitfloor~=nil then
  848. Anim="Fly"
  849. FrontLegRweld.C0=clerp(FrontLegRweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(20)),.3)
  850. FrontLegLweld.C0=clerp(FrontLegLweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(20)),.3)
  851. BackLegRweld.C0=clerp(BackLegRweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-20)),.3)
  852. BackLegLweld.C0=clerp(BackLegLweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-20)),.3)
  853. handleweld.C0=clerp(handleweld.C0,cf(0,1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  854. if attack==false then
  855. end
  856. end
  857. end
  858. end
  859. --156434034D
Add Comment
Please, Sign In to add comment