Demonlord27

god2

Apr 1st, 2017
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.30 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local char = plr.Character
  3. local larm = char["Left Arm"]
  4. local rarm = char["Right Arm"]
  5. local lleg = char["Left Leg"]
  6. local rleg = char["Right Leg"]
  7. local head = char.Head
  8. local torso = char.Torso
  9.  
  10. for i,v in pairs(char:children()) do
  11. if v:IsA("Accessories") then
  12. v:Destroy()
  13. end
  14. end
  15.  
  16. for i,v in pairs (head:GetChildren()) do
  17. if v:IsA("Sound") then
  18. v:Destroy()
  19. end
  20. end
  21.  
  22. larm.Transparency = 1
  23. rarm.Transparency = 1
  24. lleg.Transparency = 1
  25. rleg.Transparency = 1
  26. torso.Transparency = 1
  27. head.Transparency = 1
  28. head.face.Transparency = 1
  29.  
  30. larm.CanCollide = false
  31. rarm.CanCollide = false
  32. lleg.CanCollide = false
  33. rleg.CanCollide = false
  34. head.CanCollide = false
  35. torso.CanCollide = false
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46. --[[
  47. Shadow V1
  48. By:LuaLlama
  49. --]]
  50. local Player = game.Players.LocalPlayer
  51. local Character = Player.Character or Player.CharacterAdded:wait()
  52. local Mouse = Player:GetMouse()
  53. local Spread = 20
  54. local Activate = false
  55. local Holder = Instance.new('Model', Character)
  56. local Color = BrickColor.new('Really black') -- Institutional white
  57. local run
  58. local wall = false
  59. local fire = false
  60. local Blocks = {}
  61.  
  62. function Boomeffect()
  63. local Ball = Instance.new('Part', Holder)
  64. Ball.Shape = 'Ball'
  65. Ball.BrickColor = Color
  66. Ball.Material = Enum.Material.Neon
  67. Ball.Anchored = true
  68. Ball.CanCollide = false
  69. Ball.CFrame = Character.Torso.CFrame
  70. coroutine.resume(coroutine.create(function()
  71. for i=0,10,0.5 do
  72. Ball.Size = Vector3.new(i,i,i)
  73. Ball.CFrame = Character.Torso.CFrame
  74. Ball.Transparency = i/10
  75. wait()
  76. end
  77. Ball:Destroy()
  78. end))
  79. end
  80.  
  81. function Unboomeffect()
  82. local Ball = Instance.new('Part', Holder)
  83. Ball.Shape = 'Ball'
  84. Ball.BrickColor = Color
  85. Ball.Material = Enum.Material.Neon
  86. Ball.Anchored = true
  87. Ball.CanCollide = false
  88. Ball.CFrame = Character.Torso.CFrame
  89. coroutine.resume(coroutine.create(function()
  90. for i=10,0,-0.5 do
  91. Ball.Size = Vector3.new(i,i,i)
  92. Ball.CFrame = Character.Torso.CFrame
  93. Ball.Transparency = i/10
  94. wait()
  95. end
  96. Ball:Destroy()
  97. end))
  98. end
  99.  
  100. function onKeyPress(inputObject, gameProcessedEvent)
  101. if inputObject.KeyCode == Enum.KeyCode.Q then -- Activate
  102. if Activate then
  103. --run:disconnect()
  104. Activate = false
  105. Character.Humanoid.WalkSpeed = 35
  106. Character.Humanoid.JumpPower = 75
  107. Unboomeffect()
  108. else
  109. Activate = true
  110. Character.Humanoid.WalkSpeed = 200
  111. Character.Humanoid.JumpPower = 200
  112. Boomeffect()
  113. wait(0.5)
  114. --run = game:GetService('RunService').Stepped:connect(function()
  115. repeat
  116. wait()
  117. if fire then repeat wait(0.1) until not fire end
  118. for i,v in ipairs(Character:GetChildren()) do
  119. local Shadow
  120. if v:IsA('BasePart') then
  121. Shadow = v:Clone()
  122. end
  123. if Shadow then
  124. Shadow:ClearAllChildren()
  125. local BF = Instance.new('BodyVelocity', Shadow)
  126. BF.velocity = Vector3.new(math.random(-Spread, Spread), math.random(-Spread, Spread), math.random(-Spread, Spread))
  127. BF.Name = 'BF'
  128. Shadow.Parent = Holder
  129. Shadow.CanCollide = false
  130. Shadow.Transparency = 0.5
  131. Shadow.Material = 'Neon'
  132. Shadow.BrickColor = Color
  133. table.insert(Blocks, Shadow)
  134. coroutine.resume(coroutine.create(function()
  135. for i=0,10,0.5 do
  136. Shadow.Transparency = i/10
  137. wait()
  138. end
  139. for i,v in next, Blocks do
  140. if v == Shadow then
  141. table.remove(Blocks, i)
  142. break
  143. end
  144. end
  145. Shadow:Destroy()
  146. end))
  147. end
  148. end
  149. until not Activate
  150. --end)
  151. end
  152. end
  153.  
  154. if inputObject.KeyCode == Enum.KeyCode.F then -- Beam
  155. if Mouse.Target and Mouse.Hit and Activate then
  156. local Pos = Mouse.Hit.p
  157. local Part = Mouse.Target
  158. local Dist = (Character.Torso.Position - Pos).magnitude
  159.  
  160. local Beam = Instance.new("Part", Holder)
  161. Beam.Name = "Beam"
  162. Beam.BrickColor = Color
  163. Beam.Transparency = 0.5
  164. Beam.Anchored = true
  165. Beam.CanCollide = false
  166. Beam.Material = 'Neon'
  167. Beam.Size = Vector3.new(0, 0, Dist)
  168. Beam.CFrame = CFrame.new(Character.Torso.Position, Pos) * CFrame.new(0, 0, -Dist/2)
  169.  
  170. local explo = Instance.new('Explosion', Beam)
  171. explo.Position = Pos
  172. -- Damage
  173.  
  174. if Part.Parent ~= Character then
  175. local Human
  176. for i,v in ipairs(Part.Parent:GetChildren()) do
  177. if v:IsA('Humanoid') then
  178. Human = v
  179. break
  180. end
  181. end
  182. if Human then
  183. Human:TakeDamage(10241035153913)
  184. end
  185. end
  186.  
  187.  
  188. coroutine.resume(coroutine.create(function()
  189. for i=0,10,2 do
  190. Dist = (Character.Torso.Position - Pos).magnitude
  191. Beam.Size = Vector3.new(i/2,i/2,Dist)
  192. Beam.CFrame = CFrame.new(Character.Torso.Position, Pos) * CFrame.new(0, 0, -Dist/2)
  193. Beam.Transparency = i/10
  194. wait()
  195. end
  196. Beam:Destroy()
  197. end))
  198. end
  199. end
  200.  
  201. if inputObject.KeyCode == Enum.KeyCode.R and Activate and not wall then -- Terrain misshap
  202. wall = true
  203. local cf = Character.Torso.CFrame
  204. for i=1,18 do
  205. wait(0.125)
  206. local Pos = (cf*CFrame.Angles(0, math.rad(i*20), 0))*CFrame.new(35,0,0)
  207. local Terrain = Instance.new('Part', game.Workspace)
  208. Terrain.Material = 'Neon'
  209. Terrain.BrickColor = Color
  210. Terrain.Size = Vector3.new(10,0,10)
  211. Terrain.CFrame = CFrame.new(Pos.p - Vector3.new(0, -3, 0))
  212. Terrain.Anchored = true
  213.  
  214. Terrain.Touched:connect(function(Part)
  215. if Part.Parent ~= Character then
  216. local Human
  217. for i,v in ipairs(Part.Parent:GetChildren()) do
  218. if v:IsA('Humanoid') then
  219. Human = v
  220. break
  221. end
  222. end
  223. if Human then
  224. Human:TakeDamage(13521541543)
  225. end
  226. end
  227. end)
  228.  
  229. coroutine.resume(coroutine.create(function()
  230. for i=0,100,8 do
  231. Terrain.Size = Vector3.new(10,i/2,10)
  232. Terrain.CFrame = CFrame.new(Pos.p+Vector3.new(0, i/4, 0) + Vector3.new(0, -3, 0))
  233. --Terrain.Transparency = 1-(i/100)
  234. wait()
  235. end
  236. wait(1)
  237. for i=100,0,-16 do
  238. Terrain.Size = Vector3.new(10,i/2,10)
  239. Terrain.CFrame = CFrame.new(Pos.p+Vector3.new(0, i/4, 0) + Vector3.new(0, -3, 0))
  240. wait()
  241. end
  242. Terrain:Destroy()
  243. end))
  244. end
  245. wall = false
  246. end
  247.  
  248. if inputObject.KeyCode == Enum.KeyCode.G and Activate and not fire then -- Teleport
  249. if Mouse.Target and Mouse.Hit then
  250. fire = true
  251. local Pos = Mouse.Hit.p
  252. for i,v in next, Blocks do
  253. if v.Parent then
  254. if v:FindFirstChild('BF') then
  255. v.BF.Velocity = CFrame.new(Character.Torso.Position, Pos).lookVector *math.random(1,Spread*10)
  256. end
  257. game:GetService('Debris'):AddItem(v, 2)
  258. v.Touched:connect(function(Part)
  259. if Part.Parent and Part.Parent ~= Character then
  260. local Human
  261. for i,v in ipairs(Part.Parent:GetChildren()) do
  262. if v:IsA('Humanoid') then
  263. Human = v
  264. break
  265. end
  266. end
  267. if Human then
  268. Human:TakeDamage(13512254323)
  269. v:Destroy()
  270. end
  271. end
  272. end)
  273. end
  274. end
  275. Blocks = {}
  276. fire = false
  277. end
  278. end
  279. end
  280.  
  281. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
  282. local isScriptNil = false
  283.  
  284. local PlrName = "stxdios"
  285. local Plrs = game:GetService("Players")
  286. local RunService = game:GetService("RunService")
  287. local Content = game:GetService("ContentProvider")
  288. local LP = Plrs.LocalPlayer
  289. local Char = LP.Character
  290. local PlrGui = LP.PlayerGui
  291. local Backpack = LP.Backpack
  292. local Mouse = LP:GetMouse()
  293.  
  294. local Camera = Workspace.CurrentCamera
  295. local LastCamCF = Camera.CoordinateFrame
  296. local AnimJoints = {}
  297. local Cons = {}
  298. local mDown = false
  299. local Multi = false
  300. local Grabbing = false
  301. local Current = {}
  302. local Alpha = 1
  303. local LightNum = 1
  304.  
  305. Current.Part = nil
  306. Current.BP = nil
  307. Current.BA = nil
  308. Current.Mass = nil
  309.  
  310. local LastPart = nil
  311.  
  312. local Head = Char["Head"]
  313. local Torso = Char["Torso"]
  314. local Humanoid = Char["Humanoid"]
  315. local LA = Char["Left Arm"]
  316. local RA = Char["Right Arm"]
  317. local LL = Char["Left Leg"]
  318. local RL = Char["Right Leg"]
  319.  
  320. local LS, RS;
  321.  
  322. local OrigLS = Torso["Left Shoulder"]
  323. local OrigRS = Torso["Right Shoulder"]
  324.  
  325. for _,v in pairs(Char:GetChildren()) do
  326. if v.Name == ModID then
  327. v:Destroy()
  328. end
  329. end
  330.  
  331. for _,v in pairs(PlrGui:GetChildren()) do
  332. if v.Name == "PadsGui" then
  333. v:Destroy()
  334. end
  335. end
  336.  
  337. local ModID = "Pads"
  338. local Objects = {}
  339. local Grav = 196.2
  340.  
  341. local sin=math.sin
  342. local cos=math.cos
  343. local max=math.max
  344. local min=math.min
  345. local atan2=math.atan2
  346. local random=math.random
  347. local tau = 2 * math.pi
  348.  
  349. local BodyObjects = {
  350. ["BodyVelocity"] = true;
  351. ["BodyAngularVelocity"] = true;
  352. ["BodyForce"] = true;
  353. ["BodyThrust"] = true;
  354. ["BodyPosition"] = true;
  355. ["RocketPropulsion"] = true;
  356. }
  357.  
  358. if LP.Name == PlrName and isScriptNil then
  359. script.Parent = nil
  360. end
  361.  
  362. LP.CameraMode = "Classic"
  363.  
  364. local Assets = {
  365. }
  366.  
  367. local LS0, LS1 = OrigLS.C0, OrigLS.C1
  368. local RS0, RS1 = OrigRS.C0, OrigRS.C1
  369.  
  370. for i,v in pairs(Assets) do
  371. local ID = tostring(Assets[i])
  372. Assets[i] = "http://www.roblox.com/asset/?id=" .. ID
  373. Content:Preload("http://www.roblox.com/asset/?id=" .. ID)
  374. end
  375.  
  376. function QuaternionFromCFrame(cf)
  377. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
  378. local trace = m00 + m11 + m22 if trace > 0 then
  379. local s = math.sqrt(1 + trace);
  380. local recip = 0.5/s;
  381. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
  382. else
  383. local i = 0;
  384. if m11 > m00 then
  385. i = 1;
  386. end;
  387. if m22 > (i == 0 and m00 or m11) then
  388. i = 2 end if i == 0 then
  389. local s = math.sqrt(m00-m11-m22+1);
  390. local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
  391. elseif i == 1 then
  392. local s = math.sqrt(m11-m22-m00+1);
  393. local recip = 0.5/s;
  394. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
  395. elseif i == 2 then
  396. local s = math.sqrt(m22-m00-m11+1);
  397. local recip = 0.5/s;
  398. return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
  399. end;
  400. end;
  401. end;
  402.  
  403. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  404. local xs, ys, zs = x + x, y + y, z + z;
  405. local wx, wy, wz = w*xs, w*ys, w*zs;
  406. local xx = x*xs;
  407. local xy = x*ys;
  408. local xz = x*zs;
  409. local yy = y*ys;
  410. local yz = y*zs;
  411. local zz = z*zs;
  412. 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))
  413. end;
  414.  
  415. function QuaternionSlerp(a, b, t)
  416. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
  417. local startInterp, finishInterp;
  418. if cosTheta >= 0.0001 then
  419. if (1 - cosTheta) > 0.0001 then
  420. local theta = math.acos(cosTheta);
  421. local invSinTheta = 1/math.sin(theta);
  422. startInterp = math.sin((1-t)*theta)*invSinTheta;
  423. finishInterp = math.sin(t*theta)*invSinTheta;
  424. else
  425. startInterp = 1-t finishInterp = t;
  426. end;
  427. else
  428. if (1+cosTheta) > 0.0001 then
  429. local theta = math.acos(-cosTheta);
  430. local invSinTheta = 1/math.sin(theta);
  431. startInterp = math.sin((t-1)*theta)*invSinTheta;
  432. finishInterp = math.sin(t*theta)*invSinTheta;
  433. else startInterp = t-1 finishInterp = t;
  434. end;
  435. end;
  436. 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;
  437. end;
  438.  
  439. function CLerp(a,b,t)
  440. local qa={QuaternionFromCFrame(a)};
  441. local qb={QuaternionFromCFrame(b)};
  442. local ax,ay,az=a.x,a.y,a.z;
  443. local bx,by,bz=b.x,b.y,b.z;
  444. local _t=1-t;
  445. return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
  446. end
  447.  
  448. function GetWeld(weld)
  449. local obj
  450. for i, v in pairs(AnimJoints) do
  451. if v[1] == weld then
  452. obj = v
  453. break
  454. end
  455. end
  456. if not obj then
  457. obj = {weld,NV}
  458. table.insert(AnimJoints,obj)
  459. end
  460. return weld.C0.p, obj[2]
  461. end
  462.  
  463. function SetWeld(weld, i, loops, origpos, origangle, nextpos, nextangle, override, overrideLower, smooth)
  464. smooth = smooth or 1
  465. local obj
  466. for i, v in pairs(AnimJoints) do
  467. if v[1] == weld then
  468. obj = v
  469. break
  470. end
  471. end
  472. if not obj then
  473. obj = {weld,NV}
  474. table.insert(AnimJoints,obj)
  475. end
  476.  
  477. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  478.  
  479. local tox,toy,toz = 0,0,0
  480. tox = math.abs(origangle.x - nextangle.x) *perc
  481. toy = math.abs(origangle.y - nextangle.y) *perc
  482. toz = math.abs(origangle.z - nextangle.z) *perc
  483. tox = ((origangle.x > nextangle.x and -tox) or tox)
  484. toy = ((origangle.y > nextangle.y and -toy) or toy)
  485. toz = ((origangle.z > nextangle.z and -toz) or toz)
  486.  
  487. local tox2,toy2,toz2 = 0,0,0
  488. tox2 = math.abs(origpos.x - nextpos.x) *perc
  489. toy2 = math.abs(origpos.y - nextpos.y) *perc
  490. toz2 = math.abs(origpos.z - nextpos.z) *perc
  491. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  492. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  493. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  494.  
  495. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  496. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  497. end
  498.  
  499. function RotateCamera(x, y)
  500. 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)
  501. end
  502.  
  503. function GetAngles(cf)
  504. local lv = cf.lookVector
  505. return -math.asin(lv.y), math.atan2(lv.x, -lv.z)
  506. end
  507.  
  508. local LastCamCF = Camera.CoordinateFrame
  509.  
  510. function Look()
  511. if AlphaOn == true then
  512. local x, y = GetAngles(LastCamCF:toObjectSpace(Camera.CoordinateFrame))
  513. Camera.CoordinateFrame = LastCamCF
  514. RotateCamera(x * -(Alpha), y * -(Alpha))
  515. LastCamCF = Camera.CoordinateFrame
  516. end
  517. end
  518.  
  519. function Cor(Func)
  520. local Ok, Err = coroutine.resume(coroutine.create(Func))
  521. if not Ok then
  522. print(Err)
  523. end
  524. end
  525.  
  526. function Cor2(Func)
  527. local Ok, Err = ypcall(Func)
  528. if not Ok then
  529. print(Err)
  530. end
  531. end
  532.  
  533. function MakePads()
  534. -- 1 - VTelekinesis
  535. P1 = Instance.new("Model")
  536. P1.Name = ModID
  537.  
  538. -- 2 - RBase
  539. P2 = Instance.new("Part")
  540. P2.CFrame = CFrame.new(Vector3.new(21.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  541. P2.FormFactor = Enum.FormFactor.Custom
  542. P2.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  543. P2.Anchored = true
  544. P2.BrickColor = BrickColor.new("White")
  545. P2.Friction = 0.30000001192093
  546. P2.Shape = Enum.PartType.Block
  547. P2.Name = "RBase"
  548. P2.Parent = P1
  549. P2.Transparency = 1
  550.  
  551. -- 3 - Mesh
  552. P3 = Instance.new("CylinderMesh")
  553. P3.Scale = Vector3.new(1, 0.5, 1)
  554. P3.Parent = P2
  555.  
  556. -- 4 - LBase
  557. P4 = Instance.new("Part")
  558. P4.CFrame = CFrame.new(Vector3.new(18.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  559. P4.FormFactor = Enum.FormFactor.Custom
  560. P4.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  561. P4.Anchored = true
  562. P4.BrickColor = BrickColor.new("White")
  563. P4.Friction = 0.30000001192093
  564. P4.Shape = Enum.PartType.Block
  565. P4.Name = "LBase"
  566. P4.Parent = P1
  567. P4.Transparency = 1
  568.  
  569. -- 5 - Mesh
  570. P5 = Instance.new("CylinderMesh")
  571. P5.Scale = Vector3.new(1, 0.5, 1)
  572. P5.Parent = P4
  573.  
  574.  
  575. -- 6 - RP1
  576. P6 = Instance.new("Part")
  577. P6.CFrame = CFrame.new(Vector3.new(20.8999996, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  578. P6.FormFactor = Enum.FormFactor.Custom
  579. P6.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  580. P6.Anchored = true
  581. P6.BrickColor = BrickColor.new("White")
  582. P6.Friction = 0.30000001192093
  583. P6.Shape = Enum.PartType.Block
  584. P6.Name = "RP1"
  585. P6.Parent = P2
  586. P6.Transparency = 1
  587. -- 7 - Mesh
  588. P7 = Instance.new("CylinderMesh")
  589. P7.Scale = Vector3.new(1, 0.5, 1)
  590. P7.Parent = P6
  591.  
  592.  
  593. -- 8 - RP2
  594. P8 = Instance.new("Part")
  595. P8.CFrame = CFrame.new(Vector3.new(21.1000004, 1.8499999, 11.6999998)) * CFrame.Angles(-0, 0, -0)
  596. P8.FormFactor = Enum.FormFactor.Custom
  597. P8.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  598. P8.Anchored = true
  599. P8.BrickColor = BrickColor.new("White")
  600. P8.Friction = 0.30000001192093
  601. P8.Shape = Enum.PartType.Block
  602. P8.Name = "RP2"
  603. P8.Parent = P2
  604. P8.Transparency = 1
  605.  
  606. -- 9 - Mesh
  607. P9 = Instance.new("CylinderMesh")
  608. P9.Scale = Vector3.new(1, 0.5, 1)
  609. P9.Parent = P8
  610.  
  611. -- 10 - RP3
  612. P10 = Instance.new("Part")
  613. P10.CFrame = CFrame.new(Vector3.new(21.3000011, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  614. P10.FormFactor = Enum.FormFactor.Custom
  615. P10.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  616. P10.Anchored = true
  617. P10.BrickColor = BrickColor.new("White")
  618. P10.Friction = 0.30000001192093
  619. P10.Shape = Enum.PartType.Block
  620. P10.Name = "RP3"
  621. P10.Parent = P2
  622. P10.Transparency = 1
  623.  
  624. -- 11 - Mesh
  625. P11 = Instance.new("CylinderMesh")
  626. P11.Scale = Vector3.new(1, 0.5, 1)
  627. P11.Parent = P10
  628.  
  629.  
  630. -- 12 - LP1
  631. P12 = Instance.new("Part")
  632. P12.CFrame = CFrame.new(Vector3.new(17.8999996, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  633. P12.FormFactor = Enum.FormFactor.Custom
  634. P12.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  635. P12.Anchored = true
  636. P12.BrickColor = BrickColor.new("White")
  637. P12.Friction = 0.30000001192093
  638. P12.Shape = Enum.PartType.Block
  639. P12.Name = "LP1"
  640. P12.Parent = P4
  641. P12.Transparency = 1
  642.  
  643. -- 13 - Mesh
  644. P13 = Instance.new("CylinderMesh")
  645. P13.Scale = Vector3.new(1, 0.5, 1)
  646. P13.Parent = P12
  647.  
  648. -- 14 - LP2
  649. P14 = Instance.new("Part")
  650. P14.CFrame = CFrame.new(Vector3.new(18.1000004, 1.8499999, 11.6999998)) * CFrame.Angles(-0, 0, -0)
  651. P14.FormFactor = Enum.FormFactor.Custom
  652. P14.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  653. P14.Anchored = true
  654. P14.BrickColor = BrickColor.new("White")
  655. P14.Friction = 0.30000001192093
  656. P14.Shape = Enum.PartType.Block
  657. P14.Name = "LP2"
  658. P14.Parent = P4
  659. P14.Transparency = 1
  660.  
  661. -- 15 - Mesh
  662. P15 = Instance.new("CylinderMesh")
  663. P15.Scale = Vector3.new(1, 0.5, 1)
  664. P15.Parent = P14
  665.  
  666.  
  667. -- 16 - LP3
  668. P16 = Instance.new("Part")
  669. P16.CFrame = CFrame.new(Vector3.new(18.3000011, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  670. P16.FormFactor = Enum.FormFactor.Custom
  671. P16.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  672. P16.Anchored = true
  673. P16.BrickColor = BrickColor.new("White")
  674. P16.Friction = 0.30000001192093
  675. P16.Shape = Enum.PartType.Block
  676. P16.Name = "LP3"
  677. P16.Parent = P4
  678. P16.Transparency = 1
  679.  
  680. -- 17 - Mesh
  681. P17 = Instance.new("CylinderMesh")
  682. P17.Scale = Vector3.new(1, 0.5, 1)
  683. P17.Parent = P16
  684.  
  685. P1.Parent = LP.Character
  686. P1:MakeJoints()
  687. return P1
  688. end
  689.  
  690. weldModel = function(model, unanchor, rooty)
  691. local parts = {}
  692. local function recurse(object)
  693. if object:IsA("BasePart") then
  694. table.insert(parts, object)
  695. end
  696. for _,child in pairs(object:GetChildren()) do
  697. recurse(child)
  698. end
  699. end
  700. recurse(model)
  701.  
  702. local rootPart = rooty or parts[1]
  703. for _, part in pairs(parts) do
  704. local cframe = rootPart.CFrame:toObjectSpace(part.CFrame)
  705. local weld = Instance.new("Weld")
  706. weld.Part0 = rootPart
  707. weld.Part1 = part
  708. weld.C0 = cframe
  709. weld.Parent = rootPart
  710. end
  711.  
  712. if unanchor then
  713. for _, part in pairs(parts) do
  714. part.Anchored = false
  715. part.CanCollide = false
  716. end
  717. end
  718. end
  719.  
  720. weldItem = function(rootPart, Item, TheC0, unanchor, ParentItem)
  721. local cframe = TheC0 or rootPart.CFrame:toObjectSpace(Item.CFrame)
  722. local weld = Instance.new("Weld")
  723. weld.Name = "Weld"
  724. weld.Part0 = rootPart
  725. weld.Part1 = Item
  726. weld.C0 = cframe
  727. weld.Parent = ParentItem and Item or rootPart
  728.  
  729. if unanchor then
  730. Item.Anchored = false
  731. end
  732. return weld, cframe
  733. end
  734.  
  735. scaleModel = function(model, scale)
  736. local parts = {}
  737. local function recurse(object)
  738. if object:IsA("BasePart") then
  739. table.insert(parts, object)
  740. end
  741. for _,child in pairs(object:GetChildren()) do
  742. recurse(child)
  743. end
  744. end
  745. recurse(model)
  746.  
  747. local top, bottom, left, right, back, front
  748. for _, part in pairs(parts) do
  749. if top == nil or top < part.Position.y then top = part.Position.y end
  750. if bottom == nil or bottom > part.Position.y then bottom = part.Position.y end
  751. if left == nil or left > part.Position.x then left = part.Position.x end
  752. if right == nil or right < part.Position.x then right = part.Position.x end
  753. if back == nil or back > part.Position.z then back = part.Position.z end
  754. if front == nil or front < part.Position.z then front = part.Position.z end
  755. end
  756.  
  757. local middle = Vector3.new( left+right, top+bottom, back+front )/2
  758. local minSize = Vector3.new(0.2, 0.2, 0.2)
  759.  
  760. for _, part in pairs(parts) do
  761. local foo = part.CFrame.p - middle
  762. local rotation = part.CFrame - part.CFrame.p
  763. local newSize = part.Size*scale
  764. part.FormFactor = "Custom"
  765. part.Size = newSize
  766. part.CFrame = CFrame.new( middle + foo*scale ) * rotation
  767.  
  768. if newSize.x < minSize.x or newSize.y < minSize.y or newSize.z < minSize.z then
  769. local mesh
  770. for _, child in pairs(part:GetChildren()) do
  771. if child:IsA("DataModelMesh") then
  772. mesh = child
  773. break
  774. end
  775. end
  776.  
  777. if mesh == nil then
  778. mesh = Instance.new("BlockMesh", part)
  779. end
  780.  
  781. local oScale = mesh.Scale
  782. local newScale = newSize/minSize * oScale
  783. if 0.2 < newSize.x then newScale = Vector3.new(1 * oScale.x, newScale.y, newScale.z) end
  784. if 0.2 < newSize.y then newScale = Vector3.new(newScale.x, 1 * oScale.y, newScale.z) end
  785. if 0.2 < newSize.z then newScale = Vector3.new(newScale.x, newScale.y, 1 * oScale.z) end
  786.  
  787. mesh.Scale = newScale
  788. end
  789. end
  790. end
  791.  
  792. function getMass(Obj, Total)
  793. local newTotal = Total
  794. local returnTotal = 0
  795.  
  796. if Obj:IsA("BasePart") then
  797. newTotal = newTotal + Objects[Obj]
  798. elseif BodyObjects[Obj.ClassName] then
  799. Obj:Destroy()
  800. end
  801.  
  802. if Obj:GetChildren() and #Obj:GetChildren() > 0 then
  803. for _,v in pairs(Obj:GetChildren()) do
  804. returnTotal = returnTotal + getMass(v, newTotal)
  805. end
  806. else
  807. returnTotal = newTotal
  808. end
  809.  
  810. return returnTotal
  811. end
  812.  
  813. function getTargFromCurrent()
  814. local Current = Current.Part
  815. if Current:IsA("BasePart") then
  816. return Current
  817. elseif Current:findFirstChild("Torso") then
  818. return Current.Torso
  819. else
  820. for _,v in pairs(Current:GetChildren()) do
  821. if v:IsA("BasePart") then
  822. return v
  823. end
  824. end
  825. end
  826. end
  827.  
  828. function Fire(Part, Vec, Inv)
  829. pcall(function()
  830. Current.BP:Destroy()
  831. Current.BP = nil
  832. end)
  833. pcall(function()
  834. Current.BA:Destroy()
  835. Current.BA = nil
  836. end)
  837. pcall(function()
  838. if Inv then
  839. Part.Velocity = -((Vec - Torso.Position).unit * Grav * 1.1)
  840. else
  841. Part.Velocity = ((Vec - Camera.CoordinateFrame.p).unit * Grav * 1.1)
  842. end
  843. Current.Mass = nil
  844. end)
  845. Reset()
  846. end
  847.  
  848. function Reset()
  849. LS.Parent = nil
  850. RS.Parent = nil
  851.  
  852. OrigLS.Parent = Torso
  853. OrigRS.Parent = Torso
  854.  
  855. OrigLS.C0 = LS0
  856. OrigRS.C0 = RS0
  857. end
  858.  
  859. function Start()
  860. Cor(function()
  861. repeat wait(1/30) until LP.Character and LP.Character.Parent == Workspace and LP.Character:findFirstChild("Torso")
  862. Char = LP.Character
  863. PlrGui = LP.PlayerGui
  864. Backpack = LP.Backpack
  865. Mouse = LP:GetMouse()
  866.  
  867. for _,v in pairs(Cons) do
  868. v:disconnect()
  869. end
  870. Cons = {}
  871.  
  872. Camera = Workspace.CurrentCamera
  873. LastCamCF = Camera.CoordinateFrame
  874. AnimJoints = {}
  875. mDown = false
  876. Multi = false
  877. Grabbing = false
  878. Current = {}
  879. Alpha = 1
  880.  
  881. Head = Char["Head"]
  882. Torso = Char["Torso"]
  883. Humanoid = Char["Humanoid"]
  884. LA = Char["Left Arm"]
  885. RA = Char["Right Arm"]
  886. LL = Char["Left Leg"]
  887. RL = Char["Right Leg"]
  888.  
  889. OrigLS = Torso["Left Shoulder"]
  890. OrigRS = Torso["Right Shoulder"]
  891.  
  892. for _,v in pairs(Char:GetChildren()) do
  893. if v.Name == ModID then
  894. v:Destroy()
  895. end
  896. end
  897.  
  898. for _,v in pairs(PlrGui:GetChildren()) do
  899. if v.Name == "PadsGui" then
  900. v:Destroy()
  901. end
  902. end
  903.  
  904. LS = Instance.new("Weld")
  905. RS = Instance.new("Weld")
  906.  
  907. LS.Name = OrigLS.Name
  908. LS.Part0 = Torso
  909. LS.Part1 = LA
  910. LS.C0 = LS0
  911. LS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  912.  
  913. RS.Name = OrigRS.Name
  914. RS.Part0 = Torso
  915. RS.Part1 = RA
  916. RS.C0 = RS0
  917. RS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  918.  
  919. local Pads = MakePads()
  920. local LPad = Pads.LBase
  921. local RPad = Pads.RBase
  922.  
  923. weldModel(LPad, true, LPad)
  924. weldModel(RPad, true, RPad)
  925.  
  926. local GripWeldL = Instance.new("Weld")
  927. GripWeldL.Name = "GripWeldL"
  928. GripWeldL.Part0 = LA
  929. GripWeldL.Part1 = LPad
  930. GripWeldL.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  931. GripWeldL.Parent = LA
  932.  
  933. local GripWeldR = Instance.new("Weld")
  934. GripWeldR.Name = "GripWeldR"
  935. GripWeldR.Part0 = RA
  936. GripWeldR.Part1 = RPad
  937. GripWeldR.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  938. GripWeldR.Parent = RA
  939.  
  940. local isParts = false
  941.  
  942. table.insert(Cons, Mouse.KeyDown:connect(function(Key)
  943. Key = Key:lower()
  944. if Key == "z" then
  945. --Stuff
  946. elseif Key == "f" then
  947. local Current = Current.Part
  948. if Current and Current.Parent ~= nil and not Multi then
  949. Current:BreakJoints()
  950. end
  951. elseif Key == "q" then
  952. if isParts then
  953. isParts = false
  954. for _,v in pairs(Workspace:GetChildren()) do
  955. if v.Name == "MyPartV" and v:IsA("BasePart") then
  956. v:Destroy()
  957. end
  958. end
  959. else
  960. isParts = true
  961. for i = 1, 50 do
  962. local Part = Instance.new("Part")
  963. Part.Color = Color3.new(math.random(), math.random(), math.random())
  964. Part.Transparency = 1
  965. Part.Size = Vector3.new(math.random(1, 3), math.random(1, 3), math.random(1, 3))
  966. Part.Archivable = true
  967. Part.CanCollide = false
  968. Part.Material = "Plastic"
  969. Part.Locked = false
  970. Part.CFrame = Torso.CFrame * CFrame.new(math.random(-15, 15), -1, math.random(-15, 15))
  971. Part.Anchored = true
  972. Part.Name = "MyPartV"
  973. Part.TopSurface = "Smooth"
  974. Part.BottomSurface = "Smooth"
  975. Part.Parent = Workspace
  976. end
  977. end
  978. elseif Key == "e" then
  979. local Targ;
  980. if Current.Part and Current.Part ~= nil then
  981. Targ = getTargFromCurrent()
  982. else
  983. Targ = LastPart
  984. end
  985. if Targ and Targ.Parent ~= nil and not Multi then
  986. local Ex = Instance.new("Explosion", Workspace)
  987. Ex.Position = Targ.CFrame.p
  988. Ex.BlastRadius = 16
  989. Ex.DestroyJointRadiusPercent = 0.5
  990. end
  991. elseif Key == "c" then
  992. if Current.Part and Current.Part.Parent ~= nil and not Multi then
  993. local Part = getTargFromCurrent()
  994. if Part then
  995. Grabbing = false
  996. if Mouse.Hit then
  997. local TargPos = CFrame.new(Camera.CoordinateFrame.p, Mouse.Hit.p) * CFrame.new(0, 0, -1000)
  998. Fire(Part, TargPos.p)
  999. else
  1000. Fire(Part, Mouse.Origin.p + Mouse.UnitRay.Direction, true)
  1001. end
  1002. end
  1003. end
  1004. end
  1005. end))
  1006.  
  1007. table.insert(Cons, Mouse.Button1Up:connect(function()
  1008. mDown = false
  1009. if Grabbing == true and Multi == false then
  1010. Grabbing = false
  1011. Reset()
  1012. end
  1013. if Current.Part ~= nil then
  1014. LastPart = getTargFromCurrent()
  1015. Current = {}
  1016. end
  1017. end))
  1018.  
  1019. local function makeLightning(Par, Start, End, Width, Length, RandomScale, ArcScale, Num1)
  1020. local oldParts = {}
  1021. for _,v in pairs(Par:GetChildren()) do
  1022. v.CFrame = CFrame.new(5e5, 5e5, 5e5)
  1023. table.insert(oldParts, v)
  1024. end
  1025. local Distance = (Start-End).Magnitude
  1026. local ArcScale = ArcScale or 1
  1027. local RandomScale = RandomScale or 0
  1028. local Last = Start
  1029. local IterNum = 0
  1030.  
  1031. while Par.Parent do
  1032. IterNum = IterNum + 1
  1033. local New = nil
  1034. if (Last-End).Magnitude < Length then
  1035. New = CFrame.new(End)
  1036. else
  1037. if (End-Last).Magnitude < Length*2 then
  1038. RandomScale = RandomScale*0.5
  1039. ArcScale = ArcScale*0.5
  1040. end
  1041. local Direct = CFrame.new(Last,End)
  1042. New = Direct*CFrame.Angles(math.rad(math.random(-RandomScale/4,RandomScale*ArcScale)),math.rad(math.random(-RandomScale,RandomScale)),math.rad(math.random(-RandomScale,RandomScale)))
  1043. New = New*CFrame.new(0,0,-Length)
  1044. end
  1045. local Trail = nil
  1046. if oldParts[IterNum] then
  1047. Trail = oldParts[IterNum]
  1048. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  1049. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  1050. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  1051. oldParts[IterNum] = nil
  1052. else
  1053. Trail = Instance.new("Part")
  1054. Trail.Name = "Part"
  1055. Trail.FormFactor = "Custom"
  1056. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  1057. Trail.Transparency = 1
  1058. Trail.Anchored = true
  1059. Trail.CanCollide = false
  1060. Trail.Locked = true
  1061. Trail.BackSurface = "SmoothNoOutlines"
  1062. Trail.BottomSurface = "SmoothNoOutlines"
  1063. Trail.FrontSurface = "SmoothNoOutlines"
  1064. Trail.LeftSurface = "SmoothNoOutlines"
  1065. Trail.RightSurface = "SmoothNoOutlines"
  1066. Trail.TopSurface = "SmoothNoOutlines"
  1067. Trail.Material = "Neon"
  1068. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  1069. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  1070. Trail.Parent = Par
  1071. end
  1072. Last = New.p
  1073. if (Last-End).Magnitude < 1 then
  1074. break
  1075. end
  1076. end
  1077. for _,v in pairs(oldParts) do
  1078. v:Destroy()
  1079. end
  1080. end
  1081.  
  1082. table.insert(Cons, Mouse.Button1Down:connect(function()
  1083. mDown = true
  1084. local Targ = Mouse.Target
  1085. Cor(function()
  1086. if Targ and Objects[Targ] and not Multi then
  1087. Grabbing = true
  1088. Current.Part = Targ
  1089. local Mass = Objects[Targ]
  1090. local ForceNum = 0
  1091. local Hum = nil
  1092.  
  1093. for _,v in pairs(Targ:GetChildren()) do
  1094. if BodyObjects[v.ClassName] then
  1095. v:Destroy()
  1096. end
  1097. end
  1098.  
  1099. for _,v in pairs(Workspace:GetChildren()) do
  1100. if v:findFirstChild("Humanoid") and v:IsAncestorOf(Targ) then
  1101. Hum = v.Humanoid
  1102. Mass = getMass(v, 0)
  1103. Current.Part = v
  1104. break
  1105. end
  1106. end
  1107.  
  1108. Current.Mass = Mass
  1109.  
  1110. if not Hum then
  1111. Targ:BreakJoints()
  1112. end
  1113.  
  1114. ForceNum = Mass * Grav
  1115. Targ.CanCollide = true
  1116. Targ.Anchored = false
  1117.  
  1118. local BP = Instance.new("BodyPosition")
  1119. BP.maxForce = Vector3.new(3 * ForceNum, 3 * ForceNum, 3 * ForceNum)
  1120. BP.Parent = Targ
  1121.  
  1122. local Ang = Instance.new("BodyAngularVelocity")
  1123. Ang.Parent = Targ
  1124.  
  1125. Current.BP = BP
  1126. Current.BA = Ang
  1127.  
  1128. OrigLS.Parent = nil
  1129. OrigRS.Parent = nil
  1130.  
  1131. LS.Parent = Torso
  1132. RS.Parent = Torso
  1133.  
  1134. LS.C0 = LS0
  1135. RS.C0 = RS0
  1136.  
  1137. local DirDot = Mouse.UnitRay.Direction:Dot(Targ.Position - Mouse.Origin.p)
  1138. local BPPos = Vector3.new(0, 0, 0)
  1139. local Vel = Vector3.new(0, 0, 0)
  1140. local Vlev = random() * math.pi
  1141. local RPos = Vector3.new(random() * 2 - 1, cos(Vlev), random() * 2 - 1)
  1142.  
  1143. local Ball = Instance.new("Part")
  1144. Ball.Name = "Ball"
  1145. Ball.FormFactor = "Custom"
  1146. Ball.Color = Color3.new(0, 0, 0)
  1147. Ball.Transparency = 1
  1148. Ball.Anchored = true
  1149. Ball.CanCollide = false
  1150. Ball.Locked = true
  1151. Ball.BottomSurface, Ball.TopSurface = "Smooth", "Smooth"
  1152. Ball.Size = Vector3.new(0.5, 0.5, 0.5)
  1153. Ball.CFrame = Torso.CFrame * CFrame.new(0, 1, -3)
  1154. Ball.Parent = Char
  1155.  
  1156. if Targ.Name == "MyPartV" then
  1157. Targ.Name = "MyPartF"
  1158. end
  1159.  
  1160. local LightMod = Instance.new("Model", Char)
  1161.  
  1162. local Mesh = Instance.new("SpecialMesh")
  1163. Mesh.MeshType = "Sphere"
  1164. Mesh.Parent = Ball
  1165.  
  1166. local Size = 1
  1167. local Rise = true
  1168.  
  1169. while Grabbing and BP and Ang and Targ.Parent ~= nil do
  1170. local BPPos = Mouse.Origin.p + Mouse.UnitRay.Direction * DirDot
  1171. Ang.angularvelocity = Vel
  1172. BP.position = BPPos + RPos
  1173. 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)))
  1174. 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)))
  1175. Vlev = (Vlev + 0.05) % tau
  1176.  
  1177. if Hum then
  1178. Hum.Sit = true
  1179. end
  1180.  
  1181. if LA.Parent ~= nil and RA.Parent ~= nil then
  1182. local LPos = (LA.CFrame * CFrame.new(0, -1, 0)).p
  1183. local RPos = (RA.CFrame * CFrame.new(0, -1, 0)).p
  1184. if Rise == true then
  1185. if Size < 0.6 then
  1186. Size = Size + 0.05
  1187. else
  1188. Size = Size + 0.1
  1189. end
  1190. if Size >= 2.2 then
  1191. Rise = false
  1192. end
  1193. else
  1194. if Size > 2.1 then
  1195. Size = Size - 0.05
  1196. else
  1197. Size = Size - 0.1
  1198. end
  1199. if Size <= 0.5 then
  1200. Rise = true
  1201. end
  1202. end
  1203. Ball.Size = Vector3.new(Size, Size, Size)
  1204. Ball.CFrame = CFrame.new(LPos:Lerp(RPos, 0.5), Targ.Position) * CFrame.new(0, 0, -2.2)
  1205. LightNum = LightNum + 1
  1206. makeLightning(LightMod, Ball.Position, Targ.Position, 0.2, 4, 50, 1, LightNum)
  1207. elseif Ball.Parent ~= nil then
  1208. Ball:Destroy()
  1209. end
  1210.  
  1211. if LS and LS.Parent == Torso then
  1212. 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))
  1213. end
  1214. if RS and RS.Parent == Torso then
  1215. 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))
  1216. end
  1217. RunService.Heartbeat:wait()
  1218. end
  1219.  
  1220. coroutine.resume(coroutine.create(function()
  1221. for i = 0.5, 1, 0.1 do
  1222. for i2,v in pairs(LightMod:GetChildren()) do
  1223. --v.Light.Range = 6-(i*5)
  1224. v.Transparency = 1
  1225. end
  1226. wait(1/30)
  1227. end
  1228. LightMod:Destroy()
  1229. end))
  1230.  
  1231. if BP and BP.Parent ~= nil then
  1232. BP:Destroy()
  1233. end
  1234.  
  1235. if Ang and Ang.Parent ~= nil then
  1236. Ang:Destroy()
  1237. end
  1238.  
  1239. pcall(function() Ball:Destroy() end)
  1240. end
  1241. end)
  1242. end))
  1243. end)
  1244. end
  1245.  
  1246. function Add(Obj)
  1247. if Obj:IsA("BasePart") and not Objects[Obj] and not (Obj.Name == "Base" and Obj.ClassName == "Part") then
  1248. Objects[Obj] = Obj:GetMass()
  1249. Obj.Changed:connect(function(P)
  1250. if P:lower() == "size" and Objects[Obj] and Obj.Parent ~= nil then
  1251. Objects[Obj] = Obj:GetMass()
  1252. end
  1253. end)
  1254. end
  1255. end
  1256.  
  1257. function Rem(Obj)
  1258. if Objects[Obj] then
  1259. Objects[Obj] = nil
  1260. end
  1261. end
  1262.  
  1263. function Recursion(Obj)
  1264. ypcall(function()
  1265. Add(Obj)
  1266. if #Obj:GetChildren() > 0 then
  1267. for _,v in pairs(Obj:GetChildren()) do
  1268. Recursion(v)
  1269. end
  1270. end
  1271. end)
  1272. end
  1273.  
  1274. Workspace.DescendantAdded:connect(function(Obj)
  1275. Add(Obj)
  1276. end)
  1277.  
  1278. Workspace.DescendantRemoving:connect(function(Obj)
  1279. Rem(Obj)
  1280. end)
  1281.  
  1282. for _,v in pairs(Workspace:GetChildren()) do
  1283. Recursion(v)
  1284. end
  1285. local isScriptNil = false
  1286.  
  1287. local PlrName = "saud20"
  1288. local Plrs = game:GetService("Players")
  1289. local RunService = game:GetService("RunService")
  1290. local Content = game:GetService("ContentProvider")
  1291. local LP = Plrs.LocalPlayer
  1292. local Char = LP.Character
  1293. local PlrGui = LP.PlayerGui
  1294. local Backpack = LP.Backpack
  1295. local Mouse = LP:GetMouse()
  1296.  
  1297. local Camera = Workspace.CurrentCamera
  1298. local LastCamCF = Camera.CoordinateFrame
  1299. local AnimJoints = {}
  1300. local Cons = {}
  1301. local mDown = false
  1302. local Multi = false
  1303. local Grabbing = false
  1304. local Current = {}
  1305. local Alpha = 1
  1306. local LightNum = 1
  1307.  
  1308. Current.Part = nil
  1309. Current.BP = nil
  1310. Current.BA = nil
  1311. Current.Mass = nil
  1312.  
  1313. local LastPart = nil
  1314.  
  1315. local Head = Char["Head"]
  1316. local Torso = Char["Torso"]
  1317. local Humanoid = Char["Humanoid"]
  1318. local LA = Char["Left Arm"]
  1319. local RA = Char["Right Arm"]
  1320. local LL = Char["Left Leg"]
  1321. local RL = Char["Right Leg"]
  1322.  
  1323. local LS, RS;
  1324.  
  1325. local OrigLS = Torso["Left Shoulder"]
  1326. local OrigRS = Torso["Right Shoulder"]
  1327.  
  1328. for _,v in pairs(Char:GetChildren()) do
  1329. if v.Name == ModID then
  1330. v:Destroy()
  1331. end
  1332. end
  1333.  
  1334. for _,v in pairs(PlrGui:GetChildren()) do
  1335. if v.Name == "PadsGui" then
  1336. v:Destroy()
  1337. end
  1338. end
  1339.  
  1340. local ModID = "Pads"
  1341. local Objects = {}
  1342. local Grav = 196.2
  1343.  
  1344. local sin=math.sin
  1345. local cos=math.cos
  1346. local max=math.max
  1347. local min=math.min
  1348. local atan2=math.atan2
  1349. local random=math.random
  1350. local tau = 2 * math.pi
  1351.  
  1352. local BodyObjects = {
  1353. ["BodyVelocity"] = true;
  1354. ["BodyAngularVelocity"] = true;
  1355. ["BodyForce"] = true;
  1356. ["BodyThrust"] = true;
  1357. ["BodyPosition"] = true;
  1358. ["RocketPropulsion"] = true;
  1359. }
  1360.  
  1361. if LP.Name == PlrName and isScriptNil then
  1362. script.Parent = nil
  1363. end
  1364.  
  1365. LP.CameraMode = "Classic"
  1366.  
  1367. local Assets = {
  1368. }
  1369.  
  1370. local LS0, LS1 = OrigLS.C0, OrigLS.C1
  1371. local RS0, RS1 = OrigRS.C0, OrigRS.C1
  1372.  
  1373. for i,v in pairs(Assets) do
  1374. local ID = tostring(Assets[i])
  1375. Assets[i] = "http://www.roblox.com/asset/?id=" .. ID
  1376. Content:Preload("http://www.roblox.com/asset/?id=" .. ID)
  1377. end
  1378.  
  1379. function QuaternionFromCFrame(cf)
  1380. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
  1381. local trace = m00 + m11 + m22 if trace > 0 then
  1382. local s = math.sqrt(1 + trace);
  1383. local recip = 0.5/s;
  1384. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
  1385. else
  1386. local i = 0;
  1387. if m11 > m00 then
  1388. i = 1;
  1389. end;
  1390. if m22 > (i == 0 and m00 or m11) then
  1391. i = 2 end if i == 0 then
  1392. local s = math.sqrt(m00-m11-m22+1);
  1393. local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
  1394. elseif i == 1 then
  1395. local s = math.sqrt(m11-m22-m00+1);
  1396. local recip = 0.5/s;
  1397. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
  1398. elseif i == 2 then
  1399. local s = math.sqrt(m22-m00-m11+1);
  1400. local recip = 0.5/s;
  1401. return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
  1402. end;
  1403. end;
  1404. end;
  1405.  
  1406. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1407. local xs, ys, zs = x + x, y + y, z + z;
  1408. local wx, wy, wz = w*xs, w*ys, w*zs;
  1409. local xx = x*xs;
  1410. local xy = x*ys;
  1411. local xz = x*zs;
  1412. local yy = y*ys;
  1413. local yz = y*zs;
  1414. local zz = z*zs;
  1415. 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))
  1416. end;
  1417.  
  1418. function QuaternionSlerp(a, b, t)
  1419. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
  1420. local startInterp, finishInterp;
  1421. if cosTheta >= 0.0001 then
  1422. if (1 - cosTheta) > 0.0001 then
  1423. local theta = math.acos(cosTheta);
  1424. local invSinTheta = 1/math.sin(theta);
  1425. startInterp = math.sin((1-t)*theta)*invSinTheta;
  1426. finishInterp = math.sin(t*theta)*invSinTheta;
  1427. else
  1428. startInterp = 1-t finishInterp = t;
  1429. end;
  1430. else
  1431. if (1+cosTheta) > 0.0001 then
  1432. local theta = math.acos(-cosTheta);
  1433. local invSinTheta = 1/math.sin(theta);
  1434. startInterp = math.sin((t-1)*theta)*invSinTheta;
  1435. finishInterp = math.sin(t*theta)*invSinTheta;
  1436. else startInterp = t-1 finishInterp = t;
  1437. end;
  1438. end;
  1439. 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;
  1440. end;
  1441.  
  1442. function CLerp(a,b,t)
  1443. local qa={QuaternionFromCFrame(a)};
  1444. local qb={QuaternionFromCFrame(b)};
  1445. local ax,ay,az=a.x,a.y,a.z;
  1446. local bx,by,bz=b.x,b.y,b.z;
  1447. local _t=1-t;
  1448. return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
  1449. end
  1450.  
  1451. function GetWeld(weld)
  1452. local obj
  1453. for i, v in pairs(AnimJoints) do
  1454. if v[1] == weld then
  1455. obj = v
  1456. break
  1457. end
  1458. end
  1459. if not obj then
  1460. obj = {weld,NV}
  1461. table.insert(AnimJoints,obj)
  1462. end
  1463. return weld.C0.p, obj[2]
  1464. end
  1465.  
  1466. function SetWeld(weld, i, loops, origpos, origangle, nextpos, nextangle, override, overrideLower, smooth)
  1467. smooth = smooth or 1
  1468. local obj
  1469. for i, v in pairs(AnimJoints) do
  1470. if v[1] == weld then
  1471. obj = v
  1472. break
  1473. end
  1474. end
  1475. if not obj then
  1476. obj = {weld,NV}
  1477. table.insert(AnimJoints,obj)
  1478. end
  1479.  
  1480. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  1481.  
  1482. local tox,toy,toz = 0,0,0
  1483. tox = math.abs(origangle.x - nextangle.x) *perc
  1484. toy = math.abs(origangle.y - nextangle.y) *perc
  1485. toz = math.abs(origangle.z - nextangle.z) *perc
  1486. tox = ((origangle.x > nextangle.x and -tox) or tox)
  1487. toy = ((origangle.y > nextangle.y and -toy) or toy)
  1488. toz = ((origangle.z > nextangle.z and -toz) or toz)
  1489.  
  1490. local tox2,toy2,toz2 = 0,0,0
  1491. tox2 = math.abs(origpos.x - nextpos.x) *perc
  1492. toy2 = math.abs(origpos.y - nextpos.y) *perc
  1493. toz2 = math.abs(origpos.z - nextpos.z) *perc
  1494. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  1495. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  1496. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  1497.  
  1498. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  1499. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  1500. end
  1501.  
  1502. function RotateCamera(x, y)
  1503. 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)
  1504. end
  1505.  
  1506. function GetAngles(cf)
  1507. local lv = cf.lookVector
  1508. return -math.asin(lv.y), math.atan2(lv.x, -lv.z)
  1509. end
  1510.  
  1511. local LastCamCF = Camera.CoordinateFrame
  1512.  
  1513. function Look()
  1514. if AlphaOn == true then
  1515. local x, y = GetAngles(LastCamCF:toObjectSpace(Camera.CoordinateFrame))
  1516. Camera.CoordinateFrame = LastCamCF
  1517. RotateCamera(x * -(Alpha), y * -(Alpha))
  1518. LastCamCF = Camera.CoordinateFrame
  1519. end
  1520. end
  1521.  
  1522. function Cor(Func)
  1523. local Ok, Err = coroutine.resume(coroutine.create(Func))
  1524. if not Ok then
  1525. print(Err)
  1526. end
  1527. end
  1528.  
  1529. function Cor2(Func)
  1530. local Ok, Err = ypcall(Func)
  1531. if not Ok then
  1532. print(Err)
  1533. end
  1534. end
  1535.  
  1536. function MakePads()
  1537. -- 1 - VTelekinesis
  1538. P1 = Instance.new("Model")
  1539. P1.Name = ModID
  1540.  
  1541. -- 2 - RBase
  1542. P2 = Instance.new("Part")
  1543. P2.CFrame = CFrame.new(Vector3.new(21.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  1544. P2.FormFactor = Enum.FormFactor.Custom
  1545. P2.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  1546. P2.Anchored = true
  1547. P2.BrickColor = BrickColor.new("White")
  1548. P2.Friction = 0.30000001192093
  1549. P2.Shape = Enum.PartType.Block
  1550. P2.Name = "RBase"
  1551. P2.Parent = P1
  1552. P2.Transparency = 1
  1553.  
  1554. -- 3 - Mesh
  1555. P3 = Instance.new("CylinderMesh")
  1556. P3.Scale = Vector3.new(1, 0.5, 1)
  1557. P3.Parent = P2
  1558.  
  1559. -- 4 - LBase
  1560. P4 = Instance.new("Part")
  1561. P4.CFrame = CFrame.new(Vector3.new(18.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  1562. P4.FormFactor = Enum.FormFactor.Custom
  1563. P4.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  1564. P4.Anchored = true
  1565. P4.BrickColor = BrickColor.new("White")
  1566. P4.Friction = 0.30000001192093
  1567. P4.Shape = Enum.PartType.Block
  1568. P4.Name = "LBase"
  1569. P4.Parent = P1
  1570. P4.Transparency = 1
  1571.  
  1572. -- 5 - Mesh
  1573. P5 = Instance.new("CylinderMesh")
  1574. P5.Scale = Vector3.new(1, 0.5, 1)
  1575. P5.Parent = P4
  1576.  
  1577.  
  1578. -- 6 - RP1
  1579. P6 = Instance.new("Part")
  1580. P6.CFrame = CFrame.new(Vector3.new(20.8999996, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  1581. P6.FormFactor = Enum.FormFactor.Custom
  1582. P6.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1583. P6.Anchored = true
  1584. P6.BrickColor = BrickColor.new("White")
  1585. P6.Friction = 0.30000001192093
  1586. P6.Shape = Enum.PartType.Block
  1587. P6.Name = "RP1"
  1588. P6.Parent = P2
  1589. P6.Transparency = 1
  1590. -- 7 - Mesh
  1591. P7 = Instance.new("CylinderMesh")
  1592. P7.Scale = Vector3.new(1, 0.5, 1)
  1593. P7.Parent = P6
  1594.  
  1595.  
  1596. -- 8 - RP2
  1597. P8 = Instance.new("Part")
  1598. P8.CFrame = CFrame.new(Vector3.new(21.1000004, 1.8499999, 11.6999998)) * CFrame.Angles(-0, 0, -0)
  1599. P8.FormFactor = Enum.FormFactor.Custom
  1600. P8.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1601. P8.Anchored = true
  1602. P8.BrickColor = BrickColor.new("White")
  1603. P8.Friction = 0.30000001192093
  1604. P8.Shape = Enum.PartType.Block
  1605. P8.Name = "RP2"
  1606. P8.Parent = P2
  1607. P8.Transparency = 1
  1608.  
  1609. -- 9 - Mesh
  1610. P9 = Instance.new("CylinderMesh")
  1611. P9.Scale = Vector3.new(1, 0.5, 1)
  1612. P9.Parent = P8
  1613.  
  1614. -- 10 - RP3
  1615. P10 = Instance.new("Part")
  1616. P10.CFrame = CFrame.new(Vector3.new(21.3000011, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  1617. P10.FormFactor = Enum.FormFactor.Custom
  1618. P10.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1619. P10.Anchored = true
  1620. P10.BrickColor = BrickColor.new("White")
  1621. P10.Friction = 0.30000001192093
  1622. P10.Shape = Enum.PartType.Block
  1623. P10.Name = "RP3"
  1624. P10.Parent = P2
  1625. P10.Transparency = 1
  1626.  
  1627. -- 11 - Mesh
  1628. P11 = Instance.new("CylinderMesh")
  1629. P11.Scale = Vector3.new(1, 0.5, 1)
  1630. P11.Parent = P10
  1631.  
  1632.  
  1633. -- 12 - LP1
  1634. P12 = Instance.new("Part")
  1635. P12.CFrame = CFrame.new(Vector3.new(17.8999996, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  1636. P12.FormFactor = Enum.FormFactor.Custom
  1637. P12.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1638. P12.Anchored = true
  1639. P12.BrickColor = BrickColor.new("White")
  1640. P12.Friction = 0.30000001192093
  1641. P12.Shape = Enum.PartType.Block
  1642. P12.Name = "LP1"
  1643. P12.Parent = P4
  1644. P12.Transparency = 1
  1645.  
  1646. -- 13 - Mesh
  1647. P13 = Instance.new("CylinderMesh")
  1648. P13.Scale = Vector3.new(1, 0.5, 1)
  1649. P13.Parent = P12
  1650.  
  1651. -- 14 - LP2
  1652. P14 = Instance.new("Part")
  1653. P14.CFrame = CFrame.new(Vector3.new(18.1000004, 1.8499999, 11.6999998)) * CFrame.Angles(-0, 0, -0)
  1654. P14.FormFactor = Enum.FormFactor.Custom
  1655. P14.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1656. P14.Anchored = true
  1657. P14.BrickColor = BrickColor.new("White")
  1658. P14.Friction = 0.30000001192093
  1659. P14.Shape = Enum.PartType.Block
  1660. P14.Name = "LP2"
  1661. P14.Parent = P4
  1662. P14.Transparency = 1
  1663.  
  1664. -- 15 - Mesh
  1665. P15 = Instance.new("CylinderMesh")
  1666. P15.Scale = Vector3.new(1, 0.5, 1)
  1667. P15.Parent = P14
  1668.  
  1669.  
  1670. -- 16 - LP3
  1671. P16 = Instance.new("Part")
  1672. P16.CFrame = CFrame.new(Vector3.new(18.3000011, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  1673. P16.FormFactor = Enum.FormFactor.Custom
  1674. P16.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1675. P16.Anchored = true
  1676. P16.BrickColor = BrickColor.new("White")
  1677. P16.Friction = 0.30000001192093
  1678. P16.Shape = Enum.PartType.Block
  1679. P16.Name = "LP3"
  1680. P16.Parent = P4
  1681. P16.Transparency = 1
  1682.  
  1683. -- 17 - Mesh
  1684. P17 = Instance.new("CylinderMesh")
  1685. P17.Scale = Vector3.new(1, 0.5, 1)
  1686. P17.Parent = P16
  1687.  
  1688. P1.Parent = LP.Character
  1689. P1:MakeJoints()
  1690. return P1
  1691. end
  1692.  
  1693. weldModel = function(model, unanchor, rooty)
  1694. local parts = {}
  1695. local function recurse(object)
  1696. if object:IsA("BasePart") then
  1697. table.insert(parts, object)
  1698. end
  1699. for _,child in pairs(object:GetChildren()) do
  1700. recurse(child)
  1701. end
  1702. end
  1703. recurse(model)
  1704.  
  1705. local rootPart = rooty or parts[1]
  1706. for _, part in pairs(parts) do
  1707. local cframe = rootPart.CFrame:toObjectSpace(part.CFrame)
  1708. local weld = Instance.new("Weld")
  1709. weld.Part0 = rootPart
  1710. weld.Part1 = part
  1711. weld.C0 = cframe
  1712. weld.Parent = rootPart
  1713. end
  1714.  
  1715. if unanchor then
  1716. for _, part in pairs(parts) do
  1717. part.Anchored = false
  1718. part.CanCollide = false
  1719. end
  1720. end
  1721. end
  1722.  
  1723. weldItem = function(rootPart, Item, TheC0, unanchor, ParentItem)
  1724. local cframe = TheC0 or rootPart.CFrame:toObjectSpace(Item.CFrame)
  1725. local weld = Instance.new("Weld")
  1726. weld.Name = "Weld"
  1727. weld.Part0 = rootPart
  1728. weld.Part1 = Item
  1729. weld.C0 = cframe
  1730. weld.Parent = ParentItem and Item or rootPart
  1731.  
  1732. if unanchor then
  1733. Item.Anchored = false
  1734. end
  1735. return weld, cframe
  1736. end
  1737.  
  1738. scaleModel = function(model, scale)
  1739. local parts = {}
  1740. local function recurse(object)
  1741. if object:IsA("BasePart") then
  1742. table.insert(parts, object)
  1743. end
  1744. for _,child in pairs(object:GetChildren()) do
  1745. recurse(child)
  1746. end
  1747. end
  1748. recurse(model)
  1749.  
  1750. local top, bottom, left, right, back, front
  1751. for _, part in pairs(parts) do
  1752. if top == nil or top < part.Position.y then top = part.Position.y end
  1753. if bottom == nil or bottom > part.Position.y then bottom = part.Position.y end
  1754. if left == nil or left > part.Position.x then left = part.Position.x end
  1755. if right == nil or right < part.Position.x then right = part.Position.x end
  1756. if back == nil or back > part.Position.z then back = part.Position.z end
  1757. if front == nil or front < part.Position.z then front = part.Position.z end
  1758. end
  1759.  
  1760. local middle = Vector3.new( left+right, top+bottom, back+front )/2
  1761. local minSize = Vector3.new(0.2, 0.2, 0.2)
  1762.  
  1763. for _, part in pairs(parts) do
  1764. local foo = part.CFrame.p - middle
  1765. local rotation = part.CFrame - part.CFrame.p
  1766. local newSize = part.Size*scale
  1767. part.FormFactor = "Custom"
  1768. part.Size = newSize
  1769. part.CFrame = CFrame.new( middle + foo*scale ) * rotation
  1770.  
  1771. if newSize.x < minSize.x or newSize.y < minSize.y or newSize.z < minSize.z then
  1772. local mesh
  1773. for _, child in pairs(part:GetChildren()) do
  1774. if child:IsA("DataModelMesh") then
  1775. mesh = child
  1776. break
  1777. end
  1778. end
  1779.  
  1780. if mesh == nil then
  1781. mesh = Instance.new("BlockMesh", part)
  1782. end
  1783.  
  1784. local oScale = mesh.Scale
  1785. local newScale = newSize/minSize * oScale
  1786. if 0.2 < newSize.x then newScale = Vector3.new(1 * oScale.x, newScale.y, newScale.z) end
  1787. if 0.2 < newSize.y then newScale = Vector3.new(newScale.x, 1 * oScale.y, newScale.z) end
  1788. if 0.2 < newSize.z then newScale = Vector3.new(newScale.x, newScale.y, 1 * oScale.z) end
  1789.  
  1790. mesh.Scale = newScale
  1791. end
  1792. end
  1793. end
  1794.  
  1795. function getMass(Obj, Total)
  1796. local newTotal = Total
  1797. local returnTotal = 0
  1798.  
  1799. if Obj:IsA("BasePart") then
  1800. newTotal = newTotal + Objects[Obj]
  1801. elseif BodyObjects[Obj.ClassName] then
  1802. Obj:Destroy()
  1803. end
  1804.  
  1805. if Obj:GetChildren() and #Obj:GetChildren() > 0 then
  1806. for _,v in pairs(Obj:GetChildren()) do
  1807. returnTotal = returnTotal + getMass(v, newTotal)
  1808. end
  1809. else
  1810. returnTotal = newTotal
  1811. end
  1812.  
  1813. return returnTotal
  1814. end
  1815.  
  1816. function getTargFromCurrent()
  1817. local Current = Current.Part
  1818. if Current:IsA("BasePart") then
  1819. return Current
  1820. elseif Current:findFirstChild("Torso") then
  1821. return Current.Torso
  1822. else
  1823. for _,v in pairs(Current:GetChildren()) do
  1824. if v:IsA("BasePart") then
  1825. return v
  1826. end
  1827. end
  1828. end
  1829. end
  1830.  
  1831. function Fire(Part, Vec, Inv)
  1832. pcall(function()
  1833. Current.BP:Destroy()
  1834. Current.BP = nil
  1835. end)
  1836. pcall(function()
  1837. Current.BA:Destroy()
  1838. Current.BA = nil
  1839. end)
  1840. pcall(function()
  1841. if Inv then
  1842. Part.Velocity = -((Vec - Torso.Position).unit * Grav * 1.1)
  1843. else
  1844. Part.Velocity = ((Vec - Camera.CoordinateFrame.p).unit * Grav * 1.1)
  1845. end
  1846. Current.Mass = nil
  1847. end)
  1848. Reset()
  1849. end
  1850.  
  1851. function Reset()
  1852. LS.Parent = nil
  1853. RS.Parent = nil
  1854.  
  1855. OrigLS.Parent = Torso
  1856. OrigRS.Parent = Torso
  1857.  
  1858. OrigLS.C0 = LS0
  1859. OrigRS.C0 = RS0
  1860. end
  1861.  
  1862. function Start()
  1863. Cor(function()
  1864. repeat wait(1/30) until LP.Character and LP.Character.Parent == Workspace and LP.Character:findFirstChild("Torso")
  1865. Char = LP.Character
  1866. PlrGui = LP.PlayerGui
  1867. Backpack = LP.Backpack
  1868. Mouse = LP:GetMouse()
  1869.  
  1870. for _,v in pairs(Cons) do
  1871. v:disconnect()
  1872. end
  1873. Cons = {}
  1874.  
  1875. Camera = Workspace.CurrentCamera
  1876. LastCamCF = Camera.CoordinateFrame
  1877. AnimJoints = {}
  1878. mDown = false
  1879. Multi = false
  1880. Grabbing = false
  1881. Current = {}
  1882. Alpha = 1
  1883.  
  1884. Head = Char["Head"]
  1885. Torso = Char["Torso"]
  1886. Humanoid = Char["Humanoid"]
  1887. LA = Char["Left Arm"]
  1888. RA = Char["Right Arm"]
  1889. LL = Char["Left Leg"]
  1890. RL = Char["Right Leg"]
  1891.  
  1892. OrigLS = Torso["Left Shoulder"]
  1893. OrigRS = Torso["Right Shoulder"]
  1894.  
  1895. for _,v in pairs(Char:GetChildren()) do
  1896. if v.Name == ModID then
  1897. v:Destroy()
  1898. end
  1899. end
  1900.  
  1901. for _,v in pairs(PlrGui:GetChildren()) do
  1902. if v.Name == "PadsGui" then
  1903. v:Destroy()
  1904. end
  1905. end
  1906.  
  1907. LS = Instance.new("Weld")
  1908. RS = Instance.new("Weld")
  1909.  
  1910. LS.Name = OrigLS.Name
  1911. LS.Part0 = Torso
  1912. LS.Part1 = LA
  1913. LS.C0 = LS0
  1914. LS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  1915.  
  1916. RS.Name = OrigRS.Name
  1917. RS.Part0 = Torso
  1918. RS.Part1 = RA
  1919. RS.C0 = RS0
  1920. RS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  1921.  
  1922. local Pads = MakePads()
  1923. local LPad = Pads.LBase
  1924. local RPad = Pads.RBase
  1925.  
  1926. weldModel(LPad, true, LPad)
  1927. weldModel(RPad, true, RPad)
  1928.  
  1929. local GripWeldL = Instance.new("Weld")
  1930. GripWeldL.Name = "GripWeldL"
  1931. GripWeldL.Part0 = LA
  1932. GripWeldL.Part1 = LPad
  1933. GripWeldL.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  1934. GripWeldL.Parent = LA
  1935.  
  1936. local GripWeldR = Instance.new("Weld")
  1937. GripWeldR.Name = "GripWeldR"
  1938. GripWeldR.Part0 = RA
  1939. GripWeldR.Part1 = RPad
  1940. GripWeldR.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  1941. GripWeldR.Parent = RA
  1942.  
  1943. local isParts = false
  1944.  
  1945. table.insert(Cons, Mouse.KeyDown:connect(function(Key)
  1946. Key = Key:lower()
  1947. if Key == "z" then
  1948. --Stuff
  1949. elseif Key == "f" then
  1950. local Current = Current.Part
  1951. if Current and Current.Parent ~= nil and not Multi then
  1952. Current:BreakJoints()
  1953. end
  1954. elseif Key == "q" then
  1955. if isParts then
  1956. isParts = false
  1957. for _,v in pairs(Workspace:GetChildren()) do
  1958. if v.Name == "MyPartV" and v:IsA("BasePart") then
  1959. v:Destroy()
  1960. end
  1961. end
  1962. else
  1963. isParts = true
  1964. for i = 1, 50 do
  1965. local Part = Instance.new("Part")
  1966. Part.Color = Color3.new(math.random(), math.random(), math.random())
  1967. Part.Transparency = 1
  1968. Part.Size = Vector3.new(math.random(1, 3), math.random(1, 3), math.random(1, 3))
  1969. Part.Archivable = true
  1970. Part.CanCollide = false
  1971. Part.Material = "Plastic"
  1972. Part.Locked = false
  1973. Part.CFrame = Torso.CFrame * CFrame.new(math.random(-15, 15), -1, math.random(-15, 15))
  1974. Part.Anchored = true
  1975. Part.Name = "MyPartV"
  1976. Part.TopSurface = "Smooth"
  1977. Part.BottomSurface = "Smooth"
  1978. Part.Parent = Workspace
  1979. end
  1980. end
  1981. elseif Key == "e" then
  1982. local Targ;
  1983. if Current.Part and Current.Part ~= nil then
  1984. Targ = getTargFromCurrent()
  1985. else
  1986. Targ = LastPart
  1987. end
  1988. if Targ and Targ.Parent ~= nil and not Multi then
  1989. local Ex = Instance.new("Explosion", Workspace)
  1990. Ex.Position = Targ.CFrame.p
  1991. Ex.BlastRadius = 16
  1992. Ex.DestroyJointRadiusPercent = 0.5
  1993. end
  1994. elseif Key == "c" then
  1995. if Current.Part and Current.Part.Parent ~= nil and not Multi then
  1996. local Part = getTargFromCurrent()
  1997. if Part then
  1998. Grabbing = false
  1999. if Mouse.Hit then
  2000. local TargPos = CFrame.new(Camera.CoordinateFrame.p, Mouse.Hit.p) * CFrame.new(0, 0, -1000)
  2001. Fire(Part, TargPos.p)
  2002. else
  2003. Fire(Part, Mouse.Origin.p + Mouse.UnitRay.Direction, true)
  2004. end
  2005. end
  2006. end
  2007. end
  2008. end))
  2009.  
  2010. table.insert(Cons, Mouse.Button1Up:connect(function()
  2011. mDown = false
  2012. if Grabbing == true and Multi == false then
  2013. Grabbing = false
  2014. Reset()
  2015. end
  2016. if Current.Part ~= nil then
  2017. LastPart = getTargFromCurrent()
  2018. Current = {}
  2019. end
  2020. end))
  2021.  
  2022. local function makeLightning(Par, Start, End, Width, Length, RandomScale, ArcScale, Num1)
  2023. local oldParts = {}
  2024. for _,v in pairs(Par:GetChildren()) do
  2025. v.CFrame = CFrame.new(5e5, 5e5, 5e5)
  2026. table.insert(oldParts, v)
  2027. end
  2028. local Distance = (Start-End).Magnitude
  2029. local ArcScale = ArcScale or 1
  2030. local RandomScale = RandomScale or 0
  2031. local Last = Start
  2032. local IterNum = 0
  2033.  
  2034. while Par.Parent do
  2035. IterNum = IterNum + 1
  2036. local New = nil
  2037. if (Last-End).Magnitude < Length then
  2038. New = CFrame.new(End)
  2039. else
  2040. if (End-Last).Magnitude < Length*2 then
  2041. RandomScale = RandomScale*0.5
  2042. ArcScale = ArcScale*0.5
  2043. end
  2044. local Direct = CFrame.new(Last,End)
  2045. New = Direct*CFrame.Angles(math.rad(math.random(-RandomScale/4,RandomScale*ArcScale)),math.rad(math.random(-RandomScale,RandomScale)),math.rad(math.random(-RandomScale,RandomScale)))
  2046. New = New*CFrame.new(0,0,-Length)
  2047. end
  2048. local Trail = nil
  2049. if oldParts[IterNum] then
  2050. Trail = oldParts[IterNum]
  2051. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  2052. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  2053. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  2054. oldParts[IterNum] = nil
  2055. else
  2056. Trail = Instance.new("Part")
  2057. Trail.Name = "Part"
  2058. Trail.FormFactor = "Custom"
  2059. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  2060. Trail.Transparency = 1
  2061. Trail.Anchored = true
  2062. Trail.CanCollide = false
  2063. Trail.Locked = true
  2064. Trail.BackSurface = "SmoothNoOutlines"
  2065. Trail.BottomSurface = "SmoothNoOutlines"
  2066. Trail.FrontSurface = "SmoothNoOutlines"
  2067. Trail.LeftSurface = "SmoothNoOutlines"
  2068. Trail.RightSurface = "SmoothNoOutlines"
  2069. Trail.TopSurface = "SmoothNoOutlines"
  2070. Trail.Material = "Neon"
  2071. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  2072. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  2073. Trail.Parent = Par
  2074. end
  2075. Last = New.p
  2076. if (Last-End).Magnitude < 1 then
  2077. break
  2078. end
  2079. end
  2080. for _,v in pairs(oldParts) do
  2081. v:Destroy()
  2082. end
  2083. end
  2084.  
  2085. table.insert(Cons, Mouse.Button1Down:connect(function()
  2086. mDown = true
  2087. local Targ = Mouse.Target
  2088. Cor(function()
  2089. if Targ and Objects[Targ] and not Multi then
  2090. Grabbing = true
  2091. Current.Part = Targ
  2092. local Mass = Objects[Targ]
  2093. local ForceNum = 0
  2094. local Hum = nil
  2095.  
  2096. for _,v in pairs(Targ:GetChildren()) do
  2097. if BodyObjects[v.ClassName] then
  2098. v:Destroy()
  2099. end
  2100. end
  2101.  
  2102. for _,v in pairs(Workspace:GetChildren()) do
  2103. if v:findFirstChild("Humanoid") and v:IsAncestorOf(Targ) then
  2104. Hum = v.Humanoid
  2105. Mass = getMass(v, 0)
  2106. Current.Part = v
  2107. break
  2108. end
  2109. end
  2110.  
  2111. Current.Mass = Mass
  2112.  
  2113. if not Hum then
  2114. Targ:BreakJoints()
  2115. end
  2116.  
  2117. ForceNum = Mass * Grav
  2118. Targ.CanCollide = true
  2119. Targ.Anchored = false
  2120.  
  2121. local BP = Instance.new("BodyPosition")
  2122. BP.maxForce = Vector3.new(3 * ForceNum, 3 * ForceNum, 3 * ForceNum)
  2123. BP.Parent = Targ
  2124.  
  2125. local Ang = Instance.new("BodyAngularVelocity")
  2126. Ang.Parent = Targ
  2127.  
  2128. Current.BP = BP
  2129. Current.BA = Ang
  2130.  
  2131. OrigLS.Parent = nil
  2132. OrigRS.Parent = nil
  2133.  
  2134. LS.Parent = Torso
  2135. RS.Parent = Torso
  2136.  
  2137. LS.C0 = LS0
  2138. RS.C0 = RS0
  2139.  
  2140. local DirDot = Mouse.UnitRay.Direction:Dot(Targ.Position - Mouse.Origin.p)
  2141. local BPPos = Vector3.new(0, 0, 0)
  2142. local Vel = Vector3.new(0, 0, 0)
  2143. local Vlev = random() * math.pi
  2144. local RPos = Vector3.new(random() * 2 - 1, cos(Vlev), random() * 2 - 1)
  2145.  
  2146. local Ball = Instance.new("Part")
  2147. Ball.Name = "Ball"
  2148. Ball.FormFactor = "Custom"
  2149. Ball.Color = Color3.new(0, 0, 0)
  2150. Ball.Transparency = 1
  2151. Ball.Anchored = true
  2152. Ball.CanCollide = false
  2153. Ball.Locked = true
  2154. Ball.BottomSurface, Ball.TopSurface = "Smooth", "Smooth"
  2155. Ball.Size = Vector3.new(0.5, 0.5, 0.5)
  2156. Ball.CFrame = Torso.CFrame * CFrame.new(0, 1, -3)
  2157. Ball.Parent = Char
  2158.  
  2159. if Targ.Name == "MyPartV" then
  2160. Targ.Name = "MyPartF"
  2161. end
  2162.  
  2163. local LightMod = Instance.new("Model", Char)
  2164.  
  2165. local Mesh = Instance.new("SpecialMesh")
  2166. Mesh.MeshType = "Sphere"
  2167. Mesh.Parent = Ball
  2168.  
  2169. local Size = 1
  2170. local Rise = true
  2171.  
  2172. while Grabbing and BP and Ang and Targ.Parent ~= nil do
  2173. local BPPos = Mouse.Origin.p + Mouse.UnitRay.Direction * DirDot
  2174. Ang.angularvelocity = Vel
  2175. BP.position = BPPos + RPos
  2176. 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)))
  2177. 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)))
  2178. Vlev = (Vlev + 0.05) % tau
  2179.  
  2180. if Hum then
  2181. Hum.Sit = true
  2182. end
  2183.  
  2184. if LA.Parent ~= nil and RA.Parent ~= nil then
  2185. local LPos = (LA.CFrame * CFrame.new(0, -1, 0)).p
  2186. local RPos = (RA.CFrame * CFrame.new(0, -1, 0)).p
  2187. if Rise == true then
  2188. if Size < 0.6 then
  2189. Size = Size + 0.05
  2190. else
  2191. Size = Size + 0.1
  2192. end
  2193. if Size >= 2.2 then
  2194. Rise = false
  2195. end
  2196. else
  2197. if Size > 2.1 then
  2198. Size = Size - 0.05
  2199. else
  2200. Size = Size - 0.1
  2201. end
  2202. if Size <= 0.5 then
  2203. Rise = true
  2204. end
  2205. end
  2206. Ball.Size = Vector3.new(Size, Size, Size)
  2207. Ball.CFrame = CFrame.new(LPos:Lerp(RPos, 0.5), Targ.Position) * CFrame.new(0, 0, -2.2)
  2208. LightNum = LightNum + 1
  2209. makeLightning(LightMod, Ball.Position, Targ.Position, 0.2, 4, 50, 1, LightNum)
  2210. elseif Ball.Parent ~= nil then
  2211. Ball:Destroy()
  2212. end
  2213.  
  2214. if LS and LS.Parent == Torso then
  2215. 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))
  2216. end
  2217. if RS and RS.Parent == Torso then
  2218. 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))
  2219. end
  2220. RunService.Heartbeat:wait()
  2221. end
  2222.  
  2223. coroutine.resume(coroutine.create(function()
  2224. for i = 0.5, 1, 0.1 do
  2225. for i2,v in pairs(LightMod:GetChildren()) do
  2226. --v.Light.Range = 6-(i*5)
  2227. v.Transparency = 1
  2228. end
  2229. wait(1/30)
  2230. end
  2231. LightMod:Destroy()
  2232. end))
  2233.  
  2234. if BP and BP.Parent ~= nil then
  2235. BP:Destroy()
  2236. end
  2237.  
  2238. if Ang and Ang.Parent ~= nil then
  2239. Ang:Destroy()
  2240. end
  2241.  
  2242. pcall(function() Ball:Destroy() end)
  2243. end
  2244. end)
  2245. end))
  2246. end)
  2247. end
  2248.  
  2249. function Add(Obj)
  2250. if Obj:IsA("BasePart") and not Objects[Obj] and not (Obj.Name == "Base" and Obj.ClassName == "Part") then
  2251. Objects[Obj] = Obj:GetMass()
  2252. Obj.Changed:connect(function(P)
  2253. if P:lower() == "size" and Objects[Obj] and Obj.Parent ~= nil then
  2254. Objects[Obj] = Obj:GetMass()
  2255. end
  2256. end)
  2257. end
  2258. end
  2259.  
  2260. function Rem(Obj)
  2261. if Objects[Obj] then
  2262. Objects[Obj] = nil
  2263. end
  2264. end
  2265.  
  2266. function Recursion(Obj)
  2267. ypcall(function()
  2268. Add(Obj)
  2269. if #Obj:GetChildren() > 0 then
  2270. for _,v in pairs(Obj:GetChildren()) do
  2271. Recursion(v)
  2272. end
  2273. end
  2274. end)
  2275. end
  2276.  
  2277. Workspace.DescendantAdded:connect(function(Obj)
  2278. Add(Obj)
  2279. end)
  2280.  
  2281. Workspace.DescendantRemoving:connect(function(Obj)
  2282. Rem(Obj)
  2283. end)
  2284.  
  2285. for _,v in pairs(Workspace:GetChildren()) do
  2286. Recursion(v)
  2287. end
  2288.  
  2289. Start()
  2290.  
  2291. if LP.Name == PlrName then
  2292. LP.CharacterAdded:connect(Start)
  2293. end
  2294. Char.Humanoid.MaxHealth = 50000
  2295. Char.Humanoid.Health = 50000
  2296. --Responsible for regening a player's humanoid's health
  2297.  
  2298. -- declarations
  2299. local Figure = script.Parent
  2300. local Head = Figure:WaitForChild("Head")
  2301. local Humanoid = Figure:WaitForChild("Humanoid")
  2302. local regening = false
  2303.  
  2304. -- regeneration
  2305. function regenHealth()
  2306. if regening then return end
  2307. regening = true
  2308.  
  2309. while Humanoid.Health < Humanoid.MaxHealth do
  2310. local s = wait(0.1)
  2311. local health = Humanoid.Health
  2312. if health > 0 and health < Humanoid.MaxHealth then
  2313. local newHealthDelta = 0.1 * s * Humanoid.MaxHealth
  2314. health = health + newHealthDelta
  2315. Humanoid.Health = math.min(health,Humanoid.MaxHealth)
  2316. end
  2317. end
  2318.  
  2319. if Humanoid.Health > Humanoid.MaxHealth then
  2320. Humanoid.Health = Humanoid.MaxHealth
  2321. end
  2322.  
  2323. regening = false
  2324. end
  2325.  
  2326. Humanoid.HealthChanged:connect(regenHealth)
  2327. Me = game.Players.LocalPlayer
  2328. char = Me.Character
  2329. larm = char["Left Arm"]
  2330. rarm = char["Right Arm"]
  2331. lleg = char["Left Leg"]
  2332. rleg = char["Right Leg"]
  2333. torso = char.Torso
  2334.  
  2335.  
  2336.  
  2337. --------------------------
  2338.  
  2339. --[[ High Quality Sound Script
  2340. --Immune to g/c g/nol/all g/nos/all, and sound doesn't lag --You can also paste your script there and put this in the end.
  2341. --- full credits to saud20 --Also, edit friendly so you can place this in your script for a weapon song or somethin
  2342. ]]
  2343. local s = Instance.new("Sound")
  2344.  
  2345. s.Name = "Sound"
  2346. s.SoundId = "http://www.roblox.com/asset/?id=460839333"
  2347. s.Volume = 2
  2348. s.Looped = true
  2349. s.archivable = false
  2350.  
  2351. s.Parent = game.Workspace
  2352.  
  2353. wait(3)
  2354.  
  2355. s:play()
  2356. ------------------------Paste your script here if you want to add a song to your script. VVVVVVV
Add Comment
Please, Sign In to add comment