Advertisement
00fjg

Untitled

Jun 28th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 129.52 KB | None | 0 0
  1.  
  2.  
  3. local isScriptNil = false
  4.  
  5. local PlrName = "Ben_God"
  6. local Plrs = game:GetService("Players")
  7. local RunService = game:GetService("RunService")
  8. local Content = game:GetService("ContentProvider")
  9. local LP = Plrs.LocalPlayer
  10. local Char = LP.Character
  11. local PlrGui = LP.PlayerGui
  12. local Backpack = LP.Backpack
  13. local Mouse = LP:GetMouse()
  14.  
  15. local Camera = Workspace.CurrentCamera
  16. local LastCamCF = Camera.CoordinateFrame
  17. local AnimJoints = {}
  18. local Cons = {}
  19. local mDown = false
  20. local Multi = false
  21. local Grabbing = false
  22. local Current = {}
  23. local Alpha = 1
  24. local LightNum = 1
  25.  
  26. Current.Part = nil
  27. Current.BP = nil
  28. Current.BA = nil
  29. Current.Mass = nil
  30.  
  31. local LastPart = nil
  32.  
  33. local Head = Char["Head"]
  34. local Torso = Char["Torso"]
  35. local Humanoid = Char["Humanoid"]
  36. local LA = Char["Left Arm"]
  37. local RA = Char["Right Arm"]
  38. local LL = Char["Left Leg"]
  39. local RL = Char["Right Leg"]
  40.  
  41. local LS, RS;
  42.  
  43. local OrigLS = Torso["Left Shoulder"]
  44. local OrigRS = Torso["Right Shoulder"]
  45.  
  46. for _,v in pairs(Char:GetChildren()) do
  47. if v.Name == ModID then
  48. v:Destroy()
  49. end
  50. end
  51.  
  52. for _,v in pairs(PlrGui:GetChildren()) do
  53. if v.Name == "PadsGui" then
  54. v:Destroy()
  55. end
  56. end
  57.  
  58. local ModID = "Pads"
  59. local Objects = {}
  60. local Grav = 196.2
  61.  
  62. local sin=math.sin
  63. local cos=math.cos
  64. local max=math.max
  65. local min=math.min
  66. local atan2=math.atan2
  67. local random=math.random
  68. local tau = 2 * math.pi
  69.  
  70. local BodyObjects = {
  71. ["BodyVelocity"] = true;
  72. ["BodyAngularVelocity"] = true;
  73. ["BodyForce"] = true;
  74. ["BodyThrust"] = true;
  75. ["BodyPosition"] = true;
  76. ["RocketPropulsion"] = true;
  77. }
  78.  
  79. if LP.Name == PlrName and isScriptNil then
  80. script.Parent = nil
  81. end
  82.  
  83. LP.CameraMode = "Classic"
  84.  
  85. local Assets = {
  86. }
  87.  
  88. local LS0, LS1 = OrigLS.C0, OrigLS.C1
  89. local RS0, RS1 = OrigRS.C0, OrigRS.C1
  90.  
  91. for i,v in pairs(Assets) do
  92. local ID = tostring(Assets[i])
  93. Assets[i] = "http://www.roblox.com/asset/?id=" .. ID
  94. Content:Preload("http://www.roblox.com/asset/?id=" .. ID)
  95. end
  96.  
  97. function QuaternionFromCFrame(cf)
  98. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
  99. local trace = m00 + m11 + m22 if trace > 0 then
  100. local s = math.sqrt(1 + trace);
  101. local recip = 0.5/s;
  102. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
  103. else
  104. local i = 0;
  105. if m11 > m00 then
  106. i = 1;
  107. end;
  108. if m22 > (i == 0 and m00 or m11) then
  109. i = 2 end if i == 0 then
  110. local s = math.sqrt(m00-m11-m22+1);
  111. local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
  112. elseif i == 1 then
  113. local s = math.sqrt(m11-m22-m00+1);
  114. local recip = 0.5/s;
  115. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
  116. elseif i == 2 then
  117. local s = math.sqrt(m22-m00-m11+1);
  118. local recip = 0.5/s;
  119. return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
  120. end;
  121. end;
  122. end;
  123.  
  124. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  125. local xs, ys, zs = x + x, y + y, z + z;
  126. local wx, wy, wz = w*xs, w*ys, w*zs;
  127. local xx = x*xs;
  128. local xy = x*ys;
  129. local xz = x*zs;
  130. local yy = y*ys;
  131. local yz = y*zs;
  132. local zz = z*zs;
  133. 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))
  134. end;
  135.  
  136. function QuaternionSlerp(a, b, t)
  137. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
  138. local startInterp, finishInterp;
  139. if cosTheta >= 0.0001 then
  140. if (1 - cosTheta) > 0.0001 then
  141. local theta = math.acos(cosTheta);
  142. local invSinTheta = 1/math.sin(theta);
  143. startInterp = math.sin((1-t)*theta)*invSinTheta;
  144. finishInterp = math.sin(t*theta)*invSinTheta;
  145. else
  146. startInterp = 1-t finishInterp = t;
  147. end;
  148. else
  149. if (1+cosTheta) > 0.0001 then
  150. local theta = math.acos(-cosTheta);
  151. local invSinTheta = 1/math.sin(theta);
  152. startInterp = math.sin((t-1)*theta)*invSinTheta;
  153. finishInterp = math.sin(t*theta)*invSinTheta;
  154. else startInterp = t-1 finishInterp = t;
  155. end;
  156. end;
  157. 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;
  158. end;
  159.  
  160. function CLerp(a,b,t)
  161. local qa={QuaternionFromCFrame(a)};
  162. local qb={QuaternionFromCFrame(b)};
  163. local ax,ay,az=a.x,a.y,a.z;
  164. local bx,by,bz=b.x,b.y,b.z;
  165. local _t=1-t;
  166. return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
  167. end
  168.  
  169. function GetWeld(weld)
  170. local obj
  171. for i, v in pairs(AnimJoints) do
  172. if v[1] == weld then
  173. obj = v
  174. break
  175. end
  176. end
  177. if not obj then
  178. obj = {weld,NV}
  179. table.insert(AnimJoints,obj)
  180. end
  181. return weld.C0.p, obj[2]
  182. end
  183.  
  184. function SetWeld(weld, i, loops, origpos, origangle, nextpos, nextangle, override, overrideLower, smooth)
  185. smooth = smooth or 1
  186. local obj
  187. for i, v in pairs(AnimJoints) do
  188. if v[1] == weld then
  189. obj = v
  190. break
  191. end
  192. end
  193. if not obj then
  194. obj = {weld,NV}
  195. table.insert(AnimJoints,obj)
  196. end
  197.  
  198. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  199.  
  200. local tox,toy,toz = 0,0,0
  201. tox = math.abs(origangle.x - nextangle.x) *perc
  202. toy = math.abs(origangle.y - nextangle.y) *perc
  203. toz = math.abs(origangle.z - nextangle.z) *perc
  204. tox = ((origangle.x > nextangle.x and -tox) or tox)
  205. toy = ((origangle.y > nextangle.y and -toy) or toy)
  206. toz = ((origangle.z > nextangle.z and -toz) or toz)
  207.  
  208. local tox2,toy2,toz2 = 0,0,0
  209. tox2 = math.abs(origpos.x - nextpos.x) *perc
  210. toy2 = math.abs(origpos.y - nextpos.y) *perc
  211. toz2 = math.abs(origpos.z - nextpos.z) *perc
  212. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  213. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  214. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  215.  
  216. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  217. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  218. end
  219.  
  220. function RotateCamera(x, y)
  221. Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(x, y, 0) * CFrame.new(0, 0, (Camera.CoordinateFrame.p - Camera.Focus.p).magnitude)
  222. end
  223.  
  224. function GetAngles(cf)
  225. local lv = cf.lookVector
  226. return -math.asin(lv.y), math.atan2(lv.x, -lv.z)
  227. end
  228.  
  229. local LastCamCF = Camera.CoordinateFrame
  230.  
  231. function Look()
  232. if AlphaOn == true then
  233. local x, y = GetAngles(LastCamCF:toObjectSpace(Camera.CoordinateFrame))
  234. Camera.CoordinateFrame = LastCamCF
  235. RotateCamera(x * -(Alpha), y * -(Alpha))
  236. LastCamCF = Camera.CoordinateFrame
  237. end
  238. end
  239.  
  240. function Cor(Func)
  241. local Ok, Err = coroutine.resume(coroutine.create(Func))
  242. if not Ok then
  243. print(Err)
  244. end
  245. end
  246.  
  247. function Cor2(Func)
  248. local Ok, Err = ypcall(Func)
  249. if not Ok then
  250. print(Err)
  251. end
  252. end
  253.  
  254. function MakePads()
  255. -- 1 - VTelekinesis
  256. P1 = Instance.new("Model")
  257. P1.Name = ModID
  258.  
  259. -- 2 - RBase
  260. P2 = Instance.new("Part")
  261. P2.CFrame = CFrame.new(Vector3.new(21.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  262. P2.FormFactor = Enum.FormFactor.Custom
  263. P2.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  264. P2.Anchored = true
  265. P2.BrickColor = BrickColor.new("White")
  266. P2.Friction = 0.30000001192093
  267. P2.Shape = Enum.PartType.Block
  268. P2.Name = "RBase"
  269. P2.Parent = P1
  270. P2.Transparency = 1
  271. -- 3 - Mesh
  272. P3 = Instance.new("CylinderMesh")
  273. P3.Scale = Vector3.new(1, 0.5, 1)
  274. P3.Parent = P2
  275.  
  276. -- 4 - LBase
  277. P4 = Instance.new("Part")
  278. P4.CFrame = CFrame.new(Vector3.new(18.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  279. P4.FormFactor = Enum.FormFactor.Custom
  280. P4.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  281. P4.Anchored = true
  282. P4.BrickColor = BrickColor.new("White")
  283. P4.Friction = 0.30000001192093
  284. P4.Shape = Enum.PartType.Block
  285. P4.Name = "LBase"
  286. P4.Parent = P1
  287. P4.Transparency = 1
  288. -- 5 - Mesh
  289. P5 = Instance.new("CylinderMesh")
  290. P5.Scale = Vector3.new(1, 0.5, 1)
  291. P5.Parent = P4
  292.  
  293. -- 7 - Mesh
  294. P7 = Instance.new("CylinderMesh")
  295. P7.Scale = Vector3.new(1, 0.5, 1)
  296. P7.Parent = P6
  297.  
  298.  
  299.  
  300. -- 9 - Mesh
  301. P9 = Instance.new("CylinderMesh")
  302. P9.Scale = Vector3.new(1, 0.5, 1)
  303. P9.Parent = P8
  304.  
  305.  
  306.  
  307. -- 11 - Mesh
  308. P11 = Instance.new("CylinderMesh")
  309. P11.Scale = Vector3.new(1, 0.5, 1)
  310. P11.Parent = P10
  311.  
  312.  
  313. -- 13 - Mesh
  314. P13 = Instance.new("CylinderMesh")
  315. P13.Scale = Vector3.new(1, 0.5, 1)
  316. P13.Parent = P12
  317.  
  318.  
  319. -- 15 - Mesh
  320. P15 = Instance.new("CylinderMesh")
  321. P15.Scale = Vector3.new(1, 0.5, 1)
  322. P15.Parent = P14
  323.  
  324. -- 17 - Mesh
  325. P17 = Instance.new("CylinderMesh")
  326. P17.Scale = Vector3.new(1, 0.5, 1)
  327. P17.Parent = P16
  328.  
  329. P1.Parent = LP.Character
  330. P1:MakeJoints()
  331. return P1
  332. end
  333.  
  334. weldModel = function(model, unanchor, rooty)
  335. local parts = {}
  336. local function recurse(object)
  337. if object:IsA("BasePart") then
  338. table.insert(parts, object)
  339. end
  340. for _,child in pairs(object:GetChildren()) do
  341. recurse(child)
  342. end
  343. end
  344. recurse(model)
  345.  
  346. local rootPart = rooty or parts[1]
  347. for _, part in pairs(parts) do
  348. local cframe = rootPart.CFrame:toObjectSpace(part.CFrame)
  349. local weld = Instance.new("Weld")
  350. weld.Part0 = rootPart
  351. weld.Part1 = part
  352. weld.C0 = cframe
  353. weld.Parent = rootPart
  354. end
  355.  
  356. if unanchor then
  357. for _, part in pairs(parts) do
  358. part.Anchored = false
  359. part.CanCollide = false
  360. end
  361. end
  362. end
  363.  
  364. weldItem = function(rootPart, Item, TheC0, unanchor, ParentItem)
  365. local cframe = TheC0 or rootPart.CFrame:toObjectSpace(Item.CFrame)
  366. local weld = Instance.new("Weld")
  367. weld.Name = "Weld"
  368. weld.Part0 = rootPart
  369. weld.Part1 = Item
  370. weld.C0 = cframe
  371. weld.Parent = ParentItem and Item or rootPart
  372.  
  373. if unanchor then
  374. Item.Anchored = false
  375. end
  376. return weld, cframe
  377. end
  378.  
  379. scaleModel = function(model, scale)
  380. local parts = {}
  381. local function recurse(object)
  382. if object:IsA("BasePart") then
  383. table.insert(parts, object)
  384. end
  385. for _,child in pairs(object:GetChildren()) do
  386. recurse(child)
  387. end
  388. end
  389. recurse(model)
  390.  
  391. local top, bottom, left, right, back, front
  392. for _, part in pairs(parts) do
  393. if top == nil or top < part.Position.y then top = part.Position.y end
  394. if bottom == nil or bottom > part.Position.y then bottom = part.Position.y end
  395. if left == nil or left > part.Position.x then left = part.Position.x end
  396. if right == nil or right < part.Position.x then right = part.Position.x end
  397. if back == nil or back > part.Position.z then back = part.Position.z end
  398. if front == nil or front < part.Position.z then front = part.Position.z end
  399. end
  400.  
  401. local middle = Vector3.new( left+right, top+bottom, back+front )/2
  402. local minSize = Vector3.new(0.2, 0.2, 0.2)
  403.  
  404. for _, part in pairs(parts) do
  405. local foo = part.CFrame.p - middle
  406. local rotation = part.CFrame - part.CFrame.p
  407. local newSize = part.Size*scale
  408. part.FormFactor = "Custom"
  409. part.Size = newSize
  410. part.CFrame = CFrame.new( middle + foo*scale ) * rotation
  411.  
  412. if newSize.x < minSize.x or newSize.y < minSize.y or newSize.z < minSize.z then
  413. local mesh
  414. for _, child in pairs(part:GetChildren()) do
  415. if child:IsA("DataModelMesh") then
  416. mesh = child
  417. break
  418. end
  419. end
  420.  
  421. if mesh == nil then
  422. mesh = Instance.new("BlockMesh", part)
  423. end
  424.  
  425. local oScale = mesh.Scale
  426. local newScale = newSize/minSize * oScale
  427. if 0.2 < newSize.x then newScale = Vector3.new(1 * oScale.x, newScale.y, newScale.z) end
  428. if 0.2 < newSize.y then newScale = Vector3.new(newScale.x, 1 * oScale.y, newScale.z) end
  429. if 0.2 < newSize.z then newScale = Vector3.new(newScale.x, newScale.y, 1 * oScale.z) end
  430.  
  431. mesh.Scale = newScale
  432. end
  433. end
  434. end
  435.  
  436. function getMass(Obj, Total)
  437. local newTotal = Total
  438. local returnTotal = 0
  439.  
  440. if Obj:IsA("BasePart") then
  441. newTotal = newTotal + Objects[Obj]
  442. elseif BodyObjects[Obj.ClassName] then
  443. Obj:Destroy()
  444. end
  445.  
  446. if Obj:GetChildren() and #Obj:GetChildren() > 0 then
  447. for _,v in pairs(Obj:GetChildren()) do
  448. returnTotal = returnTotal + getMass(v, newTotal)
  449. end
  450. else
  451. returnTotal = newTotal
  452. end
  453.  
  454. return returnTotal
  455. end
  456.  
  457. function getTargFromCurrent()
  458. local Current = Current.Part
  459. if Current:IsA("BasePart") then
  460. return Current
  461. elseif Current:findFirstChild("Torso") then
  462. return Current.Torso
  463. else
  464. for _,v in pairs(Current:GetChildren()) do
  465. if v:IsA("BasePart") then
  466. return v
  467. end
  468. end
  469. end
  470. end
  471.  
  472. function Fire(Part, Vec, Inv)
  473. pcall(function()
  474. Current.BP:Destroy()
  475. Current.BP = nil
  476. end)
  477. pcall(function()
  478. Current.BA:Destroy()
  479. Current.BA = nil
  480. end)
  481. pcall(function()
  482. if Inv then
  483. Part.Velocity = -((Vec - Torso.Position).unit * Grav * 1.1)
  484. else
  485. Part.Velocity = ((Vec - Camera.CoordinateFrame.p).unit * Grav * 1.1)
  486. end
  487. Current.Mass = nil
  488. end)
  489. Reset()
  490. end
  491.  
  492. function Reset()
  493. LS.Parent = nil
  494. RS.Parent = nil
  495.  
  496. OrigLS.Parent = Torso
  497. OrigRS.Parent = Torso
  498.  
  499. OrigLS.C0 = LS0
  500. OrigRS.C0 = RS0
  501. end
  502.  
  503. function Start()
  504. Cor(function()
  505. repeat wait(1/30) until LP.Character and LP.Character.Parent == Workspace and LP.Character:findFirstChild("Torso")
  506. Char = LP.Character
  507. PlrGui = LP.PlayerGui
  508. Backpack = LP.Backpack
  509. Mouse = LP:GetMouse()
  510.  
  511. for _,v in pairs(Cons) do
  512. v:disconnect()
  513. end
  514. Cons = {}
  515.  
  516. Camera = Workspace.CurrentCamera
  517. LastCamCF = Camera.CoordinateFrame
  518. AnimJoints = {}
  519. mDown = false
  520. Multi = false
  521. Grabbing = false
  522. Current = {}
  523. Alpha = 1
  524.  
  525. Head = Char["Head"]
  526. Torso = Char["Torso"]
  527. Humanoid = Char["Humanoid"]
  528. LA = Char["Left Arm"]
  529. RA = Char["Right Arm"]
  530. LL = Char["Left Leg"]
  531. RL = Char["Right Leg"]
  532.  
  533. OrigLS = Torso["Left Shoulder"]
  534. OrigRS = Torso["Right Shoulder"]
  535.  
  536. for _,v in pairs(Char:GetChildren()) do
  537. if v.Name == ModID then
  538. v:Destroy()
  539. end
  540. end
  541.  
  542. for _,v in pairs(PlrGui:GetChildren()) do
  543. if v.Name == "PadsGui" then
  544. v:Destroy()
  545. end
  546. end
  547.  
  548. LS = Instance.new("Weld")
  549. RS = Instance.new("Weld")
  550.  
  551. LS.Name = OrigLS.Name
  552. LS.Part0 = Torso
  553. LS.Part1 = LA
  554. LS.C0 = LS0
  555. LS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  556.  
  557. RS.Name = OrigRS.Name
  558. RS.Part0 = Torso
  559. RS.Part1 = RA
  560. RS.C0 = RS0
  561. RS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  562.  
  563. local Pads = MakePads()
  564. local LPad = Pads.LBase
  565. local RPad = Pads.RBase
  566.  
  567. weldModel(LPad, true, LPad)
  568. weldModel(RPad, true, RPad)
  569.  
  570. local GripWeldL = Instance.new("Weld")
  571. GripWeldL.Name = "GripWeldL"
  572. GripWeldL.Part0 = LA
  573. GripWeldL.Part1 = LPad
  574. GripWeldL.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  575. GripWeldL.Parent = LA
  576.  
  577. local GripWeldR = Instance.new("Weld")
  578. GripWeldR.Name = "GripWeldR"
  579. GripWeldR.Part0 = RA
  580. GripWeldR.Part1 = RPad
  581. GripWeldR.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  582. GripWeldR.Parent = RA
  583.  
  584. local isParts = false
  585.  
  586. table.insert(Cons, Mouse.KeyDown:connect(function(Key)
  587. Key = Key:lower()
  588. if Key == "z" then
  589. --Stuff
  590. elseif Key == "f" then
  591. local Current = Current.Part
  592. if Current and Current.Parent ~= nil and not Multi then
  593. Current:BreakJoints()
  594. end
  595. elseif Key == "q" then
  596. if isParts then
  597. isParts = false
  598. for _,v in pairs(Workspace:GetChildren()) do
  599. if v.Name == "MyPartV" and v:IsA("BasePart") then
  600. v:Destroy()
  601. end
  602. end
  603. else
  604. isParts = true
  605. for i = 1, 50 do
  606. local Part = Instance.new("Part")
  607. Part.Color = Color3.new(math.random(), math.random(), math.random())
  608. Part.Transparency = 0
  609. Part.Size = Vector3.new(math.random(1, 3), math.random(1, 3), math.random(1, 3))
  610. Part.Archivable = true
  611. Part.CanCollide = false
  612. Part.Material = "Neon"
  613. Part.Locked = false
  614. Part.CFrame = Torso.CFrame * CFrame.new(math.random(-15, 15), -1, math.random(-15, 15))
  615. Part.Anchored = true
  616. Part.Name = "MyPartV"
  617. Part.TopSurface = "Smooth"
  618. Part.BottomSurface = "Smooth"
  619. Part.Parent = Workspace
  620. end
  621. end
  622. elseif Key == "e" then
  623. local Targ;
  624. if Current.Part and Current.Part ~= nil then
  625. Targ = getTargFromCurrent()
  626. else
  627. Targ = LastPart
  628. end
  629. if Targ and Targ.Parent ~= nil and not Multi then
  630. local Ex = Instance.new("Explosion", Workspace)
  631. Ex.Position = Targ.CFrame.p
  632. Ex.BlastRadius = 16
  633. Ex.DestroyJointRadiusPercent = 0.5
  634. end
  635. elseif Key == "c" then
  636. if Current.Part and Current.Part.Parent ~= nil and not Multi then
  637. local Part = getTargFromCurrent()
  638. if Part then
  639. Grabbing = false
  640. if Mouse.Hit then
  641. local TargPos = CFrame.new(Camera.CoordinateFrame.p, Mouse.Hit.p) * CFrame.new(0, 0, -1000)
  642. Fire(Part, TargPos.p)
  643. else
  644. Fire(Part, Mouse.Origin.p + Mouse.UnitRay.Direction, true)
  645. end
  646. end
  647. end
  648. end
  649. end))
  650.  
  651. table.insert(Cons, Mouse.Button1Up:connect(function()
  652. mDown = false
  653. if Grabbing == true and Multi == false then
  654. Grabbing = false
  655. Reset()
  656. end
  657. if Current.Part ~= nil then
  658. LastPart = getTargFromCurrent()
  659. Current = {}
  660. end
  661. end))
  662.  
  663. local function makeLightning(Par, Start, End, Width, Length, RandomScale, ArcScale, Num1)
  664. local oldParts = {}
  665. for _,v in pairs(Par:GetChildren()) do
  666. v.CFrame = CFrame.new(5e5, 5e5, 5e5)
  667. table.insert(oldParts, v)
  668. end
  669. local Distance = (Start-End).Magnitude
  670. local ArcScale = ArcScale or 1
  671. local RandomScale = RandomScale or 0
  672. local Last = Start
  673. local IterNum = 0
  674.  
  675. while Par.Parent do
  676. IterNum = IterNum + 1
  677. local New = nil
  678. if (Last-End).Magnitude < Length then
  679. New = CFrame.new(End)
  680. else
  681. if (End-Last).Magnitude < Length*2 then
  682. RandomScale = RandomScale*0.5
  683. ArcScale = ArcScale*0.5
  684. end
  685. local Direct = CFrame.new(Last,End)
  686. New = Direct*CFrame.Angles(math.rad(math.random(-RandomScale/4,RandomScale*ArcScale)),math.rad(math.random(-RandomScale,RandomScale)),math.rad(math.random(-RandomScale,RandomScale)))
  687. New = New*CFrame.new(0,0,-Length)
  688. end
  689. local Trail = nil
  690. if oldParts[IterNum] then
  691. Trail = oldParts[IterNum]
  692. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("Cyan")
  693. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  694. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  695. oldParts[IterNum] = nil
  696. else
  697. Trail = Instance.new("Part")
  698. Trail.Name = "Part"
  699. Trail.FormFactor = "Custom"
  700. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  701. Trail.Transparency = 0
  702. Trail.Anchored = true
  703. Trail.CanCollide = false
  704. Trail.Locked = true
  705. Trail.BackSurface = "SmoothNoOutlines"
  706. Trail.BottomSurface = "SmoothNoOutlines"
  707. Trail.FrontSurface = "SmoothNoOutlines"
  708. Trail.LeftSurface = "SmoothNoOutlines"
  709. Trail.RightSurface = "SmoothNoOutlines"
  710. Trail.TopSurface = "SmoothNoOutlines"
  711. Trail.Material = "Neon"
  712. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  713. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  714. Trail.Parent = Par
  715. end
  716. Last = New.p
  717. if (Last-End).Magnitude < 1 then
  718. break
  719. end
  720. end
  721. for _,v in pairs(oldParts) do
  722. v:Destroy()
  723. end
  724. end
  725.  
  726. table.insert(Cons, Mouse.Button1Down:connect(function()
  727. mDown = true
  728. local Targ = Mouse.Target
  729. Cor(function()
  730. if Targ and Objects[Targ] and not Multi then
  731. Grabbing = true
  732. Current.Part = Targ
  733. local Mass = Objects[Targ]
  734. local ForceNum = 0
  735. local Hum = nil
  736.  
  737. for _,v in pairs(Targ:GetChildren()) do
  738. if BodyObjects[v.ClassName] then
  739. v:Destroy()
  740. end
  741. end
  742.  
  743. for _,v in pairs(Workspace:GetChildren()) do
  744. if v:findFirstChild("Humanoid") and v:IsAncestorOf(Targ) then
  745. Hum = v.Humanoid
  746. Mass = getMass(v, 0)
  747. Current.Part = v
  748. break
  749. end
  750. end
  751.  
  752. Current.Mass = Mass
  753.  
  754. if not Hum then
  755. Targ:BreakJoints()
  756. end
  757.  
  758. ForceNum = Mass * Grav
  759. Targ.CanCollide = true
  760. Targ.Anchored = false
  761.  
  762. local BP = Instance.new("BodyPosition")
  763. BP.maxForce = Vector3.new(3 * ForceNum, 3 * ForceNum, 3 * ForceNum)
  764. BP.Parent = Targ
  765.  
  766. local Ang = Instance.new("BodyAngularVelocity")
  767. Ang.Parent = Targ
  768.  
  769. Current.BP = BP
  770. Current.BA = Ang
  771.  
  772. OrigLS.Parent = nil
  773. OrigRS.Parent = nil
  774.  
  775. LS.Parent = Torso
  776. RS.Parent = Torso
  777.  
  778. LS.C0 = LS0
  779. RS.C0 = RS0
  780.  
  781. local DirDot = Mouse.UnitRay.Direction:Dot(Targ.Position - Mouse.Origin.p)
  782. local BPPos = Vector3.new(0, 0, 0)
  783. local Vel = Vector3.new(0, 0, 0)
  784. local Vlev = random() * math.pi
  785. local RPos = Vector3.new(random() * 2 - 1, cos(Vlev), random() * 2 - 1)
  786.  
  787. local Ball = Instance.new("Part")
  788. Ball.Name = "Ball"
  789. Ball.FormFactor = "Custom"
  790. Ball.Color = Color3.new(0, 1, 1)
  791. Ball.Transparency = 0.3
  792. Ball.Anchored = true
  793. Ball.CanCollide = false
  794. Ball.Locked = true
  795. Ball.BottomSurface, Ball.TopSurface = "Smooth", "Smooth"
  796. Ball.Size = Vector3.new(0.5, 0.5, 0.5)
  797. Ball.CFrame = Torso.CFrame * CFrame.new(0, 1, -3)
  798. Ball.Parent = Char
  799.  
  800. if Targ.Name == "MyPartV" then
  801. Targ.Name = "MyPartF"
  802. end
  803.  
  804. local LightMod = Instance.new("Model", Char)
  805.  
  806. local Mesh = Instance.new("SpecialMesh")
  807. Mesh.MeshType = "Sphere"
  808. Mesh.Parent = Ball
  809.  
  810. local Size = 0.5
  811. local Rise = true
  812.  
  813. while Grabbing and BP and Ang and Targ.Parent ~= nil do
  814. local BPPos = Mouse.Origin.p + Mouse.UnitRay.Direction * DirDot
  815. Ang.angularvelocity = Vel
  816. BP.position = BPPos + RPos
  817. RPos = Vector3.new(max(-1, min(RPos.x + random() * 0.02 - 0.01, 1)), cos(Vlev), max(-1, min(RPos.z + random() * 0.02 - 0.01, 1)))
  818. Vel = Vector3.new(max(-1, min(Vel.x + random() * 0.2 - 0.1, 1)), max(-1, min(Vel.y + random() * 0.2 - 0.1, 1)), max(-1, min(Vel.z + random() * 0.2 - 0.1, 1)))
  819. Vlev = (Vlev + 0.05) % tau
  820.  
  821. if Hum then
  822. Hum.Sit = true
  823. end
  824.  
  825. if LA.Parent ~= nil and RA.Parent ~= nil then
  826. local LPos = (LA.CFrame * CFrame.new(0, -1, 0)).p
  827. local RPos = (RA.CFrame * CFrame.new(0, -1, 0)).p
  828. if Rise == true then
  829. if Size < 0.6 then
  830. Size = Size + 0.05
  831. else
  832. Size = Size + 0.1
  833. end
  834. if Size >= 2.2 then
  835. Rise = false
  836. end
  837. else
  838. if Size > 2.1 then
  839. Size = Size - 0.05
  840. else
  841. Size = Size - 0.1
  842. end
  843. if Size <= 0.5 then
  844. Rise = true
  845. end
  846. end
  847. Ball.Size = Vector3.new(Size, Size, Size)
  848. Ball.CFrame = CFrame.new(LPos:Lerp(RPos, 0.5), Targ.Position) * CFrame.new(0, 0, -2.2)
  849. LightNum = LightNum + 1
  850. makeLightning(LightMod, Ball.Position, Targ.Position, 0.2, 4, 50, 1, LightNum)
  851. elseif Ball.Parent ~= nil then
  852. Ball:Destroy()
  853. end
  854.  
  855. if LS and LS.Parent == Torso then
  856. LS.C0 = CFrame.new(Vector3.new(-1.5, 0.5, 0), Torso.CFrame:pointToObjectSpace((Targ.CFrame or Torso.CFrame * CFrame.new(-1.5, 0.5, 1)).p))
  857. end
  858. if RS and RS.Parent == Torso then
  859. RS.C0 = CFrame.new(Vector3.new(1.5, 0.5, 0), Torso.CFrame:pointToObjectSpace((Targ.CFrame or Torso.CFrame * CFrame.new(1.5, 0.5, 1)).p))
  860. end
  861. RunService.Heartbeat:wait()
  862. end
  863.  
  864. coroutine.resume(coroutine.create(function()
  865. for i = 0.5, 1, 0.1 do
  866. for i2,v in pairs(LightMod:GetChildren()) do
  867. --v.Light.Range = 6-(i*5)
  868. v.Transparency = i
  869. end
  870. wait(1/30)
  871. end
  872. LightMod:Destroy()
  873. end))
  874.  
  875. if BP and BP.Parent ~= nil then
  876. BP:Destroy()
  877. end
  878.  
  879. if Ang and Ang.Parent ~= nil then
  880. Ang:Destroy()
  881. end
  882.  
  883. pcall(function() Ball:Destroy() end)
  884. end
  885. end)
  886. end))
  887. end)
  888. end
  889.  
  890. function Add(Obj)
  891. if Obj:IsA("BasePart") and not Objects[Obj] and not (Obj.Name == "Base" and Obj.ClassName == "Part") then
  892. Objects[Obj] = Obj:GetMass()
  893. Obj.Changed:connect(function(P)
  894. if P:lower() == "size" and Objects[Obj] and Obj.Parent ~= nil then
  895. Objects[Obj] = Obj:GetMass()
  896. end
  897. end)
  898. end
  899. end
  900.  
  901. function Rem(Obj)
  902. if Objects[Obj] then
  903. Objects[Obj] = nil
  904. end
  905. end
  906.  
  907. function Recursion(Obj)
  908. ypcall(function()
  909. Add(Obj)
  910. if #Obj:GetChildren() > 0 then
  911. for _,v in pairs(Obj:GetChildren()) do
  912. Recursion(v)
  913. end
  914. end
  915. end)
  916. end
  917.  
  918. Workspace.DescendantAdded:connect(function(Obj)
  919. Add(Obj)
  920. end)
  921.  
  922. Workspace.DescendantRemoving:connect(function(Obj)
  923. Rem(Obj)
  924. end)
  925.  
  926. for _,v in pairs(Workspace:GetChildren()) do
  927. Recursion(v)
  928. end
  929.  
  930. Start()
  931.  
  932. if LP.Name == PlrName then
  933. LP.CharacterAdded:connect(Start)
  934. end
  935.  
  936. local verlet = {}
  937. verlet.step_time = 1 / 50
  938. verlet.gravity = Vector3.new(0, -10, 0)
  939.  
  940. local char = game.Players.LocalPlayer.Character
  941. local torso = char:WaitForChild("Torso")
  942. local parts = {}
  943. local render = game:GetService("RunService").RenderStepped
  944.  
  945. wait(2)
  946.  
  947. local point = {}
  948. local link = {}
  949. local rope = {}
  950.  
  951. local function ccw(A,B,C)
  952. return (C.y-A.y) * (B.x-A.x) > (B.y-A.y) * (C.x-A.x)
  953. end
  954.  
  955. local function intersect(A,B,C,D)
  956. return ccw(A,C,D) ~= ccw(B,C,D) and ccw(A,B,C) ~= ccw(A,B,D)
  957. end
  958.  
  959. local function vec2(v)
  960. return Vector2.new(v.x, v.z)
  961. end
  962.  
  963. function point:step()
  964. if not self.fixed then
  965. local derivative = (self.position - self.last_position) * 0.95
  966. self.last_position = self.position
  967. self.position = self.position + derivative + (self.velocity * verlet.step_time ^ 2)
  968. --[[local torsoP = torso.CFrame * CFrame.new(-1, 0, 0.5)
  969. local torsoE = torso.CFrame * CFrame.new(1, 0, 0.5)
  970. local pointE = self.position + torso.CFrame.lookVector * 100
  971. local doIntersect = intersect(vec2(torsoP.p), vec2(torsoE.p), vec2(self.position), vec2(pointE))
  972. if not doIntersect then
  973. self.postition = self.position - torso.CFrame.lookVector * 10
  974. end]]
  975. end
  976. end
  977.  
  978. function link:step()
  979. for i = 1, 1 do
  980. local distance = self.point1.position - self.point2.position
  981. local magnitude = distance.magnitude
  982. local differance = (self.length - magnitude) / magnitude
  983. local translation = ((self.point1.fixed or self.point2.fixed) and 1 or 0.6) * distance * differance
  984. if not self.point1.fixed then
  985. self.point1.position = self.point1.position + translation
  986. end
  987. if not self.point2.fixed then
  988. self.point2.position = self.point2.position - translation
  989. end
  990. end
  991. end
  992.  
  993. function verlet.new(class, a, b, c)
  994. if class == "Point" then
  995. local new = {}
  996. setmetatable(new, {__index = point})
  997. new.class = class
  998. new.position = a or Vector3.new()
  999. new.last_position = new.position
  1000. new.velocity = verlet.gravity
  1001. new.fixed = false
  1002. return new
  1003. elseif class == "Link" then
  1004. local new = {}
  1005. setmetatable(new, {__index = link})
  1006. new.class = class
  1007. new.point1 = a
  1008. new.point2 = b
  1009. new.length = c or (a.position - b.position).magnitude
  1010. return new
  1011. elseif class == "Rope" then
  1012. local new = {}
  1013. setmetatable(new, {__index = link})
  1014. new.class = class
  1015. new.start_point = a
  1016. new.finish_point = b
  1017. new.points = {}
  1018. new.links = {}
  1019. local inc = (b - a) / 10
  1020. for i = 0, 10 do
  1021. table.insert(new.points, verlet.new("Point", a + (i * inc)))
  1022. end
  1023. for i = 2, #new.points do
  1024. table.insert(new.links, verlet.new("Link", new.points[i - 1], new.points[i]))
  1025. end
  1026. return new
  1027. end
  1028. end
  1029.  
  1030. local tris = {}
  1031. local triParts = {}
  1032.  
  1033. local function GetDiscoColor(hue)
  1034. local section = hue % 1 * 3
  1035. local secondary = 0.5 * math.pi * (section % 1)
  1036. if section < 1 then
  1037. return Color3.new(0, 0, 0)
  1038. elseif section < 2 then
  1039. return Color3.new(0, 0, 0)
  1040. else
  1041. return Color3.new(0, 0, 0)
  1042. end
  1043. end
  1044.  
  1045. local function setupPart(part)
  1046. part.Anchored = true
  1047. part.FormFactor = 3
  1048. part.CanCollide = false
  1049. part.TopSurface = 10
  1050. part.BottomSurface = 10
  1051. part.LeftSurface = 10
  1052. part.RightSurface = 10
  1053. part.FrontSurface = 10
  1054. part.BackSurface = 10
  1055. part.Material = "Neon"
  1056. local m = Instance.new("SpecialMesh", part)
  1057. m.MeshType = "Wedge"
  1058. m.Scale = Vector3.new(0.2, 1, 1)
  1059. return part
  1060. end
  1061.  
  1062. local function CFrameFromTopBack(at, top, back)
  1063. local right = top:Cross(back)
  1064. return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  1065. end
  1066.  
  1067. local function drawTri(parent, a, b, c)
  1068. local this = {}
  1069. local mPart1 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  1070. local mPart2 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  1071. function this:Set(a, b, c)
  1072. local ab, bc, ca = b-a, c-b, a-c
  1073. local abm, bcm, cam = ab.magnitude, bc.magnitude, ca.magnitude
  1074. local edg1 = math.abs(0.5 + ca:Dot(ab)/(abm*abm))
  1075. local edg2 = math.abs(0.5 + ab:Dot(bc)/(bcm*bcm))
  1076. local edg3 = math.abs(0.5 + bc:Dot(ca)/(cam*cam))
  1077. if edg1 < edg2 then
  1078. if edg1 >= edg3 then
  1079. a, b, c = c, a, b
  1080. ab, bc, ca = ca, ab, bc
  1081. abm = cam
  1082. end
  1083. else
  1084. if edg2 < edg3 then
  1085. a, b, c = b, c, a
  1086. ab, bc, ca = bc, ca, ab
  1087. abm = bcm
  1088. else
  1089. a, b, c = c, a, b
  1090. ab, bc, ca = ca, ab, bc
  1091. abm = cam
  1092. end
  1093. end
  1094.  
  1095. local len1 = -ca:Dot(ab)/abm
  1096. local len2 = abm - len1
  1097. local width = (ca + ab.unit*len1).magnitude
  1098.  
  1099. local maincf = CFrameFromTopBack(a, ab:Cross(bc).unit, -ab.unit)
  1100.  
  1101. if len1 > 0.2 then
  1102. mPart1.Parent = parent
  1103. mPart1.Size = Vector3.new(0.2, width, len1)
  1104. mPart1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  1105. else
  1106. mPart1.Parent = nil
  1107. end
  1108.  
  1109. if len2 > 0.2 then
  1110. mPart2.Parent = parent
  1111. mPart2.Size = Vector3.new(0.2, width, len2)
  1112. mPart2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1113. else
  1114. mPart2.Parent = nil
  1115. end
  1116. end
  1117. function this:SetProperty(prop, value)
  1118. mPart1[prop] = value
  1119. mPart2[prop] = value
  1120. end
  1121. this:Set(a, b, c)
  1122. function this:Destroy()
  1123. mPart1:Destroy()
  1124. mPart2:Destroy()
  1125. end
  1126. this.p1 = mPart1
  1127. this.p2 = mPart2
  1128. this.p1.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p1.CFrame.Y * 0.5 + time())))
  1129. this.p2.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p2.CFrame.Y * 0.5 + time())))
  1130. return this
  1131. end
  1132.  
  1133. function verlet.draw(object, id)
  1134. if object.class == "Point" then
  1135. local part = parts[id]
  1136. part.BrickColor = BrickColor.new(107, 0, 107)
  1137. part.Transparency = 0
  1138. part.formFactor = 3
  1139. part.Anchored = true
  1140. part.CanCollide = false
  1141. part.TopSurface = 0
  1142. part.BottomSurface = 0
  1143. part.Size = Vector3.new(0.35, 0.35, 0.35)
  1144. part.Material = "Neon"
  1145. part.CFrame = CFrame.new(object.position)
  1146. part.Parent = torso
  1147. return part
  1148. elseif object.class == "Link" then
  1149. local part = parts[id]
  1150. local dist = (object.point1.position - object.point2.position).magnitude
  1151. part.Size = Vector3.new(0.2, 0.2, dist)
  1152. part.CFrame = CFrame.new(object.point1.position, object.point2.position) * CFrame.new(0, 0, dist * -0.5)
  1153. part.Parent = torso
  1154. return part
  1155. end
  1156. end
  1157.  
  1158. function verlet.clear()
  1159. for _, v in pairs(workspace:GetChildren()) do
  1160. if v.Name == "Part" then
  1161. v:Destroy()
  1162. end
  1163. end
  1164. end
  1165.  
  1166. local points = {}
  1167. local links = {}
  1168.  
  1169. for x = 0, 2 do
  1170. points[x] = {}
  1171. for y = 0, 3 do
  1172. points[x][y] = verlet.new("Point", torso.Position + Vector3.new(x * 0.8 - 2, 2 - y * 0.8, 5 + y * 0.4))
  1173. points[x][y].fixed = y == 0
  1174. end
  1175. end
  1176.  
  1177. for x = 1, 2 do
  1178. for y = 0, 3 do
  1179. links[#links + 1] = verlet.new("Link", points[x][y], points[x - 1][y], 1 + y * 0.08)
  1180. end
  1181. end
  1182.  
  1183. for x = 0, 2 do
  1184. for y = 1, 3 do
  1185. links[#links + 1] = verlet.new("Link", points[x][y], points[x][y - 1], 1.2 + y * 0.03)
  1186. end
  1187. end
  1188.  
  1189. render:connect(function()
  1190. for x = 0, 2 do
  1191. for y = 0, 3 do
  1192. if y == 0 then
  1193. points[x][y].position = (torso.CFrame * CFrame.new(x * 1 - 1, 1, 0.5)).p
  1194. else
  1195. points[x][y]:step()
  1196. end
  1197. end
  1198. end
  1199. for i = 1, #links do
  1200. links[i]:step()
  1201. end
  1202. for i = 1, #tris do
  1203. triParts[#triParts + 1] = tris[i].p1
  1204. triParts[#triParts + 1] = tris[i].p2
  1205. end
  1206. tris = {}
  1207. for x = 1, 2 do
  1208. for y = 1, 3 do
  1209. tris[#tris + 1] = drawTri(torso, points[x - 1][y - 1].position, points[x - 1][y].position, points[x][y - 1].position)
  1210. tris[#tris + 1] = drawTri(torso, points[x][y].position, points[x - 1][y].position, points[x][y - 1].position)
  1211. end
  1212. end
  1213. end)
  1214.  
  1215. --[[Modified by Sol/Citrus for less tangling]]--
  1216.  
  1217. local verlet = {}
  1218. verlet.step_time = 1 / 50
  1219. verlet.gravity = Vector3.new(0, -150, 0) --//
  1220.  
  1221. local char = game.Players.LocalPlayer.Character
  1222. local torso = char:WaitForChild("Torso")
  1223. local parts = {}
  1224. local render = game:GetService("RunService").RenderStepped
  1225.  
  1226. wait(2)
  1227.  
  1228. local point = {}
  1229. local link = {}
  1230. local rope = {}
  1231.  
  1232. local function ccw(A,B,C)
  1233. return (C.y-A.y) * (B.x-A.x) > (B.y-A.y) * (C.x-A.x)
  1234. end
  1235.  
  1236. local function intersect(A,B,C,D)
  1237. return ccw(A,C,D) ~= ccw(B,C,D) and ccw(A,B,C) ~= ccw(A,B,D)
  1238. end
  1239.  
  1240. local function vec2(v)
  1241. return Vector2.new(v.x, v.z)
  1242. end
  1243.  
  1244. function point:step()
  1245. if not self.fixed then
  1246. local derivative = (self.position - self.last_position) * 0.95
  1247. self.last_position = self.position
  1248. self.position = self.position + derivative + ((verlet.gravity + (torso.CFrame.lookVector * -90)) * verlet.step_time ^ 2) --//
  1249. --[[local torsoP = torso.CFrame * CFrame.new(-1, 0, 0.5)
  1250. local torsoE = torso.CFrame * CFrame.new(1, 0, 0.5)
  1251. local pointE = self.position + torso.CFrame.lookVector * 100
  1252. local doIntersect = intersect(vec2(torsoP.p), vec2(torsoE.p), vec2(self.position), vec2(pointE))
  1253. if not doIntersect then
  1254. self.postition = self.position - torso.CFrame.lookVector * 10
  1255. end]]
  1256. end
  1257. end
  1258.  
  1259. function link:step()
  1260. for i = 1, 1 do
  1261. local distance = self.point1.position - self.point2.position
  1262. local magnitude = distance.magnitude
  1263. local differance = (self.length - magnitude) / magnitude
  1264. local translation = ((self.point1.fixed or self.point2.fixed) and 1 or 0.6) * distance * differance
  1265. if not self.point1.fixed then
  1266. self.point1.position = self.point1.position + translation
  1267. end
  1268. if not self.point2.fixed then
  1269. self.point2.position = self.point2.position - translation
  1270. end
  1271. end
  1272. end
  1273.  
  1274. function verlet.new(class, a, b, c)
  1275. if class == "Point" then
  1276. local new = {}
  1277. setmetatable(new, {__index = point})
  1278. new.class = class
  1279. new.position = a or Vector3.new()
  1280. new.last_position = new.position
  1281. new.velocity = verlet.gravity
  1282. new.fixed = false
  1283. return new
  1284. elseif class == "Link" then
  1285. local new = {}
  1286. setmetatable(new, {__index = link})
  1287. new.class = class
  1288. new.point1 = a
  1289. new.point2 = b
  1290. new.length = c or (a.position - b.position).magnitude
  1291. return new
  1292. elseif class == "Rope" then
  1293. local new = {}
  1294. setmetatable(new, {__index = link})
  1295. new.class = class
  1296. new.start_point = a
  1297. new.finish_point = b
  1298. new.points = {}
  1299. new.links = {}
  1300. local inc = (b - a) / 10
  1301. for i = 0, 10 do
  1302. table.insert(new.points, verlet.new("Point", a + (i * inc)))
  1303. end
  1304. for i = 2, #new.points do
  1305. table.insert(new.links, verlet.new("Link", new.points[i - 1], new.points[i]))
  1306. end
  1307. return new
  1308. end
  1309. end
  1310.  
  1311. local tris = {}
  1312. local triParts = {}
  1313.  
  1314. local function GetDiscoColor(hue)
  1315. local section = hue % 1 * 3
  1316. local secondary = 0.5 * math.pi * (section % 1)
  1317. if section < 1 then
  1318. return Color3.new(1, 1 - math.cos(secondary), 1 - math.sin(secondary))
  1319. elseif section < 2 then
  1320. return Color3.new(1 - math.sin(secondary), 1, 1 - math.cos(secondary))
  1321. else
  1322. return Color3.new(1 - math.cos(secondary), 1 - math.sin(secondary), 1)
  1323. end
  1324. end
  1325.  
  1326. local function setupPart(part)
  1327. part.Anchored = true
  1328. part.FormFactor = 3
  1329. part.CanCollide = false
  1330. part.TopSurface = 10
  1331. part.BottomSurface = 10
  1332. part.LeftSurface = 10
  1333. part.RightSurface = 10
  1334. part.FrontSurface = 10
  1335. part.BackSurface = 10
  1336. part.Material = "Neon"
  1337. local m = Instance.new("SpecialMesh", part)
  1338. m.MeshType = "Wedge"
  1339. m.Scale = Vector3.new(0.2, 1, 1)
  1340. return part
  1341. end
  1342.  
  1343. local function CFrameFromTopBack(at, top, back)
  1344. local right = top:Cross(back)
  1345. return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  1346. end
  1347.  
  1348. local function drawTri(parent, a, b, c)
  1349. local this = {}
  1350. local mPart1 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  1351. local mPart2 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  1352. function this:Set(a, b, c)
  1353. local ab, bc, ca = b-a, c-b, a-c
  1354. local abm, bcm, cam = ab.magnitude, bc.magnitude, ca.magnitude
  1355. local edg1 = math.abs(0.5 + ca:Dot(ab)/(abm*abm))
  1356. local edg2 = math.abs(0.5 + ab:Dot(bc)/(bcm*bcm))
  1357. local edg3 = math.abs(0.5 + bc:Dot(ca)/(cam*cam))
  1358. if edg1 < edg2 then
  1359. if edg1 >= edg3 then
  1360. a, b, c = c, a, b
  1361. ab, bc, ca = ca, ab, bc
  1362. abm = cam
  1363. end
  1364. else
  1365. if edg2 < edg3 then
  1366. a, b, c = b, c, a
  1367. ab, bc, ca = bc, ca, ab
  1368. abm = bcm
  1369. else
  1370. a, b, c = c, a, b
  1371. ab, bc, ca = ca, ab, bc
  1372. abm = cam
  1373. end
  1374. end
  1375.  
  1376. local len1 = -ca:Dot(ab)/abm
  1377. local len2 = abm - len1
  1378. local width = (ca + ab.unit*len1).magnitude
  1379.  
  1380. local maincf = CFrameFromTopBack(a, ab:Cross(bc).unit, -ab.unit)
  1381.  
  1382. if len1 > 0.2 then
  1383. mPart1.Parent = parent
  1384. mPart1.Size = Vector3.new(0.2, width, len1)
  1385. mPart1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  1386. else
  1387. mPart1.Parent = nil
  1388. end
  1389.  
  1390. if len2 > 0.2 then
  1391. mPart2.Parent = parent
  1392. mPart2.Size = Vector3.new(0.2, width, len2)
  1393. mPart2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1394. else
  1395. mPart2.Parent = nil
  1396. end
  1397. end
  1398. function this:SetProperty(prop, value)
  1399. mPart1[prop] = value
  1400. mPart2[prop] = value
  1401. end
  1402. this:Set(a, b, c)
  1403. function this:Destroy()
  1404. mPart1:Destroy()
  1405. mPart2:Destroy()
  1406. end
  1407. this.p1 = mPart1
  1408. this.p2 = mPart2
  1409. this.p1.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p1.CFrame.Y * 0.5 + time())))
  1410. this.p2.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p2.CFrame.Y * 0.5 + time())))
  1411. return this
  1412. end
  1413.  
  1414. function verlet.draw(object, id)
  1415. if object.class == "Point" then
  1416. local part = parts[id]
  1417. part.BrickColor = BrickColor.new(1, 1, 1)
  1418. part.Transparency = 0
  1419. part.formFactor = 3
  1420. part.Anchored = true
  1421. part.CanCollide = false
  1422. part.TopSurface = 0
  1423. part.BottomSurface = 0
  1424. part.Size = Vector3.new(0.35, 0.35, 0.35)
  1425. part.Material = "Neon"
  1426. part.CFrame = CFrame.new(object.position)
  1427. part.Parent = torso
  1428. return part
  1429. elseif object.class == "Link" then
  1430. local part = parts[id]
  1431. local dist = (object.point1.position - object.point2.position).magnitude
  1432. part.Size = Vector3.new(0.2, 0.2, dist)
  1433. part.CFrame = CFrame.new(object.point1.position, object.point2.position) * CFrame.new(0, 0, dist * -0.5)
  1434. part.Parent = torso
  1435. return part
  1436. end
  1437. end
  1438.  
  1439. function verlet.clear()
  1440. for _, v in pairs(workspace:GetChildren()) do
  1441. if v.Name == "Part" then
  1442. v:Destroy()
  1443. end
  1444. end
  1445. end
  1446.  
  1447. local points = {}
  1448. local links = {}
  1449.  
  1450. for x = 0, 2 do
  1451. points[x] = {}
  1452. for y = 0, 3 do
  1453. points[x][y] = verlet.new("Point", torso.Position + Vector3.new(x * 0.8 - 2, 2 - y * 0.8, 5 + y * 0.4))
  1454. points[x][y].fixed = y == 0
  1455. end
  1456. end
  1457.  
  1458. for x = 1, 2 do
  1459. for y = 0, 3 do
  1460. links[#links + 1] = verlet.new("Link", points[x][y], points[x - 1][y], 1 + y * 0.08)
  1461. end
  1462. end
  1463.  
  1464. for x = 0, 2 do
  1465. for y = 1, 3 do
  1466. links[#links + 1] = verlet.new("Link", points[x][y], points[x][y - 1], 1.2 + y * 0.03)
  1467. end
  1468. end
  1469.  
  1470. render:connect(function()
  1471. for x = 0, 2 do
  1472. for y = 0, 3 do
  1473. if y == 0 then
  1474. points[x][y].position = (torso.CFrame * CFrame.new(x * 1 - 1, 1, 0.5)).p
  1475. else
  1476. points[x][y]:step()
  1477. end
  1478. end
  1479. end
  1480. for i = 1, #links do
  1481. links[i]:step()
  1482. end
  1483. for i = 1, #tris do
  1484. triParts[#triParts + 1] = tris[i].p1
  1485. triParts[#triParts + 1] = tris[i].p2
  1486. end
  1487. tris = {}
  1488. for x = 1, 2 do
  1489. for y = 1, 3 do
  1490. tris[#tris + 1] = drawTri(torso, points[x - 1][y - 1].position, points[x - 1][y].position, points[x][y - 1].position)
  1491. tris[#tris + 1] = drawTri(torso, points[x][y].position, points[x - 1][y].position, points[x][y - 1].position)
  1492. end
  1493. end
  1494. end)
  1495.  
  1496. wait(0.016666666666667)
  1497. Player = game:GetService("Players").LocalPlayer
  1498. Character = Player.Character
  1499. PlayerGui = Player.PlayerGui
  1500. Backpack = Player.Backpack
  1501. Torso = Character.Torso
  1502. Head = Character.Head
  1503. Humanoid = Character.Humanoid
  1504. LeftArm = Character["Left Arm"]
  1505. LeftLeg = Character["Left Leg"]
  1506. RightArm = Character["Right Arm"]
  1507. RightLeg = Character["Right Leg"]
  1508. LS = Torso["Left Shoulder"]
  1509. LH = Torso["Left Hip"]
  1510. RS = Torso["Right Shoulder"]
  1511. RH = Torso["Right Hip"]
  1512. Face = Head.face
  1513. Neck = Torso.Neck
  1514. it = Instance.new
  1515. attacktype = 1
  1516. vt = Vector3.new
  1517. cf = CFrame.new
  1518. euler = CFrame.fromEulerAnglesXYZ
  1519. angles = CFrame.Angles
  1520. cloaked = false
  1521. necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  1522. necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  1523. LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  1524. LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  1525. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  1526. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  1527. RootPart = Character.HumanoidRootPart
  1528. RootJoint = RootPart.RootJoint
  1529. RootCF = euler(-1.57, 0, 3.14)
  1530. attack = false
  1531. attackdebounce = false
  1532. deb = false
  1533. equipped = false
  1534. hand = false
  1535. MMouse = nil
  1536. combo = 0
  1537. mana = 0
  1538. trispeed = 0.2
  1539. attackmode = "none"
  1540. local idle = 0
  1541. local Anim = "Idle"
  1542. local gun = false
  1543. local shoot = false
  1544. player = nil
  1545. mana = 0
  1546. mouse = Player:GetMouse()
  1547. RSH = nil
  1548. RW = Instance.new("Weld")
  1549. LW = Instance.new("Weld")
  1550. RW.Name = "Right Shoulder"
  1551. LW.Name = "Left Shoulder"
  1552. LH = Torso["Left Hip"]
  1553. RH = Torso["Right Hip"]
  1554. TorsoColor = Torso.BrickColor
  1555. NoOutline = function(Part)
  1556. Part.TopSurface = 10
  1557. end
  1558.  
  1559. player = Player
  1560. ch = Character
  1561. RSH = ch.Torso["Right Shoulder"]
  1562. LSH = ch.Torso["Left Shoulder"]
  1563. RSH.Parent = Player.Character.Torso
  1564. LSH.Parent = Player.Character.Torso
  1565. RW.Name = "Right Shoulder"
  1566. RW.Part0 = ch.Torso
  1567. RW.C0 = cf(1.5, 0.5, 0)
  1568. RW.C1 = cf(0, 0.5, 0)
  1569. RW.Part1 = ch["Right Arm"]
  1570. RW.Parent = nil
  1571. LW.Name = "Left Shoulder"
  1572. LW.Part0 = ch.Torso
  1573. LW.C0 = cf(-1.5, 0.5, 0)
  1574. LW.C1 = cf(0, 0.5, 0)
  1575. LW.Part1 = ch["Left Arm"]
  1576. LW.Parent = nil
  1577. Player = game:GetService("Players").LocalPlayer
  1578. Character = Player.Character
  1579. Mouse = Player:GetMouse()
  1580. m = Instance.new("Model", Character)
  1581. local Player = game.Players.localPlayer
  1582. local Character = Player.Character
  1583. local Humanoid = Character.Humanoid
  1584. local mouse = Player:GetMouse()
  1585. local LeftArm = Character["Left Arm"]
  1586. local RightArm = Character["Right Arm"]
  1587. local LeftLeg = Character["Left Leg"]
  1588. local RightLeg = Character["Right Leg"]
  1589. local Head = Character.Head
  1590. local Torso = Character.Torso
  1591. local cam = game.Workspace.CurrentCamera
  1592. local RootPart = Character.HumanoidRootPart
  1593. local equipped = false
  1594. local attack = false
  1595. local Anim = "Idle"
  1596. local idle = 0
  1597. local sprint = false
  1598. local battlestance = false
  1599. local attacktype = 1
  1600. local state = "none"
  1601. local torsovelocity = RootPart.Velocity * Vector3.new(1, 0, 1).magnitude
  1602. local velocity = RootPart.Velocity.y
  1603. local sine = 0
  1604. local change = 1
  1605. local on = false
  1606. local grabbed = false
  1607. local skill1 = false
  1608. local skill2 = false
  1609. local skill3 = false
  1610. local skill4 = false
  1611. local cooldown1 = 0
  1612. local cooldown2 = 0
  1613. local cooldown3 = 0
  1614. local cooldown4 = 0
  1615. local co1 = 0
  1616. local co2 = 0
  1617. local co3 = 0
  1618. local co4 = 0
  1619. local inputserv = game:GetService("UserInputService")
  1620. local typing = false
  1621. local crit = false
  1622. local critchance = 2
  1623. local critdamageaddmin = 3
  1624. local critdamageaddmax = 7
  1625. local maxstamina = 100
  1626. local stamina = 0
  1627. local skill1stam = 0
  1628. local skill2stam = 0
  1629. local skill3stam = 0
  1630. local skill4stam = 0
  1631. local recovermana = 3
  1632. local mindamage = 5
  1633. local maxdamage = 10
  1634. local cf = CFrame.new
  1635. local mr = math.rad
  1636. local angles = CFrame.Angles
  1637. local ud = UDim2.new
  1638. local c3 = Color3.new
  1639. local skillcolorscheme = c3(1, 1, 1)
  1640. local defensevalue = 1
  1641. local speedvalue = 1
  1642. local damagevalue = 1
  1643. local cf = CFrame.new
  1644. local mr = math.rad
  1645. local angles = CFrame.Angles
  1646. local ud = UDim2.new
  1647. local c3 = Color3.new
  1648. local skillcolorscheme = c3(1, 1, 1)
  1649. local scrn = Instance.new("ScreenGui", Player.PlayerGui)
  1650. makeframe = function(par, trans, pos, size, color)
  1651. local frame = Instance.new("Frame", par)
  1652. frame.BackgroundTransparency = trans
  1653. frame.BorderSizePixel = 0
  1654. frame.Position = pos
  1655. frame.Size = size
  1656. frame.BackgroundColor3 = color
  1657. return frame
  1658. end
  1659.  
  1660. makelabel = function(par, text)
  1661. local label = Instance.new("TextLabel", par)
  1662. label.BackgroundTransparency = 1
  1663. label.Size = ud(1, 0, 1, 0)
  1664. label.Position = ud(0, 0, 0, 0)
  1665. label.TextColor3 = c3(255, 255, 255)
  1666. label.TextStrokeTransparency = 0
  1667. label.FontSize = Enum.FontSize.Size32
  1668. label.Font = Enum.Font.SourceSansBold
  1669. label.BorderSizePixel = 0
  1670. label.TextScaled = true
  1671. label.Text = text
  1672. end
  1673.  
  1674. local stats = Instance.new("Folder", Character)
  1675. stats.Name = "Stats"
  1676. local block = Instance.new("BoolValue", stats)
  1677. block.Name = "Block"
  1678. block.Value = false
  1679. local stun = Instance.new("BoolValue", stats)
  1680. stun.Name = "Stun"
  1681. stun.Value = false
  1682. local defense = Instance.new("NumberValue", stats)
  1683. defense.Name = "Defence"
  1684. defense.Value = defensevalue
  1685. local speed = Instance.new("NumberValue", stats)
  1686. speed.Name = "Speed"
  1687. speed.Value = speedvalue
  1688. local damagea = Instance.new("NumberValue", stats)
  1689. damagea.Name = "Damage"
  1690. damagea.Value = damagevalue
  1691. framesk1 = makeframe(scrn, 0.5, ud(0.13, 0, 0.56, 0), ud(0.08, 0, 0.06, 0), c3(1, 1, 0.5))
  1692. bar1 = makeframe(framesk1, 0.5, ud(0, 0, 0, 0), ud(1, 0, 1, 0), c3(1, 1, 0.5))
  1693. ammolabel = Instance.new("TextLabel", framesk1)
  1694. ammolabel.BackgroundTransparency = 1
  1695. ammolabel.Size = ud(1, 0, 1, 0)
  1696. ammolabel.Position = ud(0, 0, 0, 0)
  1697. ammolabel.TextColor3 = c3(255, 255, 255)
  1698. ammolabel.TextStrokeTransparency = 0
  1699. ammolabel.FontSize = Enum.FontSize.Size8
  1700. ammolabel.Font = Enum.Font.SourceSans
  1701. ammolabel.BorderSizePixel = 0
  1702. ammolabel.TextScaled = true
  1703. ammolabel.Text = "Speed [" .. speed.Value .. "]"
  1704. framesk2 = makeframe(scrn, 0.5, ud(0.13, 0, 0.63, 0), ud(0.08, 0, 0.06, 0), c3(1, 0.5, 1))
  1705. bar2 = makeframe(framesk2, 0.5, ud(0, 0, 0, 0), ud(1, 0, 1, 0), c3(0.5, 0.25, 0.25))
  1706. ammolabel2 = Instance.new("TextLabel", framesk2)
  1707. ammolabel2.BackgroundTransparency = 1
  1708. ammolabel2.Size = ud(1, 0, 1, 0)
  1709. ammolabel2.Position = ud(0, 0, 0, 0)
  1710. ammolabel2.TextColor3 = c3(255, 255, 255)
  1711. ammolabel2.TextStrokeTransparency = 0
  1712. ammolabel2.FontSize = Enum.FontSize.Size8
  1713. ammolabel2.Font = Enum.Font.SourceSans
  1714. ammolabel2.BorderSizePixel = 0
  1715. ammolabel2.TextScaled = true
  1716. ammolabel2.Text = "Damage [" .. damagea.Value .. "]"
  1717. framesk3 = makeframe(scrn, 0.5, ud(0.13, 0, 0.7, 0), ud(0.08, 0, 0.06, 0), c3(1, 0.5, 1))
  1718. bar3 = makeframe(framesk3, 0.5, ud(0, 0, 0, 0), ud(1, 0, 1, 0), c3(0.25, 0.25, 0.5))
  1719. ammolabel3 = Instance.new("TextLabel", framesk3)
  1720. ammolabel3.BackgroundTransparency = 1
  1721. ammolabel3.Size = ud(1, 0, 1, 0)
  1722. ammolabel3.Position = ud(0, 0, 0, 0)
  1723. ammolabel3.TextColor3 = c3(255, 255, 255)
  1724. ammolabel3.TextStrokeTransparency = 0
  1725. ammolabel3.FontSize = Enum.FontSize.Size8
  1726. ammolabel3.Font = Enum.Font.SourceSans
  1727. ammolabel3.BorderSizePixel = 0
  1728. ammolabel3.TextScaled = true
  1729. ammolabel3.Text = "Defense [" .. defense.Value .. "]"
  1730. animate = Character:findFirstChild("Animate")
  1731. animate.Disabled = false
  1732. CustomColor = BrickColor.new("Cool yellow")
  1733. Colorpart1 = Torso.BrickColor.r
  1734. Colorpart2 = Torso.BrickColor.g
  1735. Colorpart3 = Torso.BrickColor.b
  1736. local weldBetween = function(a, b)
  1737. local weldd = Instance.new("ManualWeld")
  1738. weldd.Part0 = a
  1739. weldd.Part1 = b
  1740. weldd.C0 = CFrame.new()
  1741. weldd.C1 = b.CFrame:inverse() * a.CFrame
  1742. weldd.Parent = a
  1743. return weldd
  1744. end
  1745.  
  1746. swait = function(num)
  1747. if num == 0 or num == nil then
  1748. game:service("RunService").Stepped:wait(0)
  1749. else
  1750. for i = 0, num do
  1751. game:service("RunService").Stepped:wait(0)
  1752. end
  1753. end
  1754. end
  1755.  
  1756. nooutline = function(part)
  1757. part.TopSurface = 10
  1758. end
  1759.  
  1760. part = function(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
  1761. local fp = it("Part")
  1762. fp.formFactor = formfactor
  1763. fp.Parent = parent
  1764. fp.Reflectance = reflectance
  1765. fp.Transparency = transparency
  1766. fp.CanCollide = false
  1767. fp.Locked = true
  1768. fp.BrickColor = BrickColor.new(tostring(brickcolor))
  1769. fp.Name = name
  1770. fp.Size = size
  1771. fp.Position = Character.Torso.Position
  1772. nooutline(fp)
  1773. fp.Material = material
  1774. fp:BreakJoints()
  1775. return fp
  1776. end
  1777.  
  1778. mesh = function(Mesh, part, meshtype, meshid, offset, scale)
  1779. local mesh = it(Mesh)
  1780. mesh.Parent = part
  1781. if Mesh == "SpecialMesh" then
  1782. mesh.MeshType = meshtype
  1783. mesh.MeshId = meshid
  1784. end
  1785. mesh.Offset = offset
  1786. mesh.Scale = scale
  1787. return mesh
  1788. end
  1789.  
  1790. weld = function(parent, part0, part1, c0, c1)
  1791. local weld = it("Weld")
  1792. weld.Parent = parent
  1793. weld.Part0 = part0
  1794. weld.Part1 = part1
  1795. weld.C0 = c0
  1796. weld.C1 = c1
  1797. return weld
  1798. end
  1799.  
  1800. fat = Instance.new("BindableEvent", script)
  1801. fat.Name = "Heartbeat"
  1802. script:WaitForChild("Heartbeat")
  1803. frame = 0.033333333333333
  1804. tf = 0
  1805. allowframeloss = false
  1806. tossremainder = false
  1807. lastframe = tick()
  1808. script.Heartbeat:Fire()
  1809. game:GetService("RunService").Heartbeat:connect(function(s, p)
  1810. tf = tf + s
  1811. if frame <= tf then
  1812. if allowframeloss then
  1813. script.Heartbeat:Fire()
  1814. lastframe = tick()
  1815. else
  1816. for i = 1, math.floor(tf / frame) do
  1817. script.Heartbeat:Fire()
  1818. end
  1819. lastframe = tick()
  1820. end
  1821. if tossremainder then
  1822. tf = 0
  1823. else
  1824. tf = tf - frame * math.floor(tf / frame)
  1825. end
  1826. end
  1827. end
  1828. )
  1829. if script.Parent.className ~= "HopperBin" then
  1830. Tool = Instance.new("HopperBin")
  1831. Tool.Parent = Backpack
  1832. Tool.Name = "Flying"
  1833. script.Parent = Tool
  1834. end
  1835. Bin = script.Parent
  1836. so = function(id, par, vol, pit)
  1837. coroutine.resume(coroutine.create(function()
  1838. local sou = Instance.new("Sound", par or workspace)
  1839. sou.Volume = vol
  1840. sou.Pitch = pit or 1
  1841. sou.SoundId = id
  1842. swait()
  1843. sou:play()
  1844. game:GetService("Debris"):AddItem(sou, 6)
  1845. end
  1846. ))
  1847. end
  1848.  
  1849. local CFrameFromTopBack = function(at, top, back)
  1850. local right = top:Cross(back)
  1851. return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  1852. end
  1853.  
  1854. Triangle = function(a, b, c)
  1855. local edg1 = c - a:Dot(b - a.unit)
  1856. local edg2 = a - b:Dot(c - b.unit)
  1857. local edg3 = b - c:Dot(a - c.unit)
  1858. if edg1 <= b - a.magnitude and edg1 >= 0 then
  1859. a = a
  1860. else
  1861. -- DECOMPILER ERROR at PC35: Overwrote pending register: R1 in 'AssignReg'
  1862.  
  1863. if edg2 <= c - b.magnitude and edg2 >= 0 then
  1864. a = b
  1865. else
  1866. -- DECOMPILER ERROR at PC46: Overwrote pending register: R2 in 'AssignReg'
  1867.  
  1868. -- DECOMPILER ERROR at PC47: Overwrote pending register: R1 in 'AssignReg'
  1869.  
  1870. if edg3 <= a - c.magnitude and edg3 >= 0 then
  1871. a = c
  1872. else
  1873. assert(false, "unreachable")
  1874. end
  1875. end
  1876. end
  1877. local len1 = c - a:Dot(b - a.unit)
  1878. local len2 = b - a.magnitude - len1
  1879. local width = a + b - a.unit * len1 - c.magnitude
  1880. local maincf = CFrameFromTopBack(a, b - a:Cross(c - b).unit, -b - a.unit)
  1881. local list = {}
  1882. local TrailColor = "Dark grey"
  1883. if len1 > 0.01 then
  1884. local w1 = Instance.new("WedgePart", m)
  1885. game:GetService("Debris"):AddItem(w1, 5)
  1886. w1.Material = "SmoothPlastic"
  1887. w1.FormFactor = "Custom"
  1888. w1.BrickColor = BrickColor.new(TrailColor)
  1889. w1.Transparency = 0
  1890. w1.Reflectance = 0
  1891. w1.Material = "SmoothPlastic"
  1892. w1.CanCollide = false
  1893. NoOutline(w1)
  1894. local sz = Vector3.new(0.2, width, len1)
  1895. w1.Size = sz
  1896. local sp = Instance.new("SpecialMesh", w1)
  1897. sp.MeshType = "Wedge"
  1898. sp.Scale = Vector3.new(0, 1, 1) * sz / w1.Size
  1899. w1:BreakJoints()
  1900. w1.Anchored = true
  1901. w1.Parent = workspace
  1902. w1.Transparency = 0.7
  1903. table.insert(Effects, {w1, "Disappear", 0.01})
  1904. w1.CFrame = maincf * CFrame.Angles(math.pi, 0, math.pi / 2) * CFrame.new(0, width / 2, len1 / 2)
  1905. table.insert(list, w1)
  1906. end
  1907. do
  1908. if len2 > 0.01 then
  1909. local w2 = Instance.new("WedgePart", m)
  1910. game:GetService("Debris"):AddItem(w2, 5)
  1911. w2.Material = "SmoothPlastic"
  1912. w2.FormFactor = "Custom"
  1913. w2.BrickColor = BrickColor.new(TrailColor)
  1914. w2.Transparency = 0
  1915. w2.Reflectance = 0
  1916. w2.Material = "SmoothPlastic"
  1917. w2.CanCollide = false
  1918. NoOutline(w2)
  1919. local sz = Vector3.new(0.2, width, len2)
  1920. w2.Size = sz
  1921. local sp = Instance.new("SpecialMesh", w2)
  1922. sp.MeshType = "Wedge"
  1923. sp.Scale = Vector3.new(0, 1, 1) * sz / w2.Size
  1924. w2:BreakJoints()
  1925. w2.Anchored = true
  1926. w2.Parent = workspace
  1927. w2.Transparency = 0.7
  1928. table.insert(Effects, {w2, "Disappear", 0.01})
  1929. w2.CFrame = maincf * CFrame.Angles(math.pi, math.pi, -math.pi / 2) * CFrame.new(0, width / 2, -len1 - len2 / 2)
  1930. table.insert(list, w2)
  1931. end
  1932. do
  1933. return unpack(list)
  1934. end
  1935. end
  1936. end
  1937.  
  1938. rayCast = function(Pos, Dir, Max, Ignore)
  1939. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1940. end
  1941.  
  1942. clerp = function(a, b, t)
  1943. return a:lerp(b, t)
  1944. end
  1945.  
  1946. QuaternionFromCFrame = function(cf)
  1947. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1948. local trace = m00 + m11 + m22
  1949. if trace > 0 then
  1950. local s = math.sqrt(1 + trace)
  1951. local recip = 0.5 / s
  1952. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  1953. else
  1954. do
  1955. local i = 0
  1956. if m00 < m11 then
  1957. i = 1
  1958. end
  1959. if i == 0 and m00 or m11 < m22 then
  1960. i = 2
  1961. end
  1962. if i == 0 then
  1963. local s = math.sqrt(m00 - m11 - m22 + 1)
  1964. local recip = 0.5 / s
  1965. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  1966. else
  1967. do
  1968. if i == 1 then
  1969. local s = math.sqrt(m11 - m22 - m00 + 1)
  1970. local recip = 0.5 / s
  1971. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  1972. else
  1973. do
  1974. if i == 2 then
  1975. local s = math.sqrt(m22 - m00 - m11 + 1)
  1976. local recip = 0.5 / s
  1977. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  1978. end
  1979. end
  1980. end
  1981. end
  1982. end
  1983. end
  1984. end
  1985. end
  1986.  
  1987. lerp = function(a, b, t)
  1988. return a:lerp(b, t)
  1989. end
  1990.  
  1991. QuaternionSlerp = function(a, b, t)
  1992. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  1993. local startInterp, finishInterp = nil, nil
  1994. if cosTheta >= 0.0001 then
  1995. if 1 - cosTheta > 0.0001 then
  1996. local theta = math.acos(cosTheta)
  1997. local invSinTheta = 1 / math.sin(theta)
  1998. startInterp = math.sin((1 - t) * theta) * invSinTheta
  1999. finishInterp = math.sin(t * theta) * invSinTheta
  2000. else
  2001. do
  2002. startInterp = 1 - t
  2003. finishInterp = t
  2004. if 1 + cosTheta > 0.0001 then
  2005. local theta = math.acos(-cosTheta)
  2006. local invSinTheta = 1 / math.sin(theta)
  2007. startInterp = math.sin((t - 1) * theta) * invSinTheta
  2008. finishInterp = math.sin(t * theta) * invSinTheta
  2009. else
  2010. do
  2011. startInterp = t - 1
  2012. finishInterp = t
  2013. 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
  2014. end
  2015. end
  2016. end
  2017. end
  2018. end
  2019. end
  2020.  
  2021. rayCast = function(Pos, Dir, Max, Ignore)
  2022. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  2023. end
  2024.  
  2025. makegui = function(cframe, text)
  2026. local a = math.random(-10, 10) / 100
  2027. local c = Instance.new("Part")
  2028. c.Transparency = 1
  2029. Instance.new("BodyGyro").Parent = c
  2030. c.Parent = workspace
  2031. c.CFrame = CFrame.new(cframe.p + Vector3.new(0, 1.5, 0))
  2032. local f = Instance.new("BodyPosition")
  2033. f.P = 2000
  2034. f.D = 100
  2035. f.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  2036. f.position = c.Position + Vector3.new(0, 3, 0)
  2037. f.Parent = c
  2038. game:GetService("Debris"):AddItem(c, 6.5)
  2039. c.CanCollide = false
  2040. c.Parent = workspace
  2041. c.CanCollide = false
  2042. local bg = Instance.new("BillboardGui", c)
  2043. bg.Adornee = c
  2044. bg.Size = UDim2.new(1, 0, 1, 0)
  2045. bg.StudsOffset = Vector3.new(0, 0, 0)
  2046. bg.AlwaysOnTop = false
  2047. local tl = Instance.new("TextLabel", bg)
  2048. tl.BackgroundTransparency = 1
  2049. tl.Size = UDim2.new(1, 0, 1, 0)
  2050. tl.Text = text
  2051. tl.Font = "SourceSansBold"
  2052. tl.FontSize = "Size42"
  2053. if crit == true then
  2054. tl.TextColor3 = Color3.new(0.70588235294118, 0, 0)
  2055. else
  2056. tl.TextColor3 = Color3.new(255, 0.70588235294118, 0.2)
  2057. end
  2058. tl.TextStrokeTransparency = 0
  2059. tl.TextScaled = true
  2060. tl.TextWrapped = true
  2061. coroutine.wrap(function()
  2062. wait(2)
  2063. for i = 1, 10 do
  2064. fat.Event:wait()
  2065. c.Transparency = 1
  2066. tl.TextTransparency = tl.TextTransparency + 0.1
  2067. end
  2068. end
  2069. )()
  2070. end
  2071.  
  2072. Damagefunc = function(hit, minim, maxim, knockback, Type, Property, Delay, KnockbackType, decreaseblock)
  2073. if hit.Parent == nil then
  2074. return
  2075. end
  2076. h = hit.Parent:FindFirstChild("Humanoid")
  2077. for _,v in pairs(hit.Parent:children()) do
  2078. if v:IsA("Humanoid") then
  2079. h = v
  2080. end
  2081. end
  2082. if hit.Parent.Parent:FindFirstChild("Torso") ~= nil then
  2083. h = hit.Parent.Parent:FindFirstChild("Humanoid")
  2084. end
  2085. if hit.Parent.className == "Hat" then
  2086. hit = hit.Parent.Parent:findFirstChild("Head")
  2087. end
  2088. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  2089. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  2090. return
  2091. end
  2092. blocked = false
  2093. block = hit.Parent:findFirstChild("Block")
  2094. if block ~= nil then
  2095. print(block.className)
  2096. if block.className == "NumberValue" and block.Value > 0 then
  2097. blocked = true
  2098. if decreaseblock == nil then
  2099. block.Value = block.Value - 1
  2100. end
  2101. end
  2102. if block.className == "IntValue" and block.Value > 0 then
  2103. blocked = true
  2104. if decreaseblock ~= nil then
  2105. block.Value = block.Value - 1
  2106. end
  2107. end
  2108. end
  2109. if blocked == false then
  2110. local D = math.random(minim, maxim) * damagea.Value
  2111. if h.Parent:FindFirstChild("Stats") then
  2112. D = D / h.Parent:FindFirstChild("Stats").Defence.Value
  2113. else
  2114. end
  2115. if not h.Parent:FindFirstChild("Stats") then
  2116. do
  2117. h.Health = h.Health - D
  2118. makegui(hit.Parent.Head.CFrame, tostring(math.floor(D + 0.5)))
  2119. local D = math.random(minim, maxim) * damagea.Value
  2120. if h.Parent:FindFirstChild("Stats") then
  2121. D = D / h.Parent:FindFirstChild("Stats").Defence.Value
  2122. else
  2123. end
  2124. if not h.Parent:FindFirstChild("Stats") then
  2125. do
  2126. h.Health = h.Health - D / 2
  2127. makegui(hit.Parent.Head.CFrame, tostring(math.floor(D + 0.5)))
  2128. if Type == "Knockdown" then
  2129. humanoid = hit.Parent.Humanoid
  2130. humanoid.PlatformStand = true
  2131. coroutine.resume(coroutine.create(function(Humanoid)
  2132. fat.Event:wait()
  2133. Humanoid.PlatformStand = false
  2134. end
  2135. ), humanoid)
  2136. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  2137. local bodvol = Instance.new("BodyVelocity")
  2138. bodvol.velocity = angle * knockback
  2139. bodvol.P = 5000
  2140. bodvol.maxForce = Vector3.new(8000, 8000, 8000)
  2141. bodvol.Parent = hit
  2142. rl = Instance.new("BodyAngularVelocity")
  2143. rl.P = 3000
  2144. rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000
  2145. rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  2146. rl.Parent = hit
  2147. game:GetService("Debris"):AddItem(bodvol, 0.5)
  2148. game:GetService("Debris"):AddItem(rl, 0.5)
  2149. else
  2150. do
  2151. if Type == "Normal" then
  2152. so("http://roblox.com/asset/?id=392592460", hit, 1, math.random(80, 120) / 100)
  2153. vp = Instance.new("BodyVelocity")
  2154. vp.P = 500
  2155. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  2156. if KnockbackType == 1 then
  2157. vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  2158. else
  2159. if KnockbackType == 2 then
  2160. vp.velocity = Property.CFrame.lookVector * knockback
  2161. end
  2162. end
  2163. if knockback > 0 then
  2164. vp.Parent = hit.Parent.Torso
  2165. end
  2166. game:GetService("Debris"):AddItem(vp, 0.5)
  2167. else
  2168. if Type == "MovementDebuff" then
  2169. coroutine.resume(coroutine.create(function()
  2170. hit.Parent.Humanoid.WalkSpeed = hit.Parent.Humanoid.WalkSpeed - 0.2
  2171. speed.Value = speed.Value + 0.2
  2172. Humanoid.WalkSpeed = 16 * speed.Value
  2173. wait(1)
  2174. hit.Parent.Humanoid.WalkSpeed = hit.Parent.Humanoid.WalkSpeed + 0.2
  2175. speed.Value = speed.Value - 0.2
  2176. Humanoid.WalkSpeed = 16 * speed.Value
  2177. end
  2178. ))
  2179. vp = Instance.new("BodyVelocity")
  2180. vp.P = 500
  2181. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  2182. if KnockbackType == 1 then
  2183. vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  2184. else
  2185. if KnockbackType == 2 then
  2186. vp.velocity = Property.CFrame.lookVector * knockback
  2187. end
  2188. end
  2189. if knockback > 0 then
  2190. vp.Parent = hit.Parent.Torso
  2191. end
  2192. game:GetService("Debris"):AddItem(vp, 0.5)
  2193. else
  2194. if Type == "CurseAura" then
  2195. coroutine.resume(coroutine.create(function()
  2196. savethewalkspeed = hit.Parent.Humanoid.WalkSpeed
  2197. hit.Parent.Humanoid.WalkSpeed = 0
  2198. wait(0.25)
  2199. hit.Parent.Humanoid.WalkSpeed = savethewalkspeed
  2200. end
  2201. ))
  2202. vp = Instance.new("BodyVelocity")
  2203. vp.P = 500
  2204. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  2205. if KnockbackType == 1 then
  2206. vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  2207. else
  2208. if KnockbackType == 2 then
  2209. vp.velocity = Property.CFrame.lookVector * knockback
  2210. end
  2211. end
  2212. if knockback > 0 then
  2213. vp.Parent = hit.Parent.Torso
  2214. end
  2215. game:GetService("Debris"):AddItem(vp, 0.5)
  2216. else
  2217. if Type == "SlashLifeSteal2" then
  2218. so("http://www.roblox.com/asset/?id=344936315", hit, 1, math.random(100, 200) / 100)
  2219. Humanoid.Health = Humanoid.Health + math.random(2, 3) / 2.5
  2220. vp = Instance.new("BodyVelocity")
  2221. vp.P = 500
  2222. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  2223. if KnockbackType == 1 then
  2224. vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  2225. else
  2226. if KnockbackType == 2 then
  2227. vp.velocity = Property.CFrame.lookVector * knockback
  2228. end
  2229. end
  2230. if knockback > 0 then
  2231. vp.Parent = hit.Parent.Torso
  2232. end
  2233. game:GetService("Debris"):AddItem(vp, 0.5)
  2234. else
  2235. if Type == "BlackHoleDamage" then
  2236. Humanoid.Health = Humanoid.Health + math.random(2, 4) / 5
  2237. floatingvelocity = Instance.new("BodyVelocity")
  2238. floatingvelocity.Parent = hit.Parent.Torso
  2239. floatingvelocity.Velocity = Vector3.new(0, math.random(2.5, 5), 0)
  2240. game:GetService("Debris"):AddItem(floatingvelocity, 1)
  2241. else
  2242. if Type == "BlackHoleDamage2" then
  2243. vp = Instance.new("BodyVelocity")
  2244. vp.P = 500
  2245. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  2246. if KnockbackType == 1 then
  2247. vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  2248. else
  2249. if KnockbackType == 2 then
  2250. vp.velocity = Property.CFrame.lookVector * knockback
  2251. end
  2252. end
  2253. if knockback > 0 then
  2254. vp.Parent = hit.Parent.Torso
  2255. end
  2256. game:GetService("Debris"):AddItem(vp, 0.5)
  2257. else
  2258. if Type == "Up" then
  2259. local bodyVelocity = Instance.new("BodyVelocity")
  2260. bodyVelocity.velocity = vt(0, 60, 0)
  2261. bodyVelocity.P = 5000
  2262. bodyVelocity.maxForce = Vector3.new(8000, 8000, 8000)
  2263. bodyVelocity.Parent = hit
  2264. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  2265. rl = Instance.new("BodyAngularVelocity")
  2266. rl.P = 3000
  2267. rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000
  2268. rl.angularvelocity = Vector3.new(math.random(-30, 30), math.random(-30, 30), math.random(-30, 30))
  2269. rl.Parent = hit
  2270. game:GetService("Debris"):AddItem(rl, 0.5)
  2271. else
  2272. do
  2273. if Type == "Snare" then
  2274. wait()
  2275. bp = Instance.new("BodyPosition")
  2276. bp.P = 2000
  2277. bp.D = 100
  2278. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  2279. bp.position = hit.Parent.Torso.Position
  2280. bp.Parent = hit.Parent.Torso
  2281. game:GetService("Debris"):AddItem(bp, 1)
  2282. else
  2283. if Type == "Target" then
  2284. so("http://www.roblox.com/asset/?id=199144144", hit, 1, math.random(150, 200) / 100)
  2285. vp = Instance.new("BodyVelocity")
  2286. vp.P = 500
  2287. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  2288. if KnockbackType == 1 then
  2289. vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  2290. else
  2291. if KnockbackType == 2 then
  2292. vp.velocity = Property.CFrame.lookVector * knockback
  2293. end
  2294. end
  2295. if knockback > 0 then
  2296. vp.Parent = hit.Parent.Torso
  2297. end
  2298. game:GetService("Debris"):AddItem(vp, 0.5)
  2299. end
  2300. end
  2301. debounce = Instance.new("BoolValue")
  2302. debounce.Name = "DebounceHit"
  2303. debounce.Parent = hit.Parent
  2304. debounce.Value = true
  2305. game:GetService("Debris"):AddItem(debounce, Delay)
  2306. c = Instance.new("ObjectValue")
  2307. c.Name = "creator"
  2308. c.Value = Player
  2309. c.Parent = h
  2310. game:GetService("Debris"):AddItem(c, 0.5)
  2311. CRIT = false
  2312. hitDeb = true
  2313. AttackPos = 6
  2314. end
  2315. end
  2316. end
  2317. end
  2318. end
  2319. end
  2320. end
  2321. end
  2322. end
  2323. end
  2324. end
  2325. end
  2326. end
  2327. end
  2328. end
  2329. end
  2330. end
  2331.  
  2332. MagniDamage = function(Part, magni, mindam, maxdam, knock, Type)
  2333. for _,c in pairs(workspace:children()) do
  2334. local hum = c:findFirstChild("Humanoid")
  2335. if hum ~= nil then
  2336. local head = c:findFirstChild("Torso")
  2337. if head ~= nil then
  2338. local targ = head.Position - Part.Position
  2339. local mag = targ.magnitude
  2340. if mag <= magni and c.Name ~= Player.Name then
  2341. Damagefunc(head, mindam, maxdam, knock, Type, RootPart, 0.2, 1, 3, 1)
  2342. end
  2343. end
  2344. end
  2345. end
  2346. end
  2347.  
  2348. Lightning = function(p0, p1, tym, ofs, brickcolor, th, tra, last)
  2349. local magz = p0 - p1.magnitude
  2350. local curpos = p0
  2351. local trz = {-ofs, ofs}
  2352. for i = 1, tym do
  2353. local li = Instance.new("Part", workspace)
  2354. do
  2355. li.TopSurface = 0
  2356. li.BottomSurface = 0
  2357. li.Anchored = true
  2358. li.Transparency = tra or 0.4
  2359. li.BrickColor = brickcolor
  2360. li.formFactor = "Custom"
  2361. li.CanCollide = false
  2362. li.Size = Vector3.new(th, th, magz / tym)
  2363. local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
  2364. local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
  2365. if tym == i then
  2366. local magz2 = curpos - p1.magnitude
  2367. li.Size = Vector3.new(th, th, magz2)
  2368. li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
  2369. else
  2370. do
  2371. do
  2372. li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
  2373. curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
  2374. game.Debris:AddItem(li, last)
  2375. coroutine.resume(coroutine.create(function()
  2376. while li.Transparency ~= 1 do
  2377. for i = 0, 1, last do
  2378. fat.Event:wait()
  2379. li.Transparency = li.Transparency + 0.1 / last
  2380. end
  2381. end
  2382. end
  2383. ))
  2384. end
  2385. -- DECOMPILER ERROR at PC134: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  2386.  
  2387. -- DECOMPILER ERROR at PC134: LeaveBlock: unexpected jumping out IF_STMT
  2388.  
  2389. -- DECOMPILER ERROR at PC134: LeaveBlock: unexpected jumping out DO_STMT
  2390.  
  2391. end
  2392. end
  2393. end
  2394. end
  2395. end
  2396.  
  2397. RainbowLightning = function(p0, p1, tym, ofs, th, tra, last)
  2398. local rainbowcolor = BrickColor.new(0)
  2399. local magz = p0 - p1.magnitude
  2400. local curpos = p0
  2401. local trz = {-ofs, ofs}
  2402. for i = 1, tym do
  2403. local li = Instance.new("Part", workspace)
  2404. do
  2405. li.TopSurface = 0
  2406. li.BottomSurface = 0
  2407. li.Anchored = true
  2408. li.Transparency = tra or 0.4
  2409. li.BrickColor = rainbowcolor
  2410. li.Material = "Neon"
  2411. li.formFactor = "Custom"
  2412. li.CanCollide = false
  2413. li.Size = Vector3.new(th, th, magz / tym)
  2414. local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
  2415. local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
  2416. if tym == i then
  2417. local magz2 = curpos - p1.magnitude
  2418. li.Size = Vector3.new(th, th, magz2)
  2419. li.CFrame = CFrame.new(curpos, p1) * CFrame.new(-1.57, 0, -magz2 / 2)
  2420. else
  2421. do
  2422. do
  2423. li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(-1.57, 0, magz / tym / 2)
  2424. curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
  2425. game.Debris:AddItem(li, last)
  2426. coroutine.resume(coroutine.create(function()
  2427. while li.Parent ~= nil do
  2428. wait()
  2429. rainbowcolor = BrickColor.new(23)
  2430. wait()
  2431. rainbowcolor = BrickColor.new(107)
  2432. wait()
  2433. rainbowcolor = BrickColor.new(37)
  2434. wait()
  2435. rainbowcolor = BrickColor.new(119)
  2436. wait()
  2437. rainbowcolor = BrickColor.new(24)
  2438. wait()
  2439. rainbowcolor = BrickColor.new(106)
  2440. wait()
  2441. rainbowcolor = BrickColor.new(21)
  2442. wait()
  2443. rainbowcolor = BrickColor.new(104)
  2444. end
  2445. end
  2446. ))
  2447. coroutine.resume(coroutine.create(function()
  2448. while li.Transparency ~= 1 do
  2449. for i = 0, 1, last do
  2450. fat.Event:wait()
  2451. li.Transparency = li.Transparency + 0.1 / last
  2452. li.BrickColor = rainbowcolor
  2453. end
  2454. end
  2455. do
  2456. li.Parent = nil
  2457. end
  2458. end
  2459. ))
  2460. end
  2461. -- DECOMPILER ERROR at PC149: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  2462.  
  2463. -- DECOMPILER ERROR at PC149: LeaveBlock: unexpected jumping out IF_STMT
  2464.  
  2465. -- DECOMPILER ERROR at PC149: LeaveBlock: unexpected jumping out DO_STMT
  2466.  
  2467. end
  2468. end
  2469. end
  2470. end
  2471. end
  2472.  
  2473. JumpEffect = function(brickcolor, cframe, x1, y1, z1, x2, y2, z2, delay)
  2474. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2475. prt.Anchored = true
  2476. prt.CanCollide = false
  2477. prt.CFrame = cframe * angles(math.rad(90), 0, 0)
  2478. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", vt(0, 0, 0), vt(x1, y1, z1))
  2479. game:GetService("Debris"):AddItem(prt, 10)
  2480. coroutine.resume(coroutine.create(function(Part, Mesh)
  2481. for i = 0, 1, delay do
  2482. fat.Event:wait()
  2483. Part.CFrame = Part.CFrame
  2484. Part.Transparency = i
  2485. Mesh.Scale = Mesh.Scale + vt(x2, y2, z2)
  2486. end
  2487. Part:Destroy()
  2488. end
  2489. ), prt, msh)
  2490. end
  2491.  
  2492. Shockwave2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2493. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2494. prt.Anchored = true
  2495. prt.CFrame = cframe
  2496. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
  2497. game:GetService("Debris"):AddItem(prt, 4)
  2498. coroutine.resume(coroutine.create(function(Part, Mesh)
  2499. for i = 0, 1, delay do
  2500. fat.Event:wait()
  2501. Part.CFrame = Part.CFrame
  2502. Part.Transparency = i
  2503. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2504. end
  2505. Part:Destroy()
  2506. end
  2507. ), prt, msh)
  2508. end
  2509.  
  2510. OrbEffect = function(brickcolor, cframe, x1, y1, z1, x2, y2, z2, delay)
  2511. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2512. prt.Anchored = true
  2513. prt.CanCollide = false
  2514. prt.CFrame = cframe * angles(math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)))
  2515. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", vt(0, 0, 0), vt(x1, y1, z1))
  2516. game:GetService("Debris"):AddItem(prt, 10)
  2517. coroutine.resume(coroutine.create(function(Part, Mesh)
  2518. for i = 0, 1, delay do
  2519. fat.Event:wait()
  2520. Part.CFrame = Part.CFrame
  2521. Part.Transparency = i
  2522. Mesh.Scale = Mesh.Scale + vt(x2, y2, z2)
  2523. end
  2524. Part:Destroy()
  2525. end
  2526. ), prt, msh)
  2527. end
  2528.  
  2529. BlockShockwave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2530. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2531. prt.Anchored = true
  2532. prt.CFrame = cframe * angles(math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)))
  2533. local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  2534. game:GetService("Debris"):AddItem(prt, 10)
  2535. coroutine.resume(coroutine.create(function(Part, Mesh)
  2536. for i = 0, 1, delay do
  2537. fat.Event:wait()
  2538. Part.CFrame = Part.CFrame * angles(math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)))
  2539. Part.Transparency = i
  2540. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2541. end
  2542. Part:Destroy()
  2543. end
  2544. ), prt, msh)
  2545. end
  2546.  
  2547. RainbowBlockShockwave = function(cframe, x1, y1, z1, x3, y3, z3, delay)
  2548. local rainbowcolor = BrickColor.new(0)
  2549. local prt = part(3, workspace, "SmoothPlastic", 0, 0, rainbowcolor, "Effect", vt(0.5, 0.5, 0.5))
  2550. prt.Anchored = true
  2551. prt.CFrame = cframe * angles(math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)))
  2552. prt.Material = "Neon"
  2553. local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  2554. game:GetService("Debris"):AddItem(prt, 5)
  2555. coroutine.resume(coroutine.create(function()
  2556. while prt.Parent ~= nil do
  2557. wait()
  2558. rainbowcolor = BrickColor.new(23)
  2559. wait()
  2560. rainbowcolor = BrickColor.new(107)
  2561. wait()
  2562. rainbowcolor = BrickColor.new(37)
  2563. wait()
  2564. rainbowcolor = BrickColor.new(119)
  2565. wait()
  2566. rainbowcolor = BrickColor.new(24)
  2567. wait()
  2568. rainbowcolor = BrickColor.new(106)
  2569. wait()
  2570. rainbowcolor = BrickColor.new(21)
  2571. wait()
  2572. rainbowcolor = BrickColor.new(104)
  2573. end
  2574. end
  2575. ))
  2576. coroutine.resume(coroutine.create(function(Part, Mesh)
  2577. for i = 0, 1, delay do
  2578. fat.Event:wait()
  2579. Part.CFrame = Part.CFrame * angles(math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)))
  2580. Part.Transparency = i
  2581. Part.BrickColor = rainbowcolor
  2582. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2583. end
  2584. Part:Destroy()
  2585. end
  2586. ), prt, msh)
  2587. end
  2588.  
  2589. RainbowCylinderShockwave = function(cframe, x1, y1, z1, x3, y3, z3, delay)
  2590. local rainbowcolor = BrickColor.new(0)
  2591. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2592. prt.Anchored = true
  2593. prt.CFrame = cframe
  2594. prt.Material = "Neon"
  2595. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  2596. game:GetService("Debris"):AddItem(prt, 5)
  2597. coroutine.resume(coroutine.create(function()
  2598. while prt.Parent ~= nil do
  2599. wait()
  2600. rainbowcolor = BrickColor.new(23)
  2601. wait()
  2602. rainbowcolor = BrickColor.new(107)
  2603. wait()
  2604. rainbowcolor = BrickColor.new(37)
  2605. wait()
  2606. rainbowcolor = BrickColor.new(119)
  2607. wait()
  2608. rainbowcolor = BrickColor.new(24)
  2609. wait()
  2610. rainbowcolor = BrickColor.new(106)
  2611. wait()
  2612. rainbowcolor = BrickColor.new(21)
  2613. wait()
  2614. rainbowcolor = BrickColor.new(104)
  2615. end
  2616. end
  2617. ))
  2618. coroutine.resume(coroutine.create(function(Part, Mesh)
  2619. for i = 0, 1, delay do
  2620. fat.Event:wait()
  2621. Part.BrickColor = rainbowcolor
  2622. Part.Transparency = i
  2623. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2624. end
  2625. Part:Destroy()
  2626. end
  2627. ), prt, msh)
  2628. end
  2629.  
  2630. RainbowOrbEffect = function(cframe, x1, y1, z1, x2, y2, z2, delay)
  2631. local rainbowcolor = BrickColor.new(0)
  2632. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2633. prt.Anchored = true
  2634. prt.CanCollide = false
  2635. prt.CFrame = cframe * angles(math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)))
  2636. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", vt(0, 0, 0), vt(x1, y1, z1))
  2637. game:GetService("Debris"):AddItem(prt, 5)
  2638. coroutine.resume(coroutine.create(function()
  2639. while prt.Parent ~= nil do
  2640. wait()
  2641. rainbowcolor = BrickColor.new(23)
  2642. wait()
  2643. rainbowcolor = BrickColor.new(107)
  2644. wait()
  2645. rainbowcolor = BrickColor.new(37)
  2646. wait()
  2647. rainbowcolor = BrickColor.new(119)
  2648. wait()
  2649. rainbowcolor = BrickColor.new(24)
  2650. wait()
  2651. rainbowcolor = BrickColor.new(106)
  2652. wait()
  2653. rainbowcolor = BrickColor.new(21)
  2654. wait()
  2655. rainbowcolor = BrickColor.new(104)
  2656. end
  2657. end
  2658. ))
  2659. coroutine.resume(coroutine.create(function(Part, Mesh)
  2660. for i = 0, 1, delay do
  2661. fat.Event:wait()
  2662. Part.CFrame = Part.CFrame
  2663. Part.BrickColor = rainbowcolor
  2664. Part.Transparency = i
  2665. Mesh.Scale = Mesh.Scale + vt(x2, y2, z2)
  2666. end
  2667. Part:Destroy()
  2668. end
  2669. ), prt, msh)
  2670. end
  2671.  
  2672. RainbowStar = function(cframe, x1, y1, z1, x2, y2, z2, delay)
  2673. local rainbowcolor = BrickColor.new(23)
  2674. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2675. prt.Anchored = true
  2676. prt.CanCollide = false
  2677. prt.CFrame = cframe
  2678. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=120647846", vt(0, 0, 0), vt(x1, y1, z1))
  2679. game:GetService("Debris"):AddItem(prt, 5)
  2680. coroutine.resume(coroutine.create(function()
  2681. while prt.Parent ~= nil do
  2682. wait()
  2683. rainbowcolor = BrickColor.new(23)
  2684. wait()
  2685. rainbowcolor = BrickColor.new(107)
  2686. wait()
  2687. rainbowcolor = BrickColor.new(37)
  2688. wait()
  2689. rainbowcolor = BrickColor.new(119)
  2690. wait()
  2691. rainbowcolor = BrickColor.new(24)
  2692. wait()
  2693. rainbowcolor = BrickColor.new(106)
  2694. wait()
  2695. rainbowcolor = BrickColor.new(21)
  2696. wait()
  2697. rainbowcolor = BrickColor.new(104)
  2698. end
  2699. end
  2700. ))
  2701. coroutine.resume(coroutine.create(function(Part, Mesh)
  2702. for i = 0, 1, delay do
  2703. fat.Event:wait()
  2704. Part.CFrame = Part.CFrame
  2705. Part.BrickColor = rainbowcolor
  2706. Part.Transparency = i
  2707. Mesh.Scale = Mesh.Scale + vt(x2, y2, z2)
  2708. end
  2709. Part:Destroy()
  2710. end
  2711. ), prt, msh)
  2712. end
  2713.  
  2714. RainbowSphereShockwave = function(cframe, x1, y1, z1, x3, y3, z3, delay)
  2715. local rainbowcolor = BrickColor.new(0)
  2716. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2717. prt.Anchored = true
  2718. prt.CFrame = cframe
  2719. prt.Material = "Neon"
  2720. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  2721. game:GetService("Debris"):AddItem(prt, 5)
  2722. coroutine.resume(coroutine.create(function()
  2723. while prt.Parent ~= nil do
  2724. wait()
  2725. rainbowcolor = BrickColor.new(23)
  2726. wait()
  2727. rainbowcolor = BrickColor.new(107)
  2728. wait()
  2729. rainbowcolor = BrickColor.new(37)
  2730. wait()
  2731. rainbowcolor = BrickColor.new(119)
  2732. wait()
  2733. rainbowcolor = BrickColor.new(24)
  2734. wait()
  2735. rainbowcolor = BrickColor.new(106)
  2736. wait()
  2737. rainbowcolor = BrickColor.new(21)
  2738. wait()
  2739. rainbowcolor = BrickColor.new(104)
  2740. end
  2741. end
  2742. ))
  2743. coroutine.resume(coroutine.create(function(Part, Mesh)
  2744. for i = 0, 1, delay do
  2745. fat.Event:wait()
  2746. Part.BrickColor = rainbowcolor
  2747. Part.Transparency = i
  2748. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2749. end
  2750. Part:Destroy()
  2751. end
  2752. ), prt, msh)
  2753. end
  2754.  
  2755. CylinderShockwave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2756. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2757. prt.Anchored = true
  2758. prt.CFrame = cframe
  2759. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  2760. game:GetService("Debris"):AddItem(prt, 10)
  2761. coroutine.resume(coroutine.create(function(Part, Mesh)
  2762. for i = 0, 1, delay do
  2763. fat.Event:wait()
  2764. Part.Transparency = i
  2765. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2766. end
  2767. Part:Destroy()
  2768. end
  2769. ), prt, msh)
  2770. end
  2771.  
  2772. Laser = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2773. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2774. prt.Anchored = true
  2775. prt.CFrame = cframe
  2776. prt.Material = "Neon"
  2777. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  2778. game:GetService("Debris"):AddItem(prt, 10)
  2779. coroutine.resume(coroutine.create(function(Part, Mesh)
  2780. for i = 0, 1, delay do
  2781. fat.Event:wait()
  2782. Part.Transparency = i
  2783. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2784. end
  2785. Part:Destroy()
  2786. end
  2787. ), prt, msh)
  2788. end
  2789.  
  2790. Laser2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2791. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2792. prt.Anchored = true
  2793. prt.CFrame = cframe
  2794. prt.Material = "Neon"
  2795. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  2796. game:GetService("Debris"):AddItem(prt, 10)
  2797. coroutine.resume(coroutine.create(function(Part, Mesh)
  2798. for i = 0, 1, delay do
  2799. fat.Event:wait()
  2800. Part.Transparency = i
  2801. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2802. end
  2803. Part:Destroy()
  2804. end
  2805. ), prt, msh)
  2806. end
  2807.  
  2808. Laser3 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2809. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2810. prt.Anchored = true
  2811. prt.CFrame = cframe
  2812. prt.Material = "Neon"
  2813. local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  2814. game:GetService("Debris"):AddItem(prt, 10)
  2815. coroutine.resume(coroutine.create(function(Part, Mesh)
  2816. for i = 0, 1, delay do
  2817. fat.Event:wait()
  2818. Part.Transparency = i
  2819. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2820. end
  2821. Part:Destroy()
  2822. end
  2823. ), prt, msh)
  2824. end
  2825.  
  2826. SphereShockwave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2827. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2828. prt.Anchored = true
  2829. prt.CFrame = cframe
  2830. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  2831. game:GetService("Debris"):AddItem(prt, 10)
  2832. coroutine.resume(coroutine.create(function(Part, Mesh)
  2833. for i = 0, 1, delay do
  2834. fat.Event:wait()
  2835. Part.Transparency = i
  2836. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2837. end
  2838. Part:Destroy()
  2839. end
  2840. ), prt, msh)
  2841. end
  2842.  
  2843. SphereShockwave2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2844. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2845. prt.Anchored = true
  2846. prt.CFrame = cframe * angles(math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)), math.rad(math.random(-90, 90)))
  2847. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  2848. game:GetService("Debris"):AddItem(prt, 10)
  2849. coroutine.resume(coroutine.create(function(Part, Mesh)
  2850. for i = 0, 1, delay do
  2851. fat.Event:wait()
  2852. Part.Transparency = i
  2853. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2854. end
  2855. Part:Destroy()
  2856. end
  2857. ), prt, msh)
  2858. end
  2859.  
  2860. Shockwave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  2861. local prt = part(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  2862. prt.Anchored = true
  2863. prt.CFrame = cframe
  2864. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  2865. game:GetService("Debris"):AddItem(prt, 10)
  2866. coroutine.resume(coroutine.create(function(Part, Mesh)
  2867. for i = 0, 1, delay do
  2868. fat.Event:wait()
  2869. Part.CFrame = Part.CFrame
  2870. Part.Transparency = i
  2871. Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  2872. end
  2873. Part:Destroy()
  2874. end
  2875. ), prt, msh)
  2876. end
  2877.  
  2878. leftlegangle = 0
  2879. leftlegcframe = 0
  2880. leftlegcframe2 = 0
  2881. leftlegcframe3 = 0
  2882. rightlegangle = 0
  2883. rightlegcframe = 0
  2884. rightlegcframe2 = 0
  2885. rightlegcframe3 = 0
  2886. leftarmangle = 0
  2887. rightarmangle = 0
  2888. rightlegangle2 = 0
  2889. leftlegangle2 = 0
  2890. MMouse = mouse
  2891. canidle = true
  2892. canwalk = true
  2893. holdz = false
  2894. zshooting = false
  2895. gyroenabled = false
  2896. ShotTarget = RootPart
  2897. runningsound = Head.Running
  2898. local robloxidleanimation = Instance.new("Animation", Torso)
  2899. robloxidleanimation.Name = "robloxidleanimation"
  2900. robloxidleanimation.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  2901. local floatingaura = Instance.new("Sound", Torso)
  2902. floatingaura.SoundId = "http://www.roblox.com/asset/?id=343063967"
  2903. floatingaura.Volume = 0.25
  2904. floatingaura.Pitch = 0.75
  2905. floatingaura.Looped = true
  2906. gyro = Instance.new("BodyGyro")
  2907. gyro.Parent = nil
  2908. gyro.P = 10000000
  2909. gyro.D = 1000
  2910. gyro.MaxTorque = Vector3.new(0, 10000000, 0)
  2911. Clone = function()
  2912. for _,v in pairs(Torso.Parent:children()) do
  2913. if v.className == "Part" and v.Name ~= "HumanoidRootPart" then
  2914. local rainbowcolor = BrickColor.new(0)
  2915. do
  2916. n = v:clone()
  2917. n:BreakJoints()
  2918. n.archivable = true
  2919. n.Anchored = true
  2920. n.CanCollide = false
  2921. n.TopSurface = "SmoothNoOutlines"
  2922. n.BottomSurface = "SmoothNoOutlines"
  2923. n.LeftSurface = "SmoothNoOutlines"
  2924. n.RightSurface = "SmoothNoOutlines"
  2925. n.FrontSurface = "SmoothNoOutlines"
  2926. n.BackSurface = "SmoothNoOutlines"
  2927. n.Name = "Trail"
  2928. n.BrickColor = rainbowcolor
  2929. n.Parent = workspace
  2930. n.CFrame = v.CFrame
  2931. for _,v in pairs(n:children()) do
  2932. if v.Name == "face" then
  2933. v:Destroy()
  2934. end
  2935. end
  2936. game:GetService("Debris"):AddItem(n, 2)
  2937. coroutine.resume(coroutine.create(function()
  2938. while n.Parent ~= nil do
  2939. wait()
  2940. rainbowcolor = BrickColor.new(23)
  2941. wait()
  2942. rainbowcolor = BrickColor.new(107)
  2943. wait()
  2944. rainbowcolor = BrickColor.new(37)
  2945. wait()
  2946. rainbowcolor = BrickColor.new(119)
  2947. wait()
  2948. rainbowcolor = BrickColor.new(24)
  2949. wait()
  2950. rainbowcolor = BrickColor.new(106)
  2951. wait()
  2952. rainbowcolor = BrickColor.new(21)
  2953. wait()
  2954. rainbowcolor = BrickColor.new(104)
  2955. end
  2956. end
  2957. ))
  2958. coroutine.resume(coroutine.create(function(ne)
  2959. for i = 1, 80 do
  2960. ne:BreakJoints()
  2961. ne.Transparency = i / 80
  2962. ne.BrickColor = rainbowcolor
  2963. fat.Event:wait()
  2964. end
  2965. ne.Parent = nil
  2966. end
  2967. ), n)
  2968. end
  2969. end
  2970. end
  2971. end
  2972.  
  2973. equipanim = function()
  2974. attack = true
  2975. so("http://roblox.com/asset/?id=367850772", Torso, 1, 0.75)
  2976. speed.Value = speed.Value - 0.4
  2977. Humanoid.WalkSpeed = 16 * speed.Value
  2978. runningsound.Volume = 0
  2979. for i = 0, 1, 0.12 do
  2980. fat.Event:wait()
  2981. Humanoid.CameraOffset = Vector3.new(0, 0 + 3 * i, 0)
  2982. RainbowBlockShockwave(LeftLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  2983. RainbowBlockShockwave(RightLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  2984. RainbowBlockShockwave(LeftArm.CFrame * cf(0, -1, 0), 1.5, 1.5, 1.5, 0.5, 0.5, 0.5, 0.1)
  2985. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 1.5, 1.5, 1.5, 0.5, 0.5, 0.5, 0.1)
  2986. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(0 - 360 * i)), 0.3)
  2987. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(-20), math.rad(0), math.rad(0)), 0.3)
  2988. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(135), math.rad(0), math.rad(45)), 0.3)
  2989. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(135), math.rad(0), math.rad(-45)), 0.3)
  2990. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-20), math.rad(90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  2991. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-20), math.rad(-90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  2992. end
  2993. Humanoid.CameraOffset = Vector3.new(0, 3, 0)
  2994. for i = 0, 1, 0.12 do
  2995. fat.Event:wait()
  2996. RainbowBlockShockwave(LeftLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  2997. RainbowBlockShockwave(RightLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  2998. RainbowBlockShockwave(LeftArm.CFrame * cf(0, -1, 0), 1.5, 1.5, 1.5, 0.5, 0.5, 0.5, 0.1)
  2999. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 1.5, 1.5, 1.5, 0.5, 0.5, 0.5, 0.1)
  3000. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3001. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(-20), math.rad(0), math.rad(0)), 0.3)
  3002. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(135 - 45 * i), math.rad(0), math.rad(45)), 0.3)
  3003. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(135 - 45 * i), math.rad(0), math.rad(-45)), 0.3)
  3004. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-20), math.rad(90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3005. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-20), math.rad(-90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3006. end
  3007. for i = 0, 1, 0.18 do
  3008. fat.Event:wait()
  3009. RainbowBlockShockwave(LeftLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  3010. RainbowBlockShockwave(RightLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  3011. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3012. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), 0.3)
  3013. RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-45)), 0.3)
  3014. LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(45)), 0.3)
  3015. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-20), math.rad(90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3016. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-20), math.rad(-90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3017. end
  3018. so("http://roblox.com/asset/?id=340722848", Torso, 0.5, 2)
  3019. so("http://roblox.com/asset/?id=367850840", Torso, 0.75, 1.75)
  3020. RainbowBlockShockwave(LeftArm.CFrame * cf(0, -1, 0), 1.5, 1.5, 1.5, 1, 1, 1, 0.05)
  3021. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 1.5, 1.5, 1.5, 1, 1, 1, 0.05)
  3022. for i = 0, 1, 0.06 do
  3023. fat.Event:wait()
  3024. RainbowBlockShockwave(LeftLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  3025. RainbowBlockShockwave(RightLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  3026. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3027. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), 0.3)
  3028. RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-45)), 0.3)
  3029. LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(45)), 0.3)
  3030. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-20), math.rad(90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3031. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-20), math.rad(-90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3032. end
  3033. speed.Value = speed.Value + 0.3
  3034. Humanoid.WalkSpeed = 16 * speed.Value
  3035. floatingaura:Play()
  3036. attack = false
  3037. end
  3038.  
  3039. unequipanim = function()
  3040. attack = true
  3041. gyro.Parent = nil
  3042. gyroenabled = false
  3043. so("http://roblox.com/asset/?id=367850772", Torso, 0.75, 1.25)
  3044. speed.Value = speed.Value - 0.3
  3045. Humanoid.WalkSpeed = 16 * speed.Value
  3046. for i = 0, 1, 0.08 do
  3047. fat.Event:wait()
  3048. RainbowBlockShockwave(LeftLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  3049. RainbowBlockShockwave(RightLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  3050. RainbowBlockShockwave(LeftArm.CFrame * cf(0, -1, 0), 1.5, 1.5, 1.5, 0.5, 0.5, 0.5, 0.1)
  3051. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 1.5, 1.5, 1.5, 0.5, 0.5, 0.5, 0.1)
  3052. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3053. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(20), math.rad(0), math.rad(0)), 0.3)
  3054. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(90)), 0.3)
  3055. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-90)), 0.3)
  3056. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-20), math.rad(90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3057. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-20), math.rad(-90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3058. end
  3059. so("http://roblox.com/asset/?id=367850840", Torso, 0.75, 0.75)
  3060. for i = 0, 1, 0.06 do
  3061. fat.Event:wait()
  3062. Humanoid.CameraOffset = Vector3.new(0, 3 - 3 * i, 0)
  3063. RainbowBlockShockwave(LeftLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  3064. RainbowBlockShockwave(RightLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.01, 0.01, 0.01, 0.1)
  3065. RainbowBlockShockwave(LeftArm.CFrame * cf(0, -1, 0), 1.5, 1.5, 1.5, 0.5, 0.5, 0.5, 0.1)
  3066. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 1.5, 1.5, 1.5, 0.5, 0.5, 0.5, 0.1)
  3067. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3 - 3 * i) * angles(math.rad(0), math.rad(0), math.rad(0 + 360 * i)), 0.3)
  3068. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(20), math.rad(0), math.rad(0)), 0.3)
  3069. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(90 - 70 * i)), 0.3)
  3070. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-90 + 70 * i)), 0.3)
  3071. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-20), math.rad(90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3072. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-20), math.rad(-90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3073. end
  3074. floatingaura:Stop()
  3075. Humanoid.CameraOffset = Vector3.new(0, 0, 0)
  3076. for i = 0, 1, 0.06 do
  3077. fat.Event:wait()
  3078. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3079. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3080. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3081. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3082. 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)), 0.3)
  3083. 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)), 0.3)
  3084. end
  3085. runningsound.Volume = 0.5
  3086. speed.Value = speed.Value + 0.4
  3087. Humanoid.WalkSpeed = 16 * speed.Value
  3088. attack = false
  3089. end
  3090.  
  3091. attackone = function()
  3092. attack = true
  3093. so("http://roblox.com/asset/?id=367850840", Torso, 0.75, 1)
  3094. for i = 0, 1, 0.2 do
  3095. fat.Event:wait()
  3096. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 3, 3, 3, 0.01, 0.01, 0.01, 0.075)
  3097. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(60)), 0.3)
  3098. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(-60)), 0.3)
  3099. RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -0.5) * angles(math.rad(135), math.rad(0), math.rad(-45)), 0.3)
  3100. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-20)), 0.3)
  3101. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3102. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3103. end
  3104. so("http://roblox.com/asset/?id=340722848", Torso, 0.75, 1.75)
  3105. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 5, 5, 5, 0.05, 0.05, 0.05, 0.05)
  3106. local startingrefpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3107. startingrefpart.Anchored = true
  3108. startingrefpart.CFrame = RootPart.CFrame * cf(0, 3, -15)
  3109. game:GetService("Debris"):AddItem(startingrefpart, 3)
  3110. RainbowBlockShockwave(cf(startingrefpart.Position), 2, 2, 2, 2, 2, 2, 0.05)
  3111. MagniDamage(startingrefpart, 20, 10, 15, 10, "Normal")
  3112. for i = 1, math.random(2, 4) do
  3113. RainbowOrbEffect(cf(startingrefpart.Position), 2, 2, 2, 2, 2, 2, 0.04)
  3114. end
  3115. for i = 0, 1, 0.2 do
  3116. fat.Event:wait()
  3117. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(-30)), 0.3)
  3118. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(30)), 0.3)
  3119. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(15), math.rad(0), math.rad(45)), 0.3)
  3120. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3)
  3121. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3122. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3123. end
  3124. attack = false
  3125. end
  3126.  
  3127. attacktwo = function()
  3128. attack = true
  3129. so("http://roblox.com/asset/?id=367850840", Torso, 0.75, 1.25)
  3130. for i = 0, 1, 0.2 do
  3131. fat.Event:wait()
  3132. RainbowBlockShockwave(LeftArm.CFrame * cf(0, -1, 0), 3, 3, 3, 0.01, 0.01, 0.01, 0.075)
  3133. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(-60)), 0.3)
  3134. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(60)), 0.3)
  3135. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(20)), 0.3)
  3136. LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5, -0.5) * angles(math.rad(135), math.rad(0), math.rad(45)), 0.3)
  3137. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3138. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3139. end
  3140. so("http://roblox.com/asset/?id=340722848", Torso, 0.75, 1.5)
  3141. RainbowBlockShockwave(LeftArm.CFrame * cf(0, -1, 0), 5, 5, 5, 0.05, 0.05, 0.05, 0.05)
  3142. local startingrefpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3143. startingrefpart.Anchored = true
  3144. startingrefpart.CFrame = RootPart.CFrame * cf(0, 3, -15)
  3145. game:GetService("Debris"):AddItem(startingrefpart, 3)
  3146. RainbowBlockShockwave(cf(startingrefpart.Position), 2, 2, 2, 2, 2, 2, 0.05)
  3147. MagniDamage(startingrefpart, 20, 10, 15, 10, "Normal")
  3148. for i = 1, math.random(2, 4) do
  3149. RainbowOrbEffect(cf(startingrefpart.Position), 2, 2, 2, 2, 2, 2, 0.04)
  3150. end
  3151. for i = 0, 1, 0.2 do
  3152. fat.Event:wait()
  3153. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(30)), 0.3)
  3154. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(-30)), 0.3)
  3155. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3)
  3156. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(15), math.rad(0), math.rad(-45)), 0.3)
  3157. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3158. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3159. end
  3160. attack = false
  3161. end
  3162.  
  3163. attackthree = function()
  3164. attack = true
  3165. so("http://roblox.com/asset/?id=367850840", Torso, 0.75, 0.75)
  3166. for i = 0, 1, 0.2 do
  3167. fat.Event:wait()
  3168. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 3, 3, 3, 0.01, 0.01, 0.01, 0.075)
  3169. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3170. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), 0.3)
  3171. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(15)), 0.3)
  3172. LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, 0.25) * angles(math.rad(-45), math.rad(0), math.rad(45)), 0.3)
  3173. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3174. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3175. end
  3176. for i = 0, 1, 0.2 do
  3177. fat.Event:wait()
  3178. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 3, 3, 3, 0.01, 0.01, 0.01, 0.075)
  3179. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3180. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3181. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(165), math.rad(0), math.rad(5)), 0.3)
  3182. LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, 0.25) * angles(math.rad(-45), math.rad(0), math.rad(45)), 0.3)
  3183. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3184. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3185. end
  3186. for i = 1, 2 do
  3187. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 3, 3, 3, 0.01, 0.01, 0.01, 0.075)
  3188. local startingrefpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3189. startingrefpart.Anchored = true
  3190. startingrefpart.CFrame = RootPart.CFrame * cf(math.random(-10, 10), 400, -20 + math.random(-10, 10))
  3191. game:GetService("Debris"):AddItem(startingrefpart, 3)
  3192. local hit, pos = rayCast(startingrefpart.Position, CFrame.new(startingrefpart.Position, startingrefpart.Position - Vector3.new(0, 1, 0)).lookVector, 500, Character)
  3193. if hit ~= nil then
  3194. floor = true
  3195. refpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3196. refpart.Anchored = true
  3197. refpart.CFrame = cf(pos)
  3198. game:GetService("Debris"):AddItem(refpart, 3)
  3199. MagniDamage(refpart, 10, 10, 15, 0, "Normal")
  3200. so("http://roblox.com/asset/?id=367932544", refpart, 0.5, 1)
  3201. RainbowCylinderShockwave(cf(refpart.Position), 0.1, 0.01, 0.1, 3, 0.01, 3, 0.05)
  3202. for i = 1, math.random(5, 10) do
  3203. RainbowLightning(startingrefpart.Position, refpart.Position, 5, math.random(5, 10), 0.5, 0.5, 2)
  3204. end
  3205. end
  3206. do
  3207. for i = 0, 1, 0.08 do
  3208. fat.Event:wait()
  3209. local lv = RootPart.CFrame:pointToObjectSpace(RootPart.Velocity + RootPart.Position)
  3210. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(-lv.z / 1), math.rad(-lv.x / 1), math.rad(0)), 0.3)
  3211. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3212. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(165), math.rad(0), math.rad(5)), 0.3)
  3213. LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, 0.25) * angles(math.rad(-45), math.rad(0), math.rad(45)), 0.3)
  3214. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3215. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3216. end
  3217. -- DECOMPILER ERROR at PC846: LeaveBlock: unexpected jumping out DO_STMT
  3218.  
  3219. end
  3220. end
  3221. attack = false
  3222. end
  3223.  
  3224. ChangeMode = function()
  3225. attack = true
  3226. so("http://roblox.com/asset/?id=367850772", Torso, 0.75, math.random(80, 120) / 100)
  3227. for i = 0, 1, 0.06 do
  3228. fat.Event:wait()
  3229. RainbowBlockShockwave(LeftArm.CFrame * cf(0, -1, 0), 3, 3, 3, 0.01, 0.01, 0.01, 0.075)
  3230. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 3, 3, 3, 0.01, 0.01, 0.01, 0.075)
  3231. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3232. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), 0.3)
  3233. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(15), math.rad(0), math.rad(75)), 0.3)
  3234. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(15), math.rad(0), math.rad(-75)), 0.3)
  3235. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3236. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3237. end
  3238. attack = false
  3239. end
  3240.  
  3241. canlaser = true
  3242. canrainstar = true
  3243. LaserShot = function()
  3244. canlaser = false
  3245. local theactualstartingrefpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3246. theactualstartingrefpart.Anchored = true
  3247. theactualstartingrefpart.CFrame = RootPart.CFrame * cf(0, 1000, 0)
  3248. game:GetService("Debris"):AddItem(theactualstartingrefpart, 0.1)
  3249. local spread = Vector3.new(math.random(-10, 10), 0, math.random(-10, 10))
  3250. local MainPos = theactualstartingrefpart.Position
  3251. local MainPos2 = MMouse.Hit.p + spread
  3252. local MouseLook = cf((MainPos + MainPos2) / 2, MainPos2)
  3253. local hit, pos = rayCast(MainPos, MouseLook.lookVector, 10000, ShotTarget.Parent)
  3254. if hit ~= nil then
  3255. local actualstartingrefpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3256. actualstartingrefpart.Anchored = true
  3257. actualstartingrefpart.CFrame = cf(pos)
  3258. game:GetService("Debris"):AddItem(actualstartingrefpart, 0.1)
  3259. local startingrefpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3260. startingrefpart.Anchored = true
  3261. startingrefpart.CFrame = actualstartingrefpart.CFrame * cf(0, 400, 0)
  3262. game:GetService("Debris"):AddItem(startingrefpart, 0.1)
  3263. local hit, pos = rayCast(startingrefpart.Position, CFrame.new(startingrefpart.Position, startingrefpart.Position - Vector3.new(0, 1, 0)).lookVector, 500, Character)
  3264. if hit ~= nil then
  3265. floor = true
  3266. refpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3267. refpart.Anchored = true
  3268. refpart.CFrame = cf(pos)
  3269. game:GetService("Debris"):AddItem(refpart, 0.1)
  3270. MagniDamage(refpart, 10, 20, 30, 0, "Normal")
  3271. so("http://roblox.com/asset/?id=367932544", refpart, 0.5, math.random(80, 120) / 100)
  3272. RainbowCylinderShockwave(cf(refpart.Position), 18, 0.01, 18, 1, 0.01, 1, 0.05)
  3273. RainbowLightning(startingrefpart.Position, refpart.Position, 5, math.random(5, 10), 6, 0.5, 10)
  3274. end
  3275. end
  3276. do
  3277. wait(0.25)
  3278. canlaser = true
  3279. end
  3280. end
  3281.  
  3282. starcount = 0
  3283. StarRain = function()
  3284. canrainstar = false
  3285. starcount = math.random(1, 8)
  3286. if starcount == 1 or starcount == 2 or starcount == 3 or starcount == 4 or starcount == 5 or starcount == 6 or starcount == 7 then
  3287. startingrefpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3288. startingrefpart.Anchored = true
  3289. startingrefpart.CFrame = RootPart.CFrame * cf(math.random(-20, 20), math.random(30, 40), math.random(-20, 20))
  3290. game:GetService("Debris"):AddItem(startingrefpart, 2)
  3291. so("http://roblox.com/asset/?id=367850840", startingrefpart, 0.75, math.random(75, 125) / 100)
  3292. local spread = Vector3.new(math.random(-2, 2), math.random(-2, 2), math.random(-2, 2))
  3293. do
  3294. local MainPos = startingrefpart.Position
  3295. local MainPos2 = MMouse.Hit.p + spread
  3296. local MouseLook = cf((MainPos + MainPos2) / 2, MainPos2)
  3297. local speed = 0.01
  3298. local num = 300
  3299. local rotation = 0
  3300. coroutine.resume(coroutine.create(function()
  3301. repeat
  3302. swait(1)
  3303. local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, ShotTarget.Parent)
  3304. local mag = MainPos - pos.magnitude
  3305. RainbowStar(CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, math.rad(-90), math.rad(rotation)), 10, 10, 10, 0.01, 0.01, 0.01, 0.125)
  3306. MainPos = MainPos + MouseLook.lookVector * speed
  3307. num = num - 1
  3308. rotation = rotation - 5
  3309. coroutine.resume(coroutine.create(function()
  3310. wait(0.25)
  3311. speed = 2
  3312. end
  3313. ))
  3314. if hit ~= nil then
  3315. num = 0
  3316. refpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3317. refpart.Anchored = true
  3318. refpart.CFrame = cf(pos)
  3319. game:GetService("Debris"):AddItem(refpart, 2)
  3320. RainbowSphereShockwave(cf(refpart.Position), 50, 50, 50, 0.1, 0.1, 0.1, 0.075)
  3321. MagniDamage(refpart, 15, 20, 30, 0, "Normal")
  3322. so("http://roblox.com/asset/?id=367850772", refpart, 1, math.random(100, 150) / 100)
  3323. so("http://roblox.com/asset/?id=340722848", refpart, 0.5, math.random(100, 150) / 100)
  3324. end
  3325. if num <= 0 then
  3326. refpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3327. refpart.Anchored = true
  3328. refpart.CFrame = cf(pos)
  3329. game:GetService("Debris"):AddItem(refpart, 2)
  3330. RainbowSphereShockwave(cf(refpart.Position), 50, 50, 50, 0.1, 0.1, 0.1, 0.075)
  3331. MagniDamage(refpart, 15, 20, 30, 0, "Normal")
  3332. so("http://roblox.com/asset/?id=367850772", refpart, 1, math.random(100, 150) / 100)
  3333. so("http://roblox.com/asset/?id=340722848", refpart, 0.5, math.random(100, 150) / 100)
  3334. end
  3335. until num <= 0
  3336. end
  3337. ))
  3338. end
  3339. else
  3340. do
  3341. if starcount == 8 then
  3342. startingrefpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3343. startingrefpart.Anchored = true
  3344. startingrefpart.CFrame = RootPart.CFrame * cf(math.random(-20, 20), math.random(30, 40), math.random(-20, 20))
  3345. game:GetService("Debris"):AddItem(startingrefpart, 2)
  3346. so("http://roblox.com/asset/?id=367850840", startingrefpart, 0.75, math.random(45, 55) / 100)
  3347. local spread = Vector3.new(math.random(-2, 2), math.random(-2, 2), math.random(-2, 2))
  3348. local MainPos = startingrefpart.Position
  3349. local MainPos2 = MMouse.Hit.p + spread
  3350. local MouseLook = cf((MainPos + MainPos2) / 2, MainPos2)
  3351. local speed = 0.01
  3352. local num = 300
  3353. local rotation = 0
  3354. coroutine.resume(coroutine.create(function()
  3355. repeat
  3356. swait(1)
  3357. local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, ShotTarget.Parent)
  3358. local mag = MainPos - pos.magnitude
  3359. RainbowStar(CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, math.rad(-90), math.rad(rotation)), 20, 20, 20, 0.01, 0.01, 0.01, 0.125)
  3360. MainPos = MainPos + MouseLook.lookVector * speed
  3361. num = num - 1
  3362. rotation = rotation - 5
  3363. coroutine.resume(coroutine.create(function()
  3364. wait(0.25)
  3365. speed = 1
  3366. end
  3367. ))
  3368. if hit ~= nil then
  3369. num = 0
  3370. refpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3371. refpart.Anchored = true
  3372. refpart.CFrame = cf(pos)
  3373. game:GetService("Debris"):AddItem(refpart, 2)
  3374. RainbowSphereShockwave(cf(refpart.Position), 100, 100, 100, 0.1, 0.1, 0.1, 0.075)
  3375. MagniDamage(refpart, 27.5, 40, 60, 0, "Normal")
  3376. so("http://roblox.com/asset/?id=367850772", refpart, 1, math.random(50, 100) / 100)
  3377. so("http://roblox.com/asset/?id=340722848", refpart, 0.5, math.random(50, 100) / 100)
  3378. end
  3379. if num <= 0 then
  3380. refpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3381. refpart.Anchored = true
  3382. refpart.CFrame = cf(pos)
  3383. game:GetService("Debris"):AddItem(refpart, 2)
  3384. RainbowSphereShockwave(cf(refpart.Position), 100, 100, 100, 0.1, 0.1, 0.1, 0.075)
  3385. MagniDamage(refpart, 27.5, 40, 60, 0, "Normal")
  3386. so("http://roblox.com/asset/?id=367850772", refpart, 1, math.random(50, 100) / 100)
  3387. so("http://roblox.com/asset/?id=340722848", refpart, 0.5, math.random(50, 100) / 100)
  3388. end
  3389. until num <= 0
  3390. end
  3391. ))
  3392. end
  3393. do
  3394. wait(math.random(80, 140) / 100)
  3395. canrainstar = true
  3396. end
  3397. end
  3398. end
  3399. end
  3400.  
  3401. LasersandStars = function()
  3402. holdz = true
  3403. attack = true
  3404. so("http://roblox.com/asset/?id=367850772", Torso, 0.75, math.random(80, 120) / 100)
  3405. speed.Value = speed.Value - 0.5
  3406. Humanoid.WalkSpeed = 16 * speed.Value
  3407. for i = 0, 1, 0.06 do
  3408. fat.Event:wait()
  3409. RainbowBlockShockwave(LeftArm.CFrame * cf(0, -1, 0), 3, 3, 3, 0.01, 0.01, 0.01, 0.075)
  3410. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 3, 3, 3, 0.01, 0.01, 0.01, 0.075)
  3411. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 5) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3412. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), 0.3)
  3413. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(75)), 0.3)
  3414. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-75)), 0.3)
  3415. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3416. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3417. end
  3418. do
  3419. while holdz == true do
  3420. for i = 0, 1, 0.5 do
  3421. fat.Event:wait()
  3422. local lv = RootPart.CFrame:pointToObjectSpace(RootPart.Velocity + RootPart.Position)
  3423. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 5) * angles(math.rad(-lv.z / 1), math.rad(-lv.x / 1), math.rad(0)), 0.3)
  3424. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), 0.3)
  3425. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(75)), 0.3)
  3426. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-75)), 0.3)
  3427. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3428. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(0)), 0.3)
  3429. end
  3430. if holdz == false then
  3431. speed.Value = speed.Value + 0.5
  3432. Humanoid.WalkSpeed = 16 * speed.Value
  3433. break
  3434. end
  3435. end
  3436. attack = false
  3437. end
  3438. end
  3439.  
  3440. Teleport = function()
  3441. refpart = part(3, workspace, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", vt())
  3442. refpart.Anchored = true
  3443. refpart.CFrame = Torso.CFrame
  3444. game:GetService("Debris"):AddItem(refpart, 1)
  3445. so("http://roblox.com/asset/?id=367932544", refpart, 0.5, 0.75)
  3446. RainbowBlockShockwave(refpart.CFrame, 2, 2, 2, 2, 2, 2, 0.1)
  3447. Character:MoveTo(MMouse.Hit.p)
  3448. wait()
  3449. so("http://roblox.com/asset/?id=367932544", Torso, 0.5, 1.25)
  3450. RainbowBlockShockwave(Torso.CFrame, 2, 2, 2, 2, 2, 2, 0.1)
  3451. end
  3452.  
  3453. hold = false
  3454. holdx = false
  3455. laserhold = false
  3456. ob1d = function(mouse)
  3457. if attack == false and equipped == true and gyroenabled == true then
  3458. if attack == false and attacktype == 1 then
  3459. attacktype = 2
  3460. attackone()
  3461. else
  3462. if attack == false and attacktype == 2 then
  3463. attacktype = 3
  3464. attacktwo()
  3465. else
  3466. if attack == false and attacktype == 3 then
  3467. attacktype = 1
  3468. attackthree()
  3469. end
  3470. end
  3471. end
  3472. end
  3473. if holdz == true and equipped == true and gyroenabled == true and canlaser == true then
  3474. laserhold = true
  3475. while laserhold == true do
  3476. LaserShot()
  3477. end
  3478. end
  3479. end
  3480.  
  3481. ob1u = function(mouse)
  3482. if laserhold == true then
  3483. laserhold = false
  3484. end
  3485. end
  3486.  
  3487. k = function(k)
  3488. if k == "f" and attack == false then
  3489. if equipped == false then
  3490. equipped = true
  3491. RSH.Parent = nil
  3492. LSH.Parent = nil
  3493. RW.Parent = ch.Torso
  3494. LW.Parent = ch.Torso
  3495. animate.Disabled = true
  3496. local idleanimation = Humanoid:LoadAnimation(Torso.robloxidleanimation)
  3497. idleanimation:Play()
  3498. equipanim()
  3499. coroutine.resume(coroutine.create(function()
  3500. while equipped == true do
  3501. wait(0.1)
  3502. RainbowBlockShockwave(LeftLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.1, 0.1, 0.1, 0.1)
  3503. RainbowBlockShockwave(RightLeg.CFrame * cf(0, -1, 0), 2, 2, 2, 0.1, 0.1, 0.1, 0.1)
  3504. end
  3505. end
  3506. ))
  3507. else
  3508. do
  3509. if equipped == true then
  3510. equipped = false
  3511. unequipanim()
  3512. swait(0)
  3513. animate.Disabled = false
  3514. RW.Parent = nil
  3515. LW.Parent = nil
  3516. RSH.Parent = player.Character.Torso
  3517. LSH.Parent = player.Character.Torso
  3518. end
  3519. if k == "e" and attack == false and equipped == true then
  3520. if gyro.Parent == RootPart then
  3521. ChangeMode()
  3522. gyro.Parent = nil
  3523. gyroenabled = false
  3524. else
  3525. if gyro.Parent == nil then
  3526. ChangeMode()
  3527. gyro.Parent = RootPart
  3528. gyroenabled = true
  3529. coroutine.resume(coroutine.create(function()
  3530. while gyroenabled == true do
  3531. wait(0.1)
  3532. RainbowBlockShockwave(LeftArm.CFrame * cf(0, -1, 0), 2, 2, 2, 0.1, 0.1, 0.1, 0.1)
  3533. RainbowBlockShockwave(RightArm.CFrame * cf(0, -1, 0), 2, 2, 2, 0.1, 0.1, 0.1, 0.1)
  3534. end
  3535. end
  3536. ))
  3537. end
  3538. end
  3539. end
  3540. if k == "z" and attack == false and gyroenabled == true then
  3541. LasersandStars()
  3542. end
  3543. if k == "z" and holdz == true and gyroenabled == true then
  3544. holdz = false
  3545. end
  3546. if k == "x" and holdz == true and canrainstar == true then
  3547. holdx = true
  3548. while holdx == true do
  3549. StarRain()
  3550. end
  3551. end
  3552. if k == "c" and attack == false and gyroenabled == true and holdz == false then
  3553. Teleport()
  3554. end
  3555. end
  3556. end
  3557. end
  3558. end
  3559.  
  3560. k2 = function(k)
  3561. if k == "x" and equipped == true then
  3562. holdx = false
  3563. end
  3564. end
  3565.  
  3566. s = function(mouse)
  3567. mouse.Button1Down:connect(function()
  3568. ob1d(mouse)
  3569. end
  3570. )
  3571. mouse.Button1Up:connect(function()
  3572. ob1u(mouse)
  3573. end
  3574. )
  3575. mouse.KeyDown:connect(k)
  3576. mouse.KeyUp:connect(k2)
  3577. player = Player
  3578. ch = Character
  3579. MMouse = mouse
  3580. end
  3581.  
  3582. ds = function(mouse)
  3583. end
  3584.  
  3585. Bin.Selected:connect(s)
  3586. Bin.Deselected:connect(ds)
  3587. local donum = 0
  3588. local sine = 0
  3589. local change = 1
  3590. local val = 0
  3591. fat.Event:connect(function()
  3592. ammolabel.Text = "Speed [" .. speed.Value .. "]"
  3593. ammolabel2.Text = "Damage [" .. damagea.Value .. "]"
  3594. ammolabel3.Text = "Defense [" .. defense.Value .. "]"
  3595. gyro.CFrame = CFrame.new(Vector3.new(1, 0, 1), cam.CoordinateFrame.p - RootPart.CFrame.p.unit * -100)
  3596. sine = sine + change
  3597. local torvel = RootPart.Velocity * Vector3.new(1, 0, 1).magnitude
  3598. local velderp = RootPart.Velocity.y
  3599. hitfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  3600. if donum >= 0.5 then
  3601. handidle = true
  3602. else
  3603. if donum <= 0 then
  3604. handidle = false
  3605. end
  3606. end
  3607. if handidle == false then
  3608. donum = donum + 0.003
  3609. else
  3610. donum = donum - 0.003
  3611. end
  3612. if equipped == true or equipped == false then
  3613. if attack == false then
  3614. idle = idle + 1
  3615. else
  3616. idle = 0
  3617. end
  3618. if ((idle >= 500 and attack ~= false) or RootPart.Velocity.y > 1) and hitfloor == nil then
  3619. Anim = "Jump"
  3620. if attack == false and equipped == true and gyroenabled == false then
  3621. fat.Event:wait()
  3622. Humanoid.WalkSpeed = 16 * speed.Value
  3623. else
  3624. if attack == false and equipped == true and gyroenabled == true then
  3625. fat.Event:wait()
  3626. Humanoid.WalkSpeed = 16 * speed.Value
  3627. end
  3628. end
  3629. else
  3630. if RootPart.Velocity.y < -1 and hitfloor == nil then
  3631. Anim = "Fall"
  3632. if attack == false and equipped == true and gyroenabled == false then
  3633. fat.Event:wait()
  3634. Humanoid.WalkSpeed = 16 * speed.Value
  3635. else
  3636. if attack == false and equipped == true and gyroenabled == true then
  3637. fat.Event:wait()
  3638. Humanoid.WalkSpeed = 16 * speed.Value
  3639. end
  3640. end
  3641. else
  3642. if torvel.x < 1 and torvel.z < 1 and hit ~= nil then
  3643. Anim = "Idle"
  3644. if attack == false and equipped == true and gyroenabled == false then
  3645. fat.Event:wait()
  3646. Humanoid.WalkSpeed = 16 * speed.Value
  3647. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3 - 0.25 * math.cos(sine / 20) + -math.sin(sine / 20) / 5) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3648. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(-5 * math.cos(sine / 20)), math.rad(0), math.rad(0)), 0.3)
  3649. RW.C0 = clerp(RW.C0, CFrame.new(0.75, 0.5 - 0.1 * math.cos(sine / 20), -0.35) * angles(math.rad(0), math.rad(90), math.rad(0)) * angles(math.rad(0), math.rad(70), math.rad(80)), 0.3)
  3650. LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5 - 0.1 * math.cos(sine / 20), -0.45) * angles(math.rad(0), math.rad(-90), math.rad(0)) * angles(math.rad(0), math.rad(-60), math.rad(-90)), 0.3)
  3651. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5 - 2.5 * math.cos(sine / 20)), math.rad(0), math.rad(0)), 0.3)
  3652. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5 - 2.5 * math.cos(sine / 20)), math.rad(0), math.rad(0)), 0.3)
  3653. else
  3654. if attack == false and equipped == true and gyroenabled == true then
  3655. fat.Event:wait()
  3656. Humanoid.WalkSpeed = 16 * speed.Value
  3657. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3 - 0.25 * math.cos(sine / 20) + -math.sin(sine / 20) / 5) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  3658. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(-5 * math.cos(sine / 20)), math.rad(0), math.rad(0)), 0.3)
  3659. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(15 + 5 * math.cos(sine / 20)), math.rad(-15), math.rad(30 + 5 * math.cos(sine / 20))), 0.3)
  3660. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(15 + 5 * math.cos(sine / 20)), math.rad(15), math.rad(-30 - 5 * math.cos(sine / 20))), 0.3)
  3661. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-5), math.rad(90), math.rad(0)) * angles(math.rad(-5 - 2.5 * math.cos(sine / 20)), math.rad(0), math.rad(0)), 0.3)
  3662. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-5), math.rad(-90), math.rad(0)) * angles(math.rad(-5 - 2.5 * math.cos(sine / 20)), math.rad(0), math.rad(0)), 0.3)
  3663. end
  3664. end
  3665. else
  3666. if torvel.x < 2 and torvel.z < 2 and hit ~= nil then
  3667. Anim = "Walk"
  3668. if attack == false and equipped == true and gyroenabled == false then
  3669. fat.Event:wait()
  3670. local lv = RootPart.CFrame:pointToObjectSpace(RootPart.Velocity + RootPart.Position)
  3671. Humanoid.WalkSpeed = 16 * speed.Value
  3672. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3 - 0.25 * math.cos(sine / 20) + -math.sin(sine / 20) / 5) * angles(math.rad(20 * speed.Value), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(0)), 0.3)
  3673. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(-10), math.rad(0), math.rad(0) + Head.RotVelocity.Y / 15), 0.3)
  3674. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20 * speed.Value), math.rad(0), math.rad(20)), 0.3)
  3675. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20 * speed.Value), math.rad(0), math.rad(-20)), 0.3)
  3676. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(-20 * speed.Value), math.rad(90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3677. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(-20 * speed.Value), math.rad(-90), math.rad(0)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3)
  3678. else
  3679. do
  3680. if attack == false and equipped == true and gyroenabled == true then
  3681. fat.Event:wait()
  3682. local lv = RootPart.CFrame:pointToObjectSpace(RootPart.Velocity + RootPart.Position)
  3683. Humanoid.WalkSpeed = 16 * speed.Value
  3684. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 3 - 0.25 * math.cos(sine / 20) + -math.sin(sine / 20) / 5) * angles(math.rad(-lv.z / 1), math.rad(-lv.x / 1), math.rad(0)), 0.3)
  3685. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(lv.z / 1), math.rad(lv.x / 1), math.rad(0)), 0.3)
  3686. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(lv.z / 1), math.rad(0), math.rad(10 + -lv.x / 1)), 0.3)
  3687. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(lv.z / 1), math.rad(0), math.rad(-10 + -lv.x / 1)), 0.3)
  3688. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(lv.z / 1), math.rad(90), math.rad(0)) * angles(math.rad(-5 + lv.x / 1), math.rad(0), math.rad(0)), 0.3)
  3689. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(lv.z / 1), math.rad(-90), math.rad(0)) * angles(math.rad(-5 + -lv.x / 1), math.rad(0), math.rad(0)), 0.3)
  3690. end
  3691. end
  3692. end
  3693. end
  3694. end
  3695. end
  3696. end
  3697. end
  3698. end
  3699. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement