Advertisement
0_Abysal

Untitled

Jul 28th, 2018
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 72.46 KB | None | 0 0
  1. -- Gaster <3
  2. -- AAAAAHHHHHHHHHH
  3.  
  4. Player=game:GetService("Players").LocalPlayer
  5. Character=Player.Character
  6. PlayerGui=Player.PlayerGui
  7. Backpack=Player.Backpack
  8. Torso=Character.Torso
  9. Head=Character.Head
  10. Humanoid=Character.Humanoid
  11. m=Instance.new('Model',Character)
  12. LeftArm=Character["Left Arm"]
  13. LeftLeg=Character["Left Leg"]
  14. RightArm=Character["Right Arm"]
  15. RightLeg=Character["Right Leg"]
  16. LS=Torso["Left Shoulder"]
  17. LH=Torso["Left Hip"]
  18. RS=Torso["Right Shoulder"]
  19. RH=Torso["Right Hip"]
  20. Face = Head.face
  21. Neck=Torso.Neck
  22. it=Instance.new
  23. attacktype=1
  24. vt=Vector3.new
  25. cf=CFrame.new
  26. euler=CFrame.fromEulerAnglesXYZ
  27. angles=CFrame.Angles
  28. cloaked=false
  29. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  30. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  31. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  32. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  33. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  34. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  35. RootPart=Character.HumanoidRootPart
  36. RootJoint=RootPart.RootJoint
  37. RootCF=euler(-1.57,0,3.14)
  38. attack = false
  39. attackdebounce = false
  40. deb=false
  41. equipped=true
  42. hand=false
  43. MMouse=nil
  44. combo=0
  45. mana=0
  46. trispeed=.2
  47. attackmode='none'
  48. local idle=0
  49. local Anim="Idle"
  50. local Effects={}
  51. local gun=false
  52. local shoot=false
  53. player=nil
  54. mana=0
  55.  
  56. mouse=Player:GetMouse()
  57. --save shoulders
  58. RSH, LSH=nil, nil
  59. --welds
  60. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  61. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  62. LH=Torso["Left Hip"]
  63. RH=Torso["Right Hip"]
  64. TorsoColor=Torso.BrickColor
  65. function NoOutline(Part)
  66. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  67. end
  68. player=Player
  69. ch=Character
  70. RSH=ch.Torso["Right Shoulder"]
  71. LSH=ch.Torso["Left Shoulder"]
  72. --
  73. RSH.Parent=nil
  74. LSH.Parent=nil
  75. --
  76. RW.Name="Right Shoulder"
  77. RW.Part0=ch.Torso
  78. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  79. RW.C1=cf(0, 0.5, 0)
  80. RW.Part1=ch["Right Arm"]
  81. RW.Parent=ch.Torso
  82. --
  83. LW.Name="Left Shoulder"
  84. LW.Part0=ch.Torso
  85. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  86. LW.C1=cf(0, 0.5, 0)
  87. LW.Part1=ch["Left Arm"]
  88. LW.Parent=ch.Torso
  89.  
  90. Player=game:GetService('Players').LocalPlayer
  91. Character=Player.Character
  92. Mouse=Player:GetMouse()
  93. m=Instance.new('Model',Character)
  94.  
  95.  
  96. local function weldBetween(a, b)
  97. local weldd = Instance.new("ManualWeld")
  98. weldd.Part0 = a
  99. weldd.Part1 = b
  100. weldd.C0 = CFrame.new()
  101. weldd.C1 = b.CFrame:inverse() * a.CFrame
  102. weldd.Parent = a
  103. return weldd
  104. end
  105.  
  106. function swait(num)
  107. if num==0 or num==nil then
  108. game:service'RunService'.Stepped:wait(0)
  109. else
  110. for i=0,num do
  111. game:service'RunService'.Stepped:wait(0)
  112. end
  113. end
  114. end
  115.  
  116. function nooutline(part)
  117. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  118. end
  119.  
  120. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  121. local fp=it("Part")
  122. fp.formFactor=formfactor
  123. fp.Parent=parent
  124. fp.Reflectance=reflectance
  125. fp.Transparency=transparency
  126. fp.CanCollide=false
  127. fp.Locked=true
  128. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  129. fp.Name=name
  130. fp.Size=size
  131. fp.Position=Character.Torso.Position
  132. nooutline(fp)
  133. fp.Material=material
  134. fp:BreakJoints()
  135. return fp
  136. end
  137.  
  138. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  139. local mesh=it(Mesh)
  140. mesh.Parent=part
  141. if Mesh=="SpecialMesh" then
  142. mesh.MeshType=meshtype
  143. mesh.MeshId=meshid
  144. end
  145. mesh.Offset=offset
  146. mesh.Scale=scale
  147. return mesh
  148. end
  149.  
  150. function weld(parent,part0,part1,c0,c1)
  151. local weld=it("Weld")
  152. weld.Parent=parent
  153. weld.Part0=part0
  154. weld.Part1=part1
  155. weld.C0=c0
  156. weld.C1=c1
  157. return weld
  158. end
  159.  
  160.  
  161. local function CFrameFromTopBack(at, top, back)
  162. local right = top:Cross(back)
  163. return CFrame.new(at.x, at.y, at.z,
  164. right.x, top.x, back.x,
  165. right.y, top.y, back.y,
  166. right.z, top.z, back.z)
  167. end
  168.  
  169. function Triangle(a, b, c)
  170. local edg1 = (c-a):Dot((b-a).unit)
  171. local edg2 = (a-b):Dot((c-b).unit)
  172. local edg3 = (b-c):Dot((a-c).unit)
  173. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  174. a, b, c = a, b, c
  175. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  176. a, b, c = b, c, a
  177. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  178. a, b, c = c, a, b
  179. else
  180. assert(false, "unreachable")
  181. end
  182.  
  183. local len1 = (c-a):Dot((b-a).unit)
  184. local len2 = (b-a).magnitude - len1
  185. local width = (a + (b-a).unit*len1 - c).magnitude
  186.  
  187. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  188.  
  189. local list = {}
  190.  
  191. local TrailColor = ("Dark grey")
  192.  
  193. if len1 > 0.01 then
  194. local w1 = Instance.new('WedgePart', m)
  195. game:GetService("Debris"):AddItem(w1,5)
  196. w1.Material = "SmoothPlastic"
  197. w1.FormFactor = 'Custom'
  198. w1.BrickColor = BrickColor.new(TrailColor)
  199. w1.Transparency = 0
  200. w1.Reflectance = 0
  201. w1.Material = "SmoothPlastic"
  202. w1.CanCollide = false
  203. NoOutline(w1)
  204. local sz = Vector3.new(0.2, width, len1)
  205. w1.Size = sz
  206. local sp = Instance.new("SpecialMesh",w1)
  207. sp.MeshType = "Wedge"
  208. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  209. w1:BreakJoints()
  210. w1.Anchored = true
  211. w1.Parent = workspace
  212. w1.Transparency = 0.7
  213. table.insert(Effects,{w1,"Disappear",.01})
  214. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  215. table.insert(list,w1)
  216. end
  217.  
  218. if len2 > 0.01 then
  219. local w2 = Instance.new('WedgePart', m)
  220. game:GetService("Debris"):AddItem(w2,5)
  221. w2.Material = "SmoothPlastic"
  222. w2.FormFactor = 'Custom'
  223. w2.BrickColor = BrickColor.new(TrailColor)
  224. w2.Transparency = 0
  225. w2.Reflectance = 0
  226. w2.Material = "SmoothPlastic"
  227. w2.CanCollide = false
  228. NoOutline(w2)
  229. local sz = Vector3.new(0.2, width, len2)
  230. w2.Size = sz
  231. local sp = Instance.new("SpecialMesh",w2)
  232. sp.MeshType = "Wedge"
  233. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  234. w2:BreakJoints()
  235. w2.Anchored = true
  236. w2.Parent = workspace
  237. w2.Transparency = 0.7
  238. table.insert(Effects,{w2,"Disappear",.01})
  239. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  240. table.insert(list,w2)
  241. end
  242. return unpack(list)
  243. end
  244.  
  245.  
  246. so = function(id,par,vol,pit)
  247. coroutine.resume(coroutine.create(function()
  248. local sou = Instance.new("Sound",par or workspace)
  249. sou.Volume=vol
  250. sou.Pitch=pit or 1
  251. sou.SoundId=id
  252. swait()
  253. sou:play()
  254. game:GetService("Debris"):AddItem(sou,6)
  255. end))
  256. end
  257.  
  258. function clerp(a,b,t)
  259. local qa = {QuaternionFromCFrame(a)}
  260. local qb = {QuaternionFromCFrame(b)}
  261. local ax, ay, az = a.x, a.y, a.z
  262. local bx, by, bz = b.x, b.y, b.z
  263. local _t = 1-t
  264. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  265. end
  266.  
  267. function QuaternionFromCFrame(cf)
  268. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  269. local trace = m00 + m11 + m22
  270. if trace > 0 then
  271. local s = math.sqrt(1 + trace)
  272. local recip = 0.5/s
  273. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  274. else
  275. local i = 0
  276. if m11 > m00 then
  277. i = 1
  278. end
  279. if m22 > (i == 0 and m00 or m11) then
  280. i = 2
  281. end
  282. if i == 0 then
  283. local s = math.sqrt(m00-m11-m22+1)
  284. local recip = 0.5/s
  285. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  286. elseif i == 1 then
  287. local s = math.sqrt(m11-m22-m00+1)
  288. local recip = 0.5/s
  289. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  290. elseif i == 2 then
  291. local s = math.sqrt(m22-m00-m11+1)
  292. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  293. end
  294. end
  295. end
  296.  
  297. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  298. local xs, ys, zs = x + x, y + y, z + z
  299. local wx, wy, wz = w*xs, w*ys, w*zs
  300. local xx = x*xs
  301. local xy = x*ys
  302. local xz = x*zs
  303. local yy = y*ys
  304. local yz = y*zs
  305. local zz = z*zs
  306. 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))
  307. end
  308.  
  309. function QuaternionSlerp(a, b, t)
  310. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  311. local startInterp, finishInterp;
  312. if cosTheta >= 0.0001 then
  313. if (1 - cosTheta) > 0.0001 then
  314. local theta = math.acos(cosTheta)
  315. local invSinTheta = 1/math.sin(theta)
  316. startInterp = math.sin((1-t)*theta)*invSinTheta
  317. finishInterp = math.sin(t*theta)*invSinTheta
  318. else
  319. startInterp = 1-t
  320. finishInterp = t
  321. end
  322. else
  323. if (1+cosTheta) > 0.0001 then
  324. local theta = math.acos(-cosTheta)
  325. local invSinTheta = 1/math.sin(theta)
  326. startInterp = math.sin((t-1)*theta)*invSinTheta
  327. finishInterp = math.sin(t*theta)*invSinTheta
  328. else
  329. startInterp = t-1
  330. finishInterp = t
  331. end
  332. end
  333. 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
  334. end
  335.  
  336. --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  337.  
  338.  
  339. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  340. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  341. end
  342.  
  343. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  344. if hit.Parent==nil then
  345. return
  346. end
  347. h=hit.Parent:FindFirstChild("Humanoid")
  348. for _,v in pairs(hit.Parent:children()) do
  349. if v:IsA("Humanoid") then
  350. h=v
  351. end
  352. end
  353. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  354. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  355. end
  356. if hit.Parent.className=="Hat" then
  357. hit=hit.Parent.Parent:findFirstChild("Head")
  358. end
  359. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  360. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  361. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  362. return
  363. end]]
  364. -- hs(hit,1.2)
  365. c=Instance.new("ObjectValue")
  366. c.Name="creator"
  367. c.Value=game:service("Players").LocalPlayer
  368. c.Parent=h
  369. game:GetService("Debris"):AddItem(c,.5)
  370. Damage=math.random(minim,maxim)
  371. -- h:TakeDamage(Damage)
  372. blocked=false
  373. block=hit.Parent:findFirstChild("Block")
  374. if block~=nil then
  375. print(block.className)
  376. if block.className=="NumberValue" then
  377. if block.Value>0 then
  378. blocked=true
  379. if decreaseblock==nil then
  380. block.Value=block.Value-1
  381. end
  382. end
  383. end
  384. if block.className=="IntValue" then
  385. if block.Value>0 then
  386. blocked=true
  387. if decreaseblock~=nil then
  388. block.Value=block.Value-1
  389. end
  390. end
  391. end
  392. end
  393. if blocked==false then
  394. -- h:TakeDamage(Damage)
  395. h.Health=h.Health-Damage
  396. showDamage(hit.Parent,Damage,.5,BrickColor.new("New Yeller"))
  397. else
  398. h.Health=h.Health-(Damage/2)
  399. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  400. end
  401. if Type=="Knockdown" then
  402. hum=hit.Parent.Humanoid
  403. hum.PlatformStand=true
  404. coroutine.resume(coroutine.create(function(HHumanoid)
  405. swait(1)
  406. HHumanoid.PlatformStand=false
  407. end),hum)
  408. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  409. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  410. local bodvol=Instance.new("BodyVelocity")
  411. bodvol.velocity=angle*knockback
  412. bodvol.P=5000
  413. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  414. bodvol.Parent=hit
  415. rl=Instance.new("BodyAngularVelocity")
  416. rl.P=3000
  417. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  418. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  419. rl.Parent=hit
  420. game:GetService("Debris"):AddItem(bodvol,.5)
  421. game:GetService("Debris"):AddItem(rl,.5)
  422. elseif Type=="Normal" then
  423. vp=Instance.new("BodyVelocity")
  424. vp.P=500
  425. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  426. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  427. if KnockbackType==1 then
  428. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  429. elseif KnockbackType==2 then
  430. vp.velocity=Property.CFrame.lookVector*knockback
  431. end
  432. if knockback>0 then
  433. vp.Parent=hit.Parent.Torso
  434. end
  435. game:GetService("Debris"):AddItem(vp,.5)
  436. elseif Type=="Up" then
  437. local bodyVelocity=Instance.new("BodyVelocity")
  438. bodyVelocity.velocity=vt(0,60,0)
  439. bodyVelocity.P=5000
  440. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  441. bodyVelocity.Parent=hit
  442. game:GetService("Debris"):AddItem(bodyVelocity,1)
  443. rl=Instance.new("BodyAngularVelocity")
  444. rl.P=3000
  445. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  446. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  447. rl.Parent=hit
  448. game:GetService("Debris"):AddItem(rl,.5)
  449. elseif Type=="Snare" then
  450. bp=Instance.new("BodyPosition")
  451. bp.P=2000
  452. bp.D=100
  453. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  454. bp.position=hit.Parent.Torso.Position
  455. bp.Parent=hit.Parent.Torso
  456. game:GetService("Debris"):AddItem(bp,1)
  457. elseif Type=="Target" then
  458. if Targetting==false then
  459. ZTarget=hit.Parent.Torso
  460. coroutine.resume(coroutine.create(function(Part)
  461. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  462. swait(5)
  463. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  464. end),ZTarget)
  465. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  466. targetgui=Instance.new("BillboardGui")
  467. targetgui.Parent=ZTarget
  468. targetgui.Size=UDim2.new(10,100,10,100)
  469. targ=Instance.new("ImageLabel")
  470. targ.Parent=targetgui
  471. targ.BackgroundTransparency=1
  472. targ.Image="rbxassetid://4834067"
  473. targ.Size=UDim2.new(1,0,1,0)
  474. cam.CameraType="Scriptable"
  475. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  476. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  477. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  478. Targetting=true
  479. RocketTarget=ZTarget
  480. for i=1,Property do
  481. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  482. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  483. swait()
  484. end
  485. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  486. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  487. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  488. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  489. end
  490. Targetting=false
  491. RocketTarget=nil
  492. targetgui.Parent=nil
  493. cam.CameraType="Custom"
  494. end
  495. end
  496. debounce=Instance.new("BoolValue")
  497. debounce.Name="DebounceHit"
  498. debounce.Parent=hit.Parent
  499. debounce.Value=true
  500. game:GetService("Debris"):AddItem(debounce,Delay)
  501. c=Instance.new("ObjectValue")
  502. c.Name="creator"
  503. c.Value=Player
  504. c.Parent=h
  505. game:GetService("Debris"):AddItem(c,.5)
  506. CRIT=false
  507. hitDeb=true
  508. AttackPos=6
  509. end
  510. end
  511.  
  512. showDamage=function(Char,Dealt,du,Color)
  513. m=Instance.new("Model")
  514. m.Name=tostring(Dealt)
  515. h=Instance.new("Humanoid")
  516. h.Health=0
  517. h.MaxHealth=0
  518. h.Parent=m
  519. c=Instance.new("Part")
  520. c.Transparency=0
  521. c.BrickColor=Color
  522. c.Name="Head"
  523. c.TopSurface=0
  524. c.BottomSurface=0
  525. c.formFactor="Plate"
  526. c.Size=Vector3.new(1,.4,1)
  527. ms=Instance.new("CylinderMesh")
  528. ms.Scale=Vector3.new(.8,.8,.8)
  529. if CRIT==true then
  530. ms.Scale=Vector3.new(1,1.25,1)
  531. end
  532. ms.Parent=c
  533. c.Reflectance=0
  534. Instance.new("BodyGyro").Parent=c
  535. c.Parent=m
  536. if Char:findFirstChild("Head")~=nil then
  537. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  538. elseif Char.Parent:findFirstChild("Head")~=nil then
  539. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  540. end
  541. f=Instance.new("BodyPosition")
  542. f.P=2000
  543. f.D=100
  544. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  545. f.position=c.Position+Vector3.new(0,3,0)
  546. f.Parent=c
  547. game:GetService("Debris"):AddItem(m,.5+du)
  548. c.CanCollide=false
  549. m.Parent=workspace
  550. c.CanCollide=false
  551. end
  552.  
  553. VestHandle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(2.01999998, 1.39999998, 1.01999998))
  554. handleweld=weld(m,Character["Torso"],VestHandle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.52587891e-005, 0.300115585, 3.05175781e-005, 0.999999642, 0, 0, 0, 1, 0, 0, 0, 0.999999642))
  555. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"White","Part",Vector3.new(1, 0.76000005, 0.600000024))
  556. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.509597778, -0.490081787, 0.200000286, -0.999999642, 0, 0, 0, 0, 0.999999642, 0, 1, 0))
  557. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=104516854",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  558. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.600000024, 0.800000012))
  559. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000152587891, -0.999994516, -0.200134277, -4.47035475e-008, 0, 0.999999642, 0, 1, 0, -0.999999642, 0, -4.4703544e-008))
  560. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  561. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.620000005, 1.01999998))
  562. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.700012207, -1.00999117, 1.52587891e-005, 0.999999046, 0, 0, 0, 1, 0, 0, 0, 0.999999046))
  563. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.620000005, 1.01999998))
  564. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.699127197, -1.00999379, 0.000549316406, 0.999997914, 6.38506317e-005, -2.78951497e-015, -6.38804122e-005, 1.00000012, 2.10474918e-015, 2.78942159e-015, 1.39239913e-015, 0.999997854))
  565. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  566. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609390259, 0.811340332, -0.0999908447, 3.08029073e-018, -2.69585922e-014, -0.999999642, -0.999999642, -6.39334685e-005, -1.35697087e-018, -6.39334467e-005, 1, -2.6958582e-014))
  567. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  568. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  569. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609359741, -0.788131714, -0.0999910831, 3.06354694e-018, -2.34616979e-014, -0.999999642, -0.999999642, -6.39629943e-005, -1.56279636e-018, -6.39629725e-005, 1, -2.34616895e-014))
  570. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  571. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  572. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609375, 0.0116882324, -0.0999908447, 3.06355067e-018, -2.34617301e-014, -0.999999642, -0.999999642, -6.39631544e-005, -1.56279822e-018, -6.39631326e-005, 1, -2.34617217e-014))
  573. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  574. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  575. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609313965, -0.388046265, -0.0999908447, 3.0635486e-018, -2.34617301e-014, -0.999998927, -0.999998927, -6.39631544e-005, -1.56279719e-018, -6.39630889e-005, 1, -2.34617047e-014))
  576. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  577. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  578. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609329224, 0.411483765, -0.0999908447, 3.08028867e-018, -2.69585922e-014, -0.999998927, -0.999998927, -6.39334685e-005, -1.35696984e-018, -6.3933403e-005, 1, -2.69585617e-014))
  579. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  580. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003))
  581. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000305175781, -0.800010204, 0.89906311, -4.47035724e-008, 6.26018334e-015, 0.999997854, -8.34552054e-008, 1.00000012, -5.15634779e-015, -0.999997914, -5.35364961e-008, -4.47035653e-008))
  582. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  583. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.600000024, 0.800000012))
  584. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000228881836, -0.99998498, -0.199783325, -4.47038211e-008, -2.85946115e-012, -0.999997854, -6.3955762e-005, 1.00000012, 1.77753083e-015, 0.999997914, 6.39259815e-005, -4.47038175e-008))
  585. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  586. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 3.79999971, 0.200000003))
  587. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356018066, -0.311279297, -0.609542847, 0.865768671, 0.500441432, 0, -0.5004403, 0.865770638, 3.55271241e-015, 3.55271241e-015, 3.02253882e-015, 0.999997854))
  588. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  589. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003))
  590. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000122070313, -0.799995899, 0.900177002, 1.49011559e-008, 0, -0.999995232, 0, 1, 0, 0.999995232, 0, 1.49011559e-008))
  591. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  592. FlagLogo=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","FlagLogo",Vector3.new(3, 1.99999988, 0.200000003))
  593. FlagLogoweld=weld(m,VestHandle,FlagLogo,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.14234924, -3.41108704, -0.610244751, 0.865850091, 0.500302911, -3.55240239e-015, -0.500302792, 0.865850449, 9.79956736e-019, 3.07633938e-015, 1.77642947e-015, 0.999999642))
  594. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 0.200000003, 0.400000036))
  595. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356628418, -2.31108093, -0.620269775, 0.865850091, 0.500302911, 7.10581953e-015, -0.500302792, 0.865850449, 9.79956736e-019, 6.15238443e-015, 3.55382075e-015, 0.999999642))
  596. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  597. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000036, 0.200000003, 0.400000036))
  598. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.354736328, -4.51108551, -0.620117188, 0.865849495, 0.500302911, 1.77640292e-014, -0.500302434, 0.865850449, 9.79956115e-019, 9.22842142e-015, 5.33121097e-015, 0.999998927))
  599. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  600. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 1.99999964, 0.200000003))
  601. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356216431, -3.41107178, -0.610137939, 0.865848899, 0.500302911, 1.77639292e-014, -0.500302076, 0.865850449, 9.79955495e-019, 1.53807173e-014, 8.88612016e-015, 0.999998212))
  602. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  603. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 0.200000003, 0.400000036))
  604. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356292725, 1.6887207, -0.619628906, 0.865768075, 0.500441432, 0, -0.500439942, 0.865770638, 3.55270987e-015, 3.55270987e-015, 3.02253882e-015, 0.999997139))
  605. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  606. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  607. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.589828491, 0.808547974, -0.0999956131, -3.90798369e-014, 8.06646416e-017, -0.999997854, -0.999997914, -6.36497934e-005, 3.90798369e-014, -6.36795739e-005, 1.00000012, 3.58011901e-015))
  608. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  609. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"White","Part",Vector3.new(1, 0.76000005, 0.600000024))
  610. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.509597778, -0.490081787, -0.399998188, -0.999999642, 0, 0, 0, 0, 0.999999642, 0, 1, 0))
  611. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=104516854",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  612. handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(0.200000003, 0.200000003, 1.4000001))
  613. handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.05175781e-005, -1.10011411, -1.52587891e-005, 0.999999404, -4.47034765e-008, 0, -4.47034836e-008, -0.999999285, 0, 0, 0, -1))
  614. mesh("SpecialMesh",handle,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=74322546",Vector3.new(0, 0, 0),Vector3.new(1.5, 1.5, 1.5))
  615. local Decal1 = Instance.new("Decal",FlagLogo)
  616. Decal1.Texture = "http://www.roblox.com/asset/?id=33199304"
  617. Decal1.Face = "Front"
  618. local Decal2 = Instance.new("Decal",FlagLogo)
  619. Decal2.Texture = "http://www.roblox.com/asset/?id=33199304"
  620. Decal2.Face = "Back"
  621. Humanoid.WalkSpeed = 50
  622.  
  623. function ALLAHUAKBAR()
  624. attack = true
  625. local speak = {"OH YEAH MR KRABS"}
  626. local colors = {"Red","Red","Red"} -- The only 3 colors, adding more will error.
  627. local chat = game:GetService("Chat")
  628. chat:Chat(Head,speak[math.random(1,#speak)], colors[math.random(1,3)] )
  629. for i = 0,1,0.05 do
  630. swait()
  631. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
  632. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3)
  633. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(50)), 0.3)
  634. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  635. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  636. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  637. end
  638. for i = 0,1,0.05 do
  639. swait()
  640. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
  641. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3)
  642. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(80), math.rad(0), math.rad(50)), 0.3)
  643. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  644. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  645. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  646. end
  647. for i = 1,20 do
  648. --so("http://roblox.com/asset/?id=197815953",workspace,1,1)
  649. so("rbxassetid://134854740",Torso,1,1.3)
  650. so("rbxassetid://345287845",workspace,1,1)
  651. so("rbxassetid://137994058",Torso,1,1)
  652. so("rbxassetid://165969964",Torso,1,1)
  653. local S = Instance.new("Explosion",workspace)
  654. S.Position = Torso.Position
  655. S.BlastPressure = 5
  656. S.BlastRadius = 50
  657. S.ExplosionType = 2
  658. end
  659. attack = false
  660. end
  661.  
  662. mouse.Button1Down:connect(function()
  663. ALLAHUAKBAR()
  664. end)
  665.  
  666. mouse.KeyDown:connect(function(k)
  667. k=k:lower()
  668.  
  669. end)
  670.  
  671.  
  672. local sine = 0
  673. local change = 1
  674. local val = 0
  675.  
  676. while true do
  677. swait()
  678. sine = sine + change
  679. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  680. local velderp=RootPart.Velocity.y
  681. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  682. if equipped==true or equipped==false then
  683. if attack==false then
  684. idle=idle+1
  685. else
  686. idle=0
  687. end
  688. if idle>=500 then
  689. if attack==false then
  690. --Sheath()
  691. end
  692. end
  693. if RootPart.Velocity.y > 1 and hitfloor==nil then
  694. Anim="Jump"
  695. if attack==false then
  696. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  697. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  698. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3)
  699. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)), 0.3)
  700. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3)
  701. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3)
  702. end
  703. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  704. Anim="Fall"
  705. if attack==false then
  706. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  707. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  708. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.3)
  709. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)), 0.3)
  710. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  711. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  712. end
  713. elseif torvel<1 and hitfloor~=nil then
  714. Anim="Idle"
  715. if attack==false then
  716. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(10)),.3)
  717. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-10)),.3)
  718. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.3)
  719. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  720. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  721. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  722. end
  723. elseif torvel>2 and hitfloor~=nil then
  724. Anim="Walk"
  725. if attack==false then
  726. change=3
  727. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  728. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  729. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50*math.cos(sine/20)), math.rad(0), math.rad(10)), 0.3)
  730. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-50*math.cos(sine/20)), math.rad(0), math.rad(-10)), 0.3)
  731. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  732. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  733. end
  734. end
  735. end
  736. if #Effects>0 then
  737. --table.insert(Effects,{prt,"Block1",delay})
  738. for e=1,#Effects do
  739. if Effects[e]~=nil then
  740. --for j=1,#Effects[e] do
  741. local Thing=Effects[e]
  742. if Thing~=nil then
  743. local Part=Thing[1]
  744. local Mode=Thing[2]
  745. local Delay=Thing[3]
  746. local IncX=Thing[4]
  747. local IncY=Thing[5]
  748. local IncZ=Thing[6]
  749. if Thing[1].Transparency<=1 then
  750. if Thing[2]=="Block1" then
  751. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  752. Mesh=Thing[1].Mesh
  753. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  754. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  755. elseif Thing[2]=="Cylinder" then
  756. Mesh=Thing[1].Mesh
  757. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  758. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  759. elseif Thing[2]=="Blood" then
  760. Mesh=Thing[7]
  761. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  762. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  763. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  764. elseif Thing[2]=="Elec" then
  765. Mesh=Thing[1].Mesh
  766. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  767. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  768. elseif Thing[2]=="Disappear" then
  769. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  770. end
  771. else
  772. Part.Parent=nil
  773. table.remove(Effects,e)
  774. end
  775. end
  776. --end
  777. end
  778. end
  779. end
  780. end-- Gaster <3
  781. -- AAAAAHHHHHHHHHH
  782.  
  783. Player=game:GetService("Players").LocalPlayer
  784. Character=Player.Character
  785. PlayerGui=Player.PlayerGui
  786. Backpack=Player.Backpack
  787. Torso=Character.Torso
  788. Head=Character.Head
  789. Humanoid=Character.Humanoid
  790. m=Instance.new('Model',Character)
  791. LeftArm=Character["Left Arm"]
  792. LeftLeg=Character["Left Leg"]
  793. RightArm=Character["Right Arm"]
  794. RightLeg=Character["Right Leg"]
  795. LS=Torso["Left Shoulder"]
  796. LH=Torso["Left Hip"]
  797. RS=Torso["Right Shoulder"]
  798. RH=Torso["Right Hip"]
  799. Face = Head.face
  800. Neck=Torso.Neck
  801. it=Instance.new
  802. attacktype=1
  803. vt=Vector3.new
  804. cf=CFrame.new
  805. euler=CFrame.fromEulerAnglesXYZ
  806. angles=CFrame.Angles
  807. cloaked=false
  808. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  809. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  810. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  811. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  812. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  813. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  814. RootPart=Character.HumanoidRootPart
  815. RootJoint=RootPart.RootJoint
  816. RootCF=euler(-1.57,0,3.14)
  817. attack = false
  818. attackdebounce = false
  819. deb=false
  820. equipped=true
  821. hand=false
  822. MMouse=nil
  823. combo=0
  824. mana=0
  825. trispeed=.2
  826. attackmode='none'
  827. local idle=0
  828. local Anim="Idle"
  829. local Effects={}
  830. local gun=false
  831. local shoot=false
  832. player=nil
  833. mana=0
  834.  
  835. mouse=Player:GetMouse()
  836. --save shoulders
  837. RSH, LSH=nil, nil
  838. --welds
  839. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  840. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  841. LH=Torso["Left Hip"]
  842. RH=Torso["Right Hip"]
  843. TorsoColor=Torso.BrickColor
  844. function NoOutline(Part)
  845. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  846. end
  847. player=Player
  848. ch=Character
  849. RSH=ch.Torso["Right Shoulder"]
  850. LSH=ch.Torso["Left Shoulder"]
  851. --
  852. RSH.Parent=nil
  853. LSH.Parent=nil
  854. --
  855. RW.Name="Right Shoulder"
  856. RW.Part0=ch.Torso
  857. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  858. RW.C1=cf(0, 0.5, 0)
  859. RW.Part1=ch["Right Arm"]
  860. RW.Parent=ch.Torso
  861. --
  862. LW.Name="Left Shoulder"
  863. LW.Part0=ch.Torso
  864. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  865. LW.C1=cf(0, 0.5, 0)
  866. LW.Part1=ch["Left Arm"]
  867. LW.Parent=ch.Torso
  868.  
  869. Player=game:GetService('Players').LocalPlayer
  870. Character=Player.Character
  871. Mouse=Player:GetMouse()
  872. m=Instance.new('Model',Character)
  873.  
  874.  
  875. local function weldBetween(a, b)
  876. local weldd = Instance.new("ManualWeld")
  877. weldd.Part0 = a
  878. weldd.Part1 = b
  879. weldd.C0 = CFrame.new()
  880. weldd.C1 = b.CFrame:inverse() * a.CFrame
  881. weldd.Parent = a
  882. return weldd
  883. end
  884.  
  885. function swait(num)
  886. if num==0 or num==nil then
  887. game:service'RunService'.Stepped:wait(0)
  888. else
  889. for i=0,num do
  890. game:service'RunService'.Stepped:wait(0)
  891. end
  892. end
  893. end
  894.  
  895. function nooutline(part)
  896. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  897. end
  898.  
  899. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  900. local fp=it("Part")
  901. fp.formFactor=formfactor
  902. fp.Parent=parent
  903. fp.Reflectance=reflectance
  904. fp.Transparency=transparency
  905. fp.CanCollide=false
  906. fp.Locked=true
  907. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  908. fp.Name=name
  909. fp.Size=size
  910. fp.Position=Character.Torso.Position
  911. nooutline(fp)
  912. fp.Material=material
  913. fp:BreakJoints()
  914. return fp
  915. end
  916.  
  917. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  918. local mesh=it(Mesh)
  919. mesh.Parent=part
  920. if Mesh=="SpecialMesh" then
  921. mesh.MeshType=meshtype
  922. mesh.MeshId=meshid
  923. end
  924. mesh.Offset=offset
  925. mesh.Scale=scale
  926. return mesh
  927. end
  928.  
  929. function weld(parent,part0,part1,c0,c1)
  930. local weld=it("Weld")
  931. weld.Parent=parent
  932. weld.Part0=part0
  933. weld.Part1=part1
  934. weld.C0=c0
  935. weld.C1=c1
  936. return weld
  937. end
  938.  
  939.  
  940. local function CFrameFromTopBack(at, top, back)
  941. local right = top:Cross(back)
  942. return CFrame.new(at.x, at.y, at.z,
  943. right.x, top.x, back.x,
  944. right.y, top.y, back.y,
  945. right.z, top.z, back.z)
  946. end
  947.  
  948. function Triangle(a, b, c)
  949. local edg1 = (c-a):Dot((b-a).unit)
  950. local edg2 = (a-b):Dot((c-b).unit)
  951. local edg3 = (b-c):Dot((a-c).unit)
  952. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  953. a, b, c = a, b, c
  954. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  955. a, b, c = b, c, a
  956. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  957. a, b, c = c, a, b
  958. else
  959. assert(false, "unreachable")
  960. end
  961.  
  962. local len1 = (c-a):Dot((b-a).unit)
  963. local len2 = (b-a).magnitude - len1
  964. local width = (a + (b-a).unit*len1 - c).magnitude
  965.  
  966. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  967.  
  968. local list = {}
  969.  
  970. local TrailColor = ("Dark grey")
  971.  
  972. if len1 > 0.01 then
  973. local w1 = Instance.new('WedgePart', m)
  974. game:GetService("Debris"):AddItem(w1,5)
  975. w1.Material = "SmoothPlastic"
  976. w1.FormFactor = 'Custom'
  977. w1.BrickColor = BrickColor.new(TrailColor)
  978. w1.Transparency = 0
  979. w1.Reflectance = 0
  980. w1.Material = "SmoothPlastic"
  981. w1.CanCollide = false
  982. NoOutline(w1)
  983. local sz = Vector3.new(0.2, width, len1)
  984. w1.Size = sz
  985. local sp = Instance.new("SpecialMesh",w1)
  986. sp.MeshType = "Wedge"
  987. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  988. w1:BreakJoints()
  989. w1.Anchored = true
  990. w1.Parent = workspace
  991. w1.Transparency = 0.7
  992. table.insert(Effects,{w1,"Disappear",.01})
  993. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  994. table.insert(list,w1)
  995. end
  996.  
  997. if len2 > 0.01 then
  998. local w2 = Instance.new('WedgePart', m)
  999. game:GetService("Debris"):AddItem(w2,5)
  1000. w2.Material = "SmoothPlastic"
  1001. w2.FormFactor = 'Custom'
  1002. w2.BrickColor = BrickColor.new(TrailColor)
  1003. w2.Transparency = 0
  1004. w2.Reflectance = 0
  1005. w2.Material = "SmoothPlastic"
  1006. w2.CanCollide = false
  1007. NoOutline(w2)
  1008. local sz = Vector3.new(0.2, width, len2)
  1009. w2.Size = sz
  1010. local sp = Instance.new("SpecialMesh",w2)
  1011. sp.MeshType = "Wedge"
  1012. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  1013. w2:BreakJoints()
  1014. w2.Anchored = true
  1015. w2.Parent = workspace
  1016. w2.Transparency = 0.7
  1017. table.insert(Effects,{w2,"Disappear",.01})
  1018. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1019. table.insert(list,w2)
  1020. end
  1021. return unpack(list)
  1022. end
  1023.  
  1024.  
  1025. so = function(id,par,vol,pit)
  1026. coroutine.resume(coroutine.create(function()
  1027. local sou = Instance.new("Sound",par or workspace)
  1028. sou.Volume=vol
  1029. sou.Pitch=pit or 1
  1030. sou.SoundId=id
  1031. swait()
  1032. sou:play()
  1033. game:GetService("Debris"):AddItem(sou,6)
  1034. end))
  1035. end
  1036.  
  1037. function clerp(a,b,t)
  1038. local qa = {QuaternionFromCFrame(a)}
  1039. local qb = {QuaternionFromCFrame(b)}
  1040. local ax, ay, az = a.x, a.y, a.z
  1041. local bx, by, bz = b.x, b.y, b.z
  1042. local _t = 1-t
  1043. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  1044. end
  1045.  
  1046. function QuaternionFromCFrame(cf)
  1047. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1048. local trace = m00 + m11 + m22
  1049. if trace > 0 then
  1050. local s = math.sqrt(1 + trace)
  1051. local recip = 0.5/s
  1052. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  1053. else
  1054. local i = 0
  1055. if m11 > m00 then
  1056. i = 1
  1057. end
  1058. if m22 > (i == 0 and m00 or m11) then
  1059. i = 2
  1060. end
  1061. if i == 0 then
  1062. local s = math.sqrt(m00-m11-m22+1)
  1063. local recip = 0.5/s
  1064. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  1065. elseif i == 1 then
  1066. local s = math.sqrt(m11-m22-m00+1)
  1067. local recip = 0.5/s
  1068. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  1069. elseif i == 2 then
  1070. local s = math.sqrt(m22-m00-m11+1)
  1071. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  1072. end
  1073. end
  1074. end
  1075.  
  1076. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1077. local xs, ys, zs = x + x, y + y, z + z
  1078. local wx, wy, wz = w*xs, w*ys, w*zs
  1079. local xx = x*xs
  1080. local xy = x*ys
  1081. local xz = x*zs
  1082. local yy = y*ys
  1083. local yz = y*zs
  1084. local zz = z*zs
  1085. 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))
  1086. end
  1087.  
  1088. function QuaternionSlerp(a, b, t)
  1089. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  1090. local startInterp, finishInterp;
  1091. if cosTheta >= 0.0001 then
  1092. if (1 - cosTheta) > 0.0001 then
  1093. local theta = math.acos(cosTheta)
  1094. local invSinTheta = 1/math.sin(theta)
  1095. startInterp = math.sin((1-t)*theta)*invSinTheta
  1096. finishInterp = math.sin(t*theta)*invSinTheta
  1097. else
  1098. startInterp = 1-t
  1099. finishInterp = t
  1100. end
  1101. else
  1102. if (1+cosTheta) > 0.0001 then
  1103. local theta = math.acos(-cosTheta)
  1104. local invSinTheta = 1/math.sin(theta)
  1105. startInterp = math.sin((t-1)*theta)*invSinTheta
  1106. finishInterp = math.sin(t*theta)*invSinTheta
  1107. else
  1108. startInterp = t-1
  1109. finishInterp = t
  1110. end
  1111. end
  1112. 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
  1113. end
  1114.  
  1115. --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  1116.  
  1117.  
  1118. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1119. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1120. end
  1121.  
  1122. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  1123. if hit.Parent==nil then
  1124. return
  1125. end
  1126. h=hit.Parent:FindFirstChild("Humanoid")
  1127. for _,v in pairs(hit.Parent:children()) do
  1128. if v:IsA("Humanoid") then
  1129. h=v
  1130. end
  1131. end
  1132. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1133. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1134. end
  1135. if hit.Parent.className=="Hat" then
  1136. hit=hit.Parent.Parent:findFirstChild("Head")
  1137. end
  1138. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1139. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1140. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1141. return
  1142. end]]
  1143. -- hs(hit,1.2)
  1144. c=Instance.new("ObjectValue")
  1145. c.Name="creator"
  1146. c.Value=game:service("Players").LocalPlayer
  1147. c.Parent=h
  1148. game:GetService("Debris"):AddItem(c,.5)
  1149. Damage=math.random(minim,maxim)
  1150. -- h:TakeDamage(Damage)
  1151. blocked=false
  1152. block=hit.Parent:findFirstChild("Block")
  1153. if block~=nil then
  1154. print(block.className)
  1155. if block.className=="NumberValue" then
  1156. if block.Value>0 then
  1157. blocked=true
  1158. if decreaseblock==nil then
  1159. block.Value=block.Value-1
  1160. end
  1161. end
  1162. end
  1163. if block.className=="IntValue" then
  1164. if block.Value>0 then
  1165. blocked=true
  1166. if decreaseblock~=nil then
  1167. block.Value=block.Value-1
  1168. end
  1169. end
  1170. end
  1171. end
  1172. if blocked==false then
  1173. -- h:TakeDamage(Damage)
  1174. h.Health=h.Health-Damage
  1175. showDamage(hit.Parent,Damage,.5,BrickColor.new("New Yeller"))
  1176. else
  1177. h.Health=h.Health-(Damage/2)
  1178. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  1179. end
  1180. if Type=="Knockdown" then
  1181. hum=hit.Parent.Humanoid
  1182. hum.PlatformStand=true
  1183. coroutine.resume(coroutine.create(function(HHumanoid)
  1184. swait(1)
  1185. HHumanoid.PlatformStand=false
  1186. end),hum)
  1187. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1188. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1189. local bodvol=Instance.new("BodyVelocity")
  1190. bodvol.velocity=angle*knockback
  1191. bodvol.P=5000
  1192. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1193. bodvol.Parent=hit
  1194. rl=Instance.new("BodyAngularVelocity")
  1195. rl.P=3000
  1196. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1197. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1198. rl.Parent=hit
  1199. game:GetService("Debris"):AddItem(bodvol,.5)
  1200. game:GetService("Debris"):AddItem(rl,.5)
  1201. elseif Type=="Normal" then
  1202. vp=Instance.new("BodyVelocity")
  1203. vp.P=500
  1204. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1205. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1206. if KnockbackType==1 then
  1207. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1208. elseif KnockbackType==2 then
  1209. vp.velocity=Property.CFrame.lookVector*knockback
  1210. end
  1211. if knockback>0 then
  1212. vp.Parent=hit.Parent.Torso
  1213. end
  1214. game:GetService("Debris"):AddItem(vp,.5)
  1215. elseif Type=="Up" then
  1216. local bodyVelocity=Instance.new("BodyVelocity")
  1217. bodyVelocity.velocity=vt(0,60,0)
  1218. bodyVelocity.P=5000
  1219. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1220. bodyVelocity.Parent=hit
  1221. game:GetService("Debris"):AddItem(bodyVelocity,1)
  1222. rl=Instance.new("BodyAngularVelocity")
  1223. rl.P=3000
  1224. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1225. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  1226. rl.Parent=hit
  1227. game:GetService("Debris"):AddItem(rl,.5)
  1228. elseif Type=="Snare" then
  1229. bp=Instance.new("BodyPosition")
  1230. bp.P=2000
  1231. bp.D=100
  1232. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1233. bp.position=hit.Parent.Torso.Position
  1234. bp.Parent=hit.Parent.Torso
  1235. game:GetService("Debris"):AddItem(bp,1)
  1236. elseif Type=="Target" then
  1237. if Targetting==false then
  1238. ZTarget=hit.Parent.Torso
  1239. coroutine.resume(coroutine.create(function(Part)
  1240. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  1241. swait(5)
  1242. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  1243. end),ZTarget)
  1244. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  1245. targetgui=Instance.new("BillboardGui")
  1246. targetgui.Parent=ZTarget
  1247. targetgui.Size=UDim2.new(10,100,10,100)
  1248. targ=Instance.new("ImageLabel")
  1249. targ.Parent=targetgui
  1250. targ.BackgroundTransparency=1
  1251. targ.Image="rbxassetid://4834067"
  1252. targ.Size=UDim2.new(1,0,1,0)
  1253. cam.CameraType="Scriptable"
  1254. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1255. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  1256. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1257. Targetting=true
  1258. RocketTarget=ZTarget
  1259. for i=1,Property do
  1260. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  1261. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  1262. swait()
  1263. end
  1264. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  1265. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1266. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  1267. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  1268. end
  1269. Targetting=false
  1270. RocketTarget=nil
  1271. targetgui.Parent=nil
  1272. cam.CameraType="Custom"
  1273. end
  1274. end
  1275. debounce=Instance.new("BoolValue")
  1276. debounce.Name="DebounceHit"
  1277. debounce.Parent=hit.Parent
  1278. debounce.Value=true
  1279. game:GetService("Debris"):AddItem(debounce,Delay)
  1280. c=Instance.new("ObjectValue")
  1281. c.Name="creator"
  1282. c.Value=Player
  1283. c.Parent=h
  1284. game:GetService("Debris"):AddItem(c,.5)
  1285. CRIT=false
  1286. hitDeb=true
  1287. AttackPos=6
  1288. end
  1289. end
  1290.  
  1291. showDamage=function(Char,Dealt,du,Color)
  1292. m=Instance.new("Model")
  1293. m.Name=tostring(Dealt)
  1294. h=Instance.new("Humanoid")
  1295. h.Health=0
  1296. h.MaxHealth=0
  1297. h.Parent=m
  1298. c=Instance.new("Part")
  1299. c.Transparency=0
  1300. c.BrickColor=Color
  1301. c.Name="Head"
  1302. c.TopSurface=0
  1303. c.BottomSurface=0
  1304. c.formFactor="Plate"
  1305. c.Size=Vector3.new(1,.4,1)
  1306. ms=Instance.new("CylinderMesh")
  1307. ms.Scale=Vector3.new(.8,.8,.8)
  1308. if CRIT==true then
  1309. ms.Scale=Vector3.new(1,1.25,1)
  1310. end
  1311. ms.Parent=c
  1312. c.Reflectance=0
  1313. Instance.new("BodyGyro").Parent=c
  1314. c.Parent=m
  1315. if Char:findFirstChild("Head")~=nil then
  1316. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1317. elseif Char.Parent:findFirstChild("Head")~=nil then
  1318. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1319. end
  1320. f=Instance.new("BodyPosition")
  1321. f.P=2000
  1322. f.D=100
  1323. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1324. f.position=c.Position+Vector3.new(0,3,0)
  1325. f.Parent=c
  1326. game:GetService("Debris"):AddItem(m,.5+du)
  1327. c.CanCollide=false
  1328. m.Parent=workspace
  1329. c.CanCollide=false
  1330. end
  1331.  
  1332. VestHandle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(2.01999998, 1.39999998, 1.01999998))
  1333. handleweld=weld(m,Character["Torso"],VestHandle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.52587891e-005, 0.300115585, 3.05175781e-005, 0.999999642, 0, 0, 0, 1, 0, 0, 0, 0.999999642))
  1334. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"White","Part",Vector3.new(1, 0.76000005, 0.600000024))
  1335. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.509597778, -0.490081787, 0.200000286, -0.999999642, 0, 0, 0, 0, 0.999999642, 0, 1, 0))
  1336. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=104516854",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1337. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.600000024, 0.800000012))
  1338. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000152587891, -0.999994516, -0.200134277, -4.47035475e-008, 0, 0.999999642, 0, 1, 0, -0.999999642, 0, -4.4703544e-008))
  1339. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1340. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.620000005, 1.01999998))
  1341. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.700012207, -1.00999117, 1.52587891e-005, 0.999999046, 0, 0, 0, 1, 0, 0, 0, 0.999999046))
  1342. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.620000005, 1.01999998))
  1343. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.699127197, -1.00999379, 0.000549316406, 0.999997914, 6.38506317e-005, -2.78951497e-015, -6.38804122e-005, 1.00000012, 2.10474918e-015, 2.78942159e-015, 1.39239913e-015, 0.999997854))
  1344. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  1345. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609390259, 0.811340332, -0.0999908447, 3.08029073e-018, -2.69585922e-014, -0.999999642, -0.999999642, -6.39334685e-005, -1.35697087e-018, -6.39334467e-005, 1, -2.6958582e-014))
  1346. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  1347. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  1348. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609359741, -0.788131714, -0.0999910831, 3.06354694e-018, -2.34616979e-014, -0.999999642, -0.999999642, -6.39629943e-005, -1.56279636e-018, -6.39629725e-005, 1, -2.34616895e-014))
  1349. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  1350. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  1351. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609375, 0.0116882324, -0.0999908447, 3.06355067e-018, -2.34617301e-014, -0.999999642, -0.999999642, -6.39631544e-005, -1.56279822e-018, -6.39631326e-005, 1, -2.34617217e-014))
  1352. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  1353. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  1354. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609313965, -0.388046265, -0.0999908447, 3.0635486e-018, -2.34617301e-014, -0.999998927, -0.999998927, -6.39631544e-005, -1.56279719e-018, -6.39630889e-005, 1, -2.34617047e-014))
  1355. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  1356. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  1357. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609329224, 0.411483765, -0.0999908447, 3.08028867e-018, -2.69585922e-014, -0.999998927, -0.999998927, -6.39334685e-005, -1.35696984e-018, -6.3933403e-005, 1, -2.69585617e-014))
  1358. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  1359. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003))
  1360. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000305175781, -0.800010204, 0.89906311, -4.47035724e-008, 6.26018334e-015, 0.999997854, -8.34552054e-008, 1.00000012, -5.15634779e-015, -0.999997914, -5.35364961e-008, -4.47035653e-008))
  1361. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1362. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.600000024, 0.800000012))
  1363. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000228881836, -0.99998498, -0.199783325, -4.47038211e-008, -2.85946115e-012, -0.999997854, -6.3955762e-005, 1.00000012, 1.77753083e-015, 0.999997914, 6.39259815e-005, -4.47038175e-008))
  1364. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1365. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 3.79999971, 0.200000003))
  1366. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356018066, -0.311279297, -0.609542847, 0.865768671, 0.500441432, 0, -0.5004403, 0.865770638, 3.55271241e-015, 3.55271241e-015, 3.02253882e-015, 0.999997854))
  1367. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1368. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003))
  1369. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000122070313, -0.799995899, 0.900177002, 1.49011559e-008, 0, -0.999995232, 0, 1, 0, 0.999995232, 0, 1.49011559e-008))
  1370. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1371. FlagLogo=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","FlagLogo",Vector3.new(3, 1.99999988, 0.200000003))
  1372. FlagLogoweld=weld(m,VestHandle,FlagLogo,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.14234924, -3.41108704, -0.610244751, 0.865850091, 0.500302911, -3.55240239e-015, -0.500302792, 0.865850449, 9.79956736e-019, 3.07633938e-015, 1.77642947e-015, 0.999999642))
  1373. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 0.200000003, 0.400000036))
  1374. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356628418, -2.31108093, -0.620269775, 0.865850091, 0.500302911, 7.10581953e-015, -0.500302792, 0.865850449, 9.79956736e-019, 6.15238443e-015, 3.55382075e-015, 0.999999642))
  1375. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1376. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000036, 0.200000003, 0.400000036))
  1377. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.354736328, -4.51108551, -0.620117188, 0.865849495, 0.500302911, 1.77640292e-014, -0.500302434, 0.865850449, 9.79956115e-019, 9.22842142e-015, 5.33121097e-015, 0.999998927))
  1378. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1379. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 1.99999964, 0.200000003))
  1380. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356216431, -3.41107178, -0.610137939, 0.865848899, 0.500302911, 1.77639292e-014, -0.500302076, 0.865850449, 9.79955495e-019, 1.53807173e-014, 8.88612016e-015, 0.999998212))
  1381. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1382. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 0.200000003, 0.400000036))
  1383. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356292725, 1.6887207, -0.619628906, 0.865768075, 0.500441432, 0, -0.500439942, 0.865770638, 3.55270987e-015, 3.55270987e-015, 3.02253882e-015, 0.999997139))
  1384. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1385. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
  1386. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.589828491, 0.808547974, -0.0999956131, -3.90798369e-014, 8.06646416e-017, -0.999997854, -0.999997914, -6.36497934e-005, 3.90798369e-014, -6.36795739e-005, 1.00000012, 3.58011901e-015))
  1387. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
  1388. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"White","Part",Vector3.new(1, 0.76000005, 0.600000024))
  1389. Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.509597778, -0.490081787, -0.399998188, -0.999999642, 0, 0, 0, 0, 0.999999642, 0, 1, 0))
  1390. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=104516854",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  1391. handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(0.200000003, 0.200000003, 1.4000001))
  1392. handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.05175781e-005, -1.10011411, -1.52587891e-005, 0.999999404, -4.47034765e-008, 0, -4.47034836e-008, -0.999999285, 0, 0, 0, -1))
  1393. mesh("SpecialMesh",handle,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=74322546",Vector3.new(0, 0, 0),Vector3.new(1.5, 1.5, 1.5))
  1394. local Decal1 = Instance.new("Decal",FlagLogo)
  1395. Decal1.Texture = "http://www.roblox.com/asset/?id=33199304"
  1396. Decal1.Face = "Front"
  1397. local Decal2 = Instance.new("Decal",FlagLogo)
  1398. Decal2.Texture = "http://www.roblox.com/asset/?id=33199304"
  1399. Decal2.Face = "Back"
  1400. Humanoid.WalkSpeed = 50
  1401.  
  1402. function ALLAHUAKBAR()
  1403. attack = true
  1404. local speak = {"OH YEAH MR KRABS"}
  1405. local colors = {"Red","Red","Red"} -- The only 3 colors, adding more will error.
  1406. local chat = game:GetService("Chat")
  1407. chat:Chat(Head,speak[math.random(1,#speak)], colors[math.random(1,3)] )
  1408. for i = 0,1,0.05 do
  1409. swait()
  1410. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
  1411. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3)
  1412. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(50)), 0.3)
  1413. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  1414. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1415. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1416. end
  1417. for i = 0,1,0.05 do
  1418. swait()
  1419. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
  1420. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3)
  1421. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(80), math.rad(0), math.rad(50)), 0.3)
  1422. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  1423. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1424. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1425. end
  1426. for i = 1,20 do
  1427. --so("http://roblox.com/asset/?id=197815953",workspace,1,1)
  1428. so("rbxassetid://134854740",Torso,1,1.3)
  1429. so("rbxassetid://345287845",workspace,1,1)
  1430. so("rbxassetid://137994058",Torso,1,1)
  1431. so("rbxassetid://165969964",Torso,1,1)
  1432. local S = Instance.new("Explosion",workspace)
  1433. S.Position = Torso.Position
  1434. S.BlastPressure = 5
  1435. S.BlastRadius = 50
  1436. S.ExplosionType = 2
  1437. end
  1438. attack = false
  1439. end
  1440.  
  1441. mouse.Button1Down:connect(function()
  1442. ALLAHUAKBAR()
  1443. end)
  1444.  
  1445. mouse.KeyDown:connect(function(k)
  1446. k=k:lower()
  1447.  
  1448. end)
  1449.  
  1450.  
  1451. local sine = 0
  1452. local change = 1
  1453. local val = 0
  1454.  
  1455. while true do
  1456. swait()
  1457. sine = sine + change
  1458. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1459. local velderp=RootPart.Velocity.y
  1460. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1461. if equipped==true or equipped==false then
  1462. if attack==false then
  1463. idle=idle+1
  1464. else
  1465. idle=0
  1466. end
  1467. if idle>=500 then
  1468. if attack==false then
  1469. --Sheath()
  1470. end
  1471. end
  1472. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1473. Anim="Jump"
  1474. if attack==false then
  1475. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1476. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  1477. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3)
  1478. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)), 0.3)
  1479. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3)
  1480. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3)
  1481. end
  1482. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1483. Anim="Fall"
  1484. if attack==false then
  1485. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  1486. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  1487. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.3)
  1488. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)), 0.3)
  1489. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1490. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1491. end
  1492. elseif torvel<1 and hitfloor~=nil then
  1493. Anim="Idle"
  1494. if attack==false then
  1495. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(10)),.3)
  1496. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-10)),.3)
  1497. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.3)
  1498. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  1499. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1500. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1501. end
  1502. elseif torvel>2 and hitfloor~=nil then
  1503. Anim="Walk"
  1504. if attack==false then
  1505. change=3
  1506. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  1507. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  1508. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50*math.cos(sine/20)), math.rad(0), math.rad(10)), 0.3)
  1509. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-50*math.cos(sine/20)), math.rad(0), math.rad(-10)), 0.3)
  1510. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1511. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1512. end
  1513. end
  1514. end
  1515. if #Effects>0 then
  1516. --table.insert(Effects,{prt,"Block1",delay})
  1517. for e=1,#Effects do
  1518. if Effects[e]~=nil then
  1519. --for j=1,#Effects[e] do
  1520. local Thing=Effects[e]
  1521. if Thing~=nil then
  1522. local Part=Thing[1]
  1523. local Mode=Thing[2]
  1524. local Delay=Thing[3]
  1525. local IncX=Thing[4]
  1526. local IncY=Thing[5]
  1527. local IncZ=Thing[6]
  1528. if Thing[1].Transparency<=1 then
  1529. if Thing[2]=="Block1" then
  1530. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1531. Mesh=Thing[1].Mesh
  1532. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1533. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1534. elseif Thing[2]=="Cylinder" then
  1535. Mesh=Thing[1].Mesh
  1536. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1537. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1538. elseif Thing[2]=="Blood" then
  1539. Mesh=Thing[7]
  1540. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  1541. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1542. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1543. elseif Thing[2]=="Elec" then
  1544. Mesh=Thing[1].Mesh
  1545. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  1546. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1547. elseif Thing[2]=="Disappear" then
  1548. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1549. end
  1550. else
  1551. Part.Parent=nil
  1552. table.remove(Effects,e)
  1553. end
  1554. end
  1555. --end
  1556. end
  1557. end
  1558. end
  1559. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement