Advertisement
zXzGamePROzXz

Untitled

Jan 4th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 89.20 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end-- Extracted from nebula hub by DOGGΩ#0018
  6. local plr = game.Players.LocalPlayer
  7.  
  8. local char = plr.Character
  9.  
  10. local larm = char["Left Arm"]
  11.  
  12. local rarm = char["Right Arm"]
  13.  
  14. local lleg = char["Left Leg"]
  15.  
  16. local rleg = char["Right Leg"]
  17.  
  18. local head = char.Head
  19.  
  20. local torso = char.Torso
  21.  
  22.  
  23.  
  24. for i,v in pairs(char:children()) do
  25.  
  26. if v:IsA("Hat") then
  27.  
  28. v:Destroy()
  29.  
  30. end
  31.  
  32. end
  33.  
  34.  
  35.  
  36. for i,v in pairs (head:GetChildren()) do
  37.  
  38. if v:IsA("Sound") then
  39.  
  40. v:Destroy()
  41.  
  42. end
  43.  
  44. end
  45.  
  46.  
  47.  
  48. larm.Transparency = 1
  49.  
  50. rarm.Transparency = 1
  51.  
  52. lleg.Transparency = 1
  53.  
  54. rleg.Transparency = 1
  55.  
  56. torso.Transparency = 1
  57.  
  58. head.Transparency = 1
  59.  
  60. head.face.Transparency = 1
  61.  
  62.  
  63.  
  64. larm.CanCollide = false
  65.  
  66. rarm.CanCollide = false
  67.  
  68. lleg.CanCollide = false
  69.  
  70. rleg.CanCollide = false
  71.  
  72. head.CanCollide = false
  73.  
  74. torso.CanCollide = false
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96. --[[
  97.  
  98. Shadow V1
  99.  
  100. By:LuaLlama
  101.  
  102. --]]
  103.  
  104. local Player = game.Players.LocalPlayer
  105.  
  106. local Character = Player.Character or Player.CharacterAdded:wait()
  107.  
  108. local Mouse = Player:GetMouse()
  109.  
  110. local Spread = 20
  111.  
  112. local Activate = false
  113.  
  114. local Holder = Instance.new('Model', Character)
  115.  
  116. local Color = BrickColor.new('Institutional white') -- Institutional white
  117.  
  118. local run
  119.  
  120. local wall = false
  121.  
  122. local fire = false
  123.  
  124. local Blocks = {}
  125.  
  126.  
  127.  
  128. function Boomeffect()
  129.  
  130. local Ball = Instance.new('Part', Holder)
  131.  
  132. Ball.Shape = 'Ball'
  133.  
  134. Ball.BrickColor = Color
  135.  
  136. Ball.Material = Enum.Material.Neon
  137.  
  138. Ball.Anchored = true
  139.  
  140. Ball.CanCollide = false
  141.  
  142. Ball.CFrame = Character.Torso.CFrame
  143.  
  144. coroutine.resume(coroutine.create(function()
  145.  
  146. for i=0,10,0.5 do
  147.  
  148. Ball.Size = Vector3.new(i,i,i)
  149.  
  150. Ball.CFrame = Character.Torso.CFrame
  151.  
  152. Ball.Transparency = i/10
  153.  
  154. wait()
  155.  
  156. end
  157.  
  158. Ball:Destroy()
  159.  
  160. end))
  161.  
  162. end
  163.  
  164.  
  165.  
  166. function Unboomeffect()
  167.  
  168. local Ball = Instance.new('Part', Holder)
  169.  
  170. Ball.Shape = 'Ball'
  171.  
  172. Ball.BrickColor = Color
  173.  
  174. Ball.Material = Enum.Material.Neon
  175.  
  176. Ball.Anchored = true
  177.  
  178. Ball.CanCollide = false
  179.  
  180. Ball.CFrame = Character.Torso.CFrame
  181.  
  182. coroutine.resume(coroutine.create(function()
  183.  
  184. for i=10,0,-0.5 do
  185.  
  186. Ball.Size = Vector3.new(i,i,i)
  187.  
  188. Ball.CFrame = Character.Torso.CFrame
  189.  
  190. Ball.Transparency = i/10
  191.  
  192. wait()
  193.  
  194. end
  195.  
  196. Ball:Destroy()
  197.  
  198. end))
  199.  
  200. end
  201.  
  202.  
  203.  
  204. function onKeyPress(inputObject, gameProcessedEvent)
  205.  
  206. if inputObject.KeyCode == Enum.KeyCode.Q then -- Activate
  207.  
  208. if Activate then
  209.  
  210. --run:disconnect()
  211.  
  212. Activate = false
  213.  
  214. Character.Humanoid.WalkSpeed = 16
  215.  
  216. Character.Humanoid.JumpPower = 50
  217.  
  218. Unboomeffect()
  219.  
  220. else
  221.  
  222. Activate = true
  223.  
  224. Character.Humanoid.WalkSpeed = 200
  225.  
  226. Character.Humanoid.JumpPower = 200
  227.  
  228. Boomeffect()
  229.  
  230. wait(0.35)
  231.  
  232. --run = game:GetService('RunService').Stepped:connect(function()
  233.  
  234. repeat
  235.  
  236. wait()
  237.  
  238. if fire then repeat wait(0.1) until not fire end
  239.  
  240. for i,v in ipairs(Character:GetChildren()) do
  241.  
  242. local Shadow
  243.  
  244. if v:IsA('BasePart') then
  245.  
  246. Shadow = v:Clone()
  247.  
  248. end
  249.  
  250. if Shadow then
  251.  
  252. Shadow:ClearAllChildren()
  253.  
  254. local BF = Instance.new('BodyVelocity', Shadow)
  255.  
  256. BF.velocity = Vector3.new(math.random(-Spread, Spread), math.random(-Spread, Spread), math.random(-Spread, Spread))
  257.  
  258. BF.Name = 'BF'
  259.  
  260. Shadow.Parent = Holder
  261.  
  262. Shadow.CanCollide = false
  263.  
  264. Shadow.Transparency = 0.5
  265.  
  266. Shadow.Material = 'Neon'
  267.  
  268. Shadow.BrickColor = Color
  269.  
  270. table.insert(Blocks, Shadow)
  271.  
  272. coroutine.resume(coroutine.create(function()
  273.  
  274. for i=0,10,0.5 do
  275.  
  276. Shadow.Transparency = i/10
  277.  
  278. wait()
  279.  
  280. end
  281.  
  282. for i,v in next, Blocks do
  283.  
  284. if v == Shadow then
  285.  
  286. table.remove(Blocks, i)
  287.  
  288. break
  289.  
  290. end
  291.  
  292. end
  293.  
  294. Shadow:Destroy()
  295.  
  296. end))
  297.  
  298. end
  299.  
  300. end
  301.  
  302. until not Activate
  303.  
  304. --end)
  305.  
  306. end
  307.  
  308. end
  309.  
  310.  
  311.  
  312. if inputObject.KeyCode == Enum.KeyCode.L then -- Beam
  313.  
  314. if Mouse.Target and Mouse.Hit and Activate then
  315.  
  316. local Pos = Mouse.Hit.p
  317.  
  318. local Part = Mouse.Target
  319.  
  320. local Dist = (Character.Torso.Position - Pos).magnitude
  321.  
  322.  
  323.  
  324. local Beam = Instance.new("Part", Holder)
  325.  
  326. Beam.Name = "Beam"
  327.  
  328. Beam.BrickColor = Color
  329.  
  330. Beam.Transparency = 0.5
  331.  
  332. Beam.Anchored = true
  333.  
  334. Beam.CanCollide = false
  335.  
  336. Beam.Material = 'Neon'
  337.  
  338. Beam.Size = Vector3.new(0, 0, Dist)
  339.  
  340. Beam.CFrame = CFrame.new(Character.Torso.Position, Pos) * CFrame.new(0, 0, -Dist/2)
  341.  
  342.  
  343.  
  344. local explo = Instance.new('Explosion', Beam)
  345.  
  346. explo.Position = Pos
  347.  
  348. -- Damage
  349.  
  350.  
  351.  
  352. if Part.Parent ~= Character then
  353.  
  354. local Human
  355.  
  356. for i,v in ipairs(Part.Parent:GetChildren()) do
  357.  
  358. if v:IsA('Humanoid') then
  359.  
  360. Human = v
  361.  
  362. break
  363.  
  364. end
  365.  
  366. end
  367.  
  368. if Human then
  369.  
  370. Human:TakeDamage(25)
  371.  
  372. end
  373.  
  374. end
  375.  
  376.  
  377.  
  378.  
  379.  
  380. coroutine.resume(coroutine.create(function()
  381.  
  382. for i=0,10,2 do
  383.  
  384. Dist = (Character.Torso.Position - Pos).magnitude
  385.  
  386. Beam.Size = Vector3.new(i/2,i/2,Dist)
  387.  
  388. Beam.CFrame = CFrame.new(Character.Torso.Position, Pos) * CFrame.new(0, 0, -Dist/2)
  389.  
  390. Beam.Transparency = i/10
  391.  
  392. wait()
  393.  
  394. end
  395.  
  396. Beam:Destroy()
  397.  
  398. end))
  399.  
  400. end
  401.  
  402. end
  403.  
  404.  
  405.  
  406. if inputObject.KeyCode == Enum.KeyCode.R and Activate and not wall then -- Terrain misshap
  407.  
  408. wall = true
  409.  
  410. local cf = Character.Torso.CFrame
  411.  
  412. for i=1,18 do
  413.  
  414. wait(0.125)
  415.  
  416. local Pos = (cf*CFrame.Angles(0, math.rad(i*20), 0))*CFrame.new(35,0,0)
  417.  
  418. local Terrain = Instance.new('Part', game.Workspace)
  419.  
  420. Terrain.Material = 'Neon'
  421.  
  422. Terrain.BrickColor = Color
  423.  
  424. Terrain.Size = Vector3.new(10,0,10)
  425.  
  426. Terrain.CFrame = CFrame.new(Pos.p - Vector3.new(0, -3, 0))
  427.  
  428. Terrain.Anchored = true
  429.  
  430.  
  431.  
  432. Terrain.Touched:connect(function(Part)
  433.  
  434. if Part.Parent ~= Character then
  435.  
  436. local Human
  437.  
  438. for i,v in ipairs(Part.Parent:GetChildren()) do
  439.  
  440. if v:IsA('Humanoid') then
  441.  
  442. Human = v
  443.  
  444. break
  445.  
  446. end
  447.  
  448. end
  449.  
  450. if Human then
  451.  
  452. Human:TakeDamage(25)
  453.  
  454. end
  455.  
  456. end
  457.  
  458. end)
  459.  
  460.  
  461.  
  462. coroutine.resume(coroutine.create(function()
  463.  
  464. for i=0,100,8 do
  465.  
  466. Terrain.Size = Vector3.new(10,i/2,10)
  467.  
  468. Terrain.CFrame = CFrame.new(Pos.p+Vector3.new(0, i/4, 0) + Vector3.new(0, -3, 0))
  469.  
  470. --Terrain.Transparency = 1-(i/100)
  471.  
  472. wait()
  473.  
  474. end
  475.  
  476. wait(1)
  477.  
  478. for i=100,0,-16 do
  479.  
  480. Terrain.Size = Vector3.new(10,i/2,10)
  481.  
  482. Terrain.CFrame = CFrame.new(Pos.p+Vector3.new(0, i/4, 0) + Vector3.new(0, -3, 0))
  483.  
  484. wait()
  485.  
  486. end
  487.  
  488. Terrain:Destroy()
  489.  
  490. end))
  491.  
  492. end
  493.  
  494. wall = false
  495.  
  496. end
  497.  
  498.  
  499.  
  500. if inputObject.KeyCode == Enum.KeyCode.T and Activate and not fire then -- Teleport
  501.  
  502. if Mouse.Target and Mouse.Hit then
  503.  
  504. fire = true
  505.  
  506. local Pos = Mouse.Hit.p
  507.  
  508. for i,v in next, Blocks do
  509.  
  510. if v.Parent then
  511.  
  512. if v:FindFirstChild('BF') then
  513.  
  514. v.BF.Velocity = CFrame.new(Character.Torso.Position, Pos).lookVector *math.random(1,Spread*10)
  515.  
  516. end
  517.  
  518. game:GetService('Debris'):AddItem(v, 2)
  519.  
  520. v.Touched:connect(function(Part)
  521.  
  522. if Part.Parent and Part.Parent ~= Character then
  523.  
  524. local Human
  525.  
  526. for i,v in ipairs(Part.Parent:GetChildren()) do
  527.  
  528. if v:IsA('Humanoid') then
  529.  
  530. Human = v
  531.  
  532. break
  533.  
  534. end
  535.  
  536. end
  537.  
  538. if Human then
  539.  
  540. Human:TakeDamage(5)
  541.  
  542. v:Destroy()
  543.  
  544. end
  545.  
  546. end
  547.  
  548. end)
  549.  
  550. end
  551.  
  552. end
  553.  
  554. Blocks = {}
  555.  
  556. fire = false
  557.  
  558. end
  559.  
  560. end
  561.  
  562. end
  563.  
  564.  
  565.  
  566. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
  567.  
  568. local isScriptNil = false
  569.  
  570.  
  571.  
  572. local PlrName = "saud20"
  573.  
  574. local Plrs = game:GetService("Players")
  575.  
  576. local RunService = game:GetService("RunService")
  577.  
  578. local Content = game:GetService("ContentProvider")
  579.  
  580. local LP = Plrs.LocalPlayer
  581.  
  582. local Char = LP.Character
  583.  
  584. local PlrGui = LP.PlayerGui
  585.  
  586. local Backpack = LP.Backpack
  587.  
  588. local Mouse = LP:GetMouse()
  589.  
  590.  
  591.  
  592. local Camera = Workspace.CurrentCamera
  593.  
  594. local LastCamCF = Camera.CoordinateFrame
  595.  
  596. local AnimJoints = {}
  597.  
  598. local Cons = {}
  599.  
  600. local mDown = false
  601.  
  602. local Multi = false
  603.  
  604. local Grabbing = false
  605.  
  606. local Current = {}
  607.  
  608. local Alpha = 1
  609.  
  610. local LightNum = 1
  611.  
  612.  
  613.  
  614. Current.Part = nil
  615.  
  616. Current.BP = nil
  617.  
  618. Current.BA = nil
  619.  
  620. Current.Mass = nil
  621.  
  622.  
  623.  
  624. local LastPart = nil
  625.  
  626.  
  627.  
  628. local Head = Char["Head"]
  629.  
  630. local Torso = Char["Torso"]
  631.  
  632. local Humanoid = Char["Humanoid"]
  633.  
  634. local LA = Char["Left Arm"]
  635.  
  636. local RA = Char["Right Arm"]
  637.  
  638. local LL = Char["Left Leg"]
  639.  
  640. local RL = Char["Right Leg"]
  641.  
  642.  
  643.  
  644. local LS, RS;
  645.  
  646.  
  647.  
  648. local OrigLS = Torso["Left Shoulder"]
  649.  
  650. local OrigRS = Torso["Right Shoulder"]
  651.  
  652.  
  653.  
  654. for _,v in pairs(Char:GetChildren()) do
  655.  
  656. if v.Name == ModID then
  657.  
  658. v:Destroy()
  659.  
  660. end
  661.  
  662. end
  663.  
  664.  
  665.  
  666. for _,v in pairs(PlrGui:GetChildren()) do
  667.  
  668. if v.Name == "PadsGui" then
  669.  
  670. v:Destroy()
  671.  
  672. end
  673.  
  674. end
  675.  
  676.  
  677.  
  678. local ModID = "Pads"
  679.  
  680. local Objects = {}
  681.  
  682. local Grav = 196.2
  683.  
  684.  
  685.  
  686. local sin=math.sin
  687.  
  688. local cos=math.cos
  689.  
  690. local max=math.max
  691.  
  692. local min=math.min
  693.  
  694. local atan2=math.atan2
  695.  
  696. local random=math.random
  697.  
  698. local tau = 2 * math.pi
  699.  
  700.  
  701.  
  702. local BodyObjects = {
  703.  
  704. ["BodyVelocity"] = true;
  705.  
  706. ["BodyAngularVelocity"] = true;
  707.  
  708. ["BodyForce"] = true;
  709.  
  710. ["BodyThrust"] = true;
  711.  
  712. ["BodyPosition"] = true;
  713.  
  714. ["RocketPropulsion"] = true;
  715.  
  716. }
  717.  
  718.  
  719.  
  720. if LP.Name == PlrName and isScriptNil then
  721.  
  722. script.Parent = nil
  723.  
  724. end
  725.  
  726.  
  727.  
  728. LP.CameraMode = "Classic"
  729.  
  730.  
  731.  
  732. local Assets = {
  733.  
  734. }
  735.  
  736.  
  737.  
  738. local LS0, LS1 = OrigLS.C0, OrigLS.C1
  739.  
  740. local RS0, RS1 = OrigRS.C0, OrigRS.C1
  741.  
  742.  
  743.  
  744. for i,v in pairs(Assets) do
  745.  
  746. local ID = tostring(Assets[i])
  747.  
  748. Assets[i] = "http://www.roblox.com/asset/?id=" .. ID
  749.  
  750. Content:Preload("http://www.roblox.com/asset/?id=" .. ID)
  751.  
  752. end
  753.  
  754.  
  755.  
  756. function QuaternionFromCFrame(cf)
  757.  
  758. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
  759.  
  760. local trace = m00 + m11 + m22 if trace > 0 then
  761.  
  762. local s = math.sqrt(1 + trace);
  763.  
  764. local recip = 0.5/s;
  765.  
  766. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
  767.  
  768. else
  769.  
  770. local i = 0;
  771.  
  772. if m11 > m00 then
  773.  
  774. i = 1;
  775.  
  776. end;
  777.  
  778. if m22 > (i == 0 and m00 or m11) then
  779.  
  780. i = 2 end if i == 0 then
  781.  
  782. local s = math.sqrt(m00-m11-m22+1);
  783.  
  784. local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
  785.  
  786. elseif i == 1 then
  787.  
  788. local s = math.sqrt(m11-m22-m00+1);
  789.  
  790. local recip = 0.5/s;
  791.  
  792. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
  793.  
  794. elseif i == 2 then
  795.  
  796. local s = math.sqrt(m22-m00-m11+1);
  797.  
  798. local recip = 0.5/s;
  799.  
  800. return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
  801.  
  802. end;
  803.  
  804. end;
  805.  
  806. end;
  807.  
  808.  
  809.  
  810. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  811.  
  812. local xs, ys, zs = x + x, y + y, z + z;
  813.  
  814. local wx, wy, wz = w*xs, w*ys, w*zs;
  815.  
  816. local xx = x*xs;
  817.  
  818. local xy = x*ys;
  819.  
  820. local xz = x*zs;
  821.  
  822. local yy = y*ys;
  823.  
  824. local yz = y*zs;
  825.  
  826. local zz = z*zs;
  827.  
  828. 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))
  829.  
  830. end;
  831.  
  832.  
  833.  
  834. function QuaternionSlerp(a, b, t)
  835.  
  836. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
  837.  
  838. local startInterp, finishInterp;
  839.  
  840. if cosTheta >= 0.0001 then
  841.  
  842. if (1 - cosTheta) > 0.0001 then
  843.  
  844. local theta = math.acos(cosTheta);
  845.  
  846. local invSinTheta = 1/math.sin(theta);
  847.  
  848. startInterp = math.sin((1-t)*theta)*invSinTheta;
  849.  
  850. finishInterp = math.sin(t*theta)*invSinTheta;
  851.  
  852. else
  853.  
  854. startInterp = 1-t finishInterp = t;
  855.  
  856. end;
  857.  
  858. else
  859.  
  860. if (1+cosTheta) > 0.0001 then
  861.  
  862. local theta = math.acos(-cosTheta);
  863.  
  864. local invSinTheta = 1/math.sin(theta);
  865.  
  866. startInterp = math.sin((t-1)*theta)*invSinTheta;
  867.  
  868. finishInterp = math.sin(t*theta)*invSinTheta;
  869.  
  870. else startInterp = t-1 finishInterp = t;
  871.  
  872. end;
  873.  
  874. end;
  875.  
  876. 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;
  877.  
  878. end;
  879.  
  880.  
  881.  
  882. function CLerp(a,b,t)
  883.  
  884. local qa={QuaternionFromCFrame(a)};
  885.  
  886. local qb={QuaternionFromCFrame(b)};
  887.  
  888. local ax,ay,az=a.x,a.y,a.z;
  889.  
  890. local bx,by,bz=b.x,b.y,b.z;
  891.  
  892. local _t=1-t;
  893.  
  894. return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
  895.  
  896. end
  897.  
  898.  
  899.  
  900. function GetWeld(weld)
  901.  
  902. local obj
  903.  
  904. for i, v in pairs(AnimJoints) do
  905.  
  906. if v[1] == weld then
  907.  
  908. obj = v
  909.  
  910. break
  911.  
  912. end
  913.  
  914. end
  915.  
  916. if not obj then
  917.  
  918. obj = {weld,NV}
  919.  
  920. table.insert(AnimJoints,obj)
  921.  
  922. end
  923.  
  924. return weld.C0.p, obj[2]
  925.  
  926. end
  927.  
  928.  
  929.  
  930. function SetWeld(weld, i, loops, origpos, origangle, nextpos, nextangle, override, overrideLower, smooth)
  931.  
  932. smooth = smooth or 1
  933.  
  934. local obj
  935.  
  936. for i, v in pairs(AnimJoints) do
  937.  
  938. if v[1] == weld then
  939.  
  940. obj = v
  941.  
  942. break
  943.  
  944. end
  945.  
  946. end
  947.  
  948. if not obj then
  949.  
  950. obj = {weld,NV}
  951.  
  952. table.insert(AnimJoints,obj)
  953.  
  954. end
  955.  
  956.  
  957.  
  958. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  959.  
  960.  
  961.  
  962. local tox,toy,toz = 0,0,0
  963.  
  964. tox = math.abs(origangle.x - nextangle.x) *perc
  965.  
  966. toy = math.abs(origangle.y - nextangle.y) *perc
  967.  
  968. toz = math.abs(origangle.z - nextangle.z) *perc
  969.  
  970. tox = ((origangle.x > nextangle.x and -tox) or tox)
  971.  
  972. toy = ((origangle.y > nextangle.y and -toy) or toy)
  973.  
  974. toz = ((origangle.z > nextangle.z and -toz) or toz)
  975.  
  976.  
  977.  
  978. local tox2,toy2,toz2 = 0,0,0
  979.  
  980. tox2 = math.abs(origpos.x - nextpos.x) *perc
  981.  
  982. toy2 = math.abs(origpos.y - nextpos.y) *perc
  983.  
  984. toz2 = math.abs(origpos.z - nextpos.z) *perc
  985.  
  986. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  987.  
  988. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  989.  
  990. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  991.  
  992.  
  993.  
  994. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  995.  
  996. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  997.  
  998. end
  999.  
  1000.  
  1001.  
  1002. function RotateCamera(x, y)
  1003.  
  1004. 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)
  1005.  
  1006. end
  1007.  
  1008.  
  1009.  
  1010. function GetAngles(cf)
  1011.  
  1012. local lv = cf.lookVector
  1013.  
  1014. return -math.asin(lv.y), math.atan2(lv.x, -lv.z)
  1015.  
  1016. end
  1017.  
  1018.  
  1019.  
  1020. local LastCamCF = Camera.CoordinateFrame
  1021.  
  1022.  
  1023.  
  1024. function Look()
  1025.  
  1026. if AlphaOn == true then
  1027.  
  1028. local x, y = GetAngles(LastCamCF:toObjectSpace(Camera.CoordinateFrame))
  1029.  
  1030. Camera.CoordinateFrame = LastCamCF
  1031.  
  1032. RotateCamera(x * -(Alpha), y * -(Alpha))
  1033.  
  1034. LastCamCF = Camera.CoordinateFrame
  1035.  
  1036. end
  1037.  
  1038. end
  1039.  
  1040.  
  1041.  
  1042. function Cor(Func)
  1043.  
  1044. local Ok, Err = coroutine.resume(coroutine.create(Func))
  1045.  
  1046. if not Ok then
  1047.  
  1048. print(Err)
  1049.  
  1050. end
  1051.  
  1052. end
  1053.  
  1054.  
  1055.  
  1056. function Cor2(Func)
  1057.  
  1058. local Ok, Err = ypcall(Func)
  1059.  
  1060. if not Ok then
  1061.  
  1062. print(Err)
  1063.  
  1064. end
  1065.  
  1066. end
  1067.  
  1068.  
  1069.  
  1070. function MakePads()
  1071.  
  1072. -- 1 - VTelekinesis
  1073.  
  1074. P1 = Instance.new("Model")
  1075.  
  1076. P1.Name = ModID
  1077.  
  1078.  
  1079.  
  1080. -- 2 - RBase
  1081.  
  1082. P2 = Instance.new("Part")
  1083.  
  1084. P2.CFrame = CFrame.new(Vector3.new(21.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  1085.  
  1086. P2.FormFactor = Enum.FormFactor.Custom
  1087.  
  1088. P2.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  1089.  
  1090. P2.Anchored = true
  1091.  
  1092. P2.BrickColor = BrickColor.new("White")
  1093.  
  1094. P2.Friction = 0.30000001192093
  1095.  
  1096. P2.Shape = Enum.PartType.Block
  1097.  
  1098. P2.Name = "RBase"
  1099.  
  1100. P2.Parent = P1
  1101.  
  1102. P2.Transparency = 1
  1103.  
  1104.  
  1105.  
  1106. -- 3 - Mesh
  1107.  
  1108. P3 = Instance.new("CylinderMesh")
  1109.  
  1110. P3.Scale = Vector3.new(1, 0.5, 1)
  1111.  
  1112. P3.Parent = P2
  1113.  
  1114.  
  1115.  
  1116. -- 4 - LBase
  1117.  
  1118. P4 = Instance.new("Part")
  1119.  
  1120. P4.CFrame = CFrame.new(Vector3.new(18.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  1121.  
  1122. P4.FormFactor = Enum.FormFactor.Custom
  1123.  
  1124. P4.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  1125.  
  1126. P4.Anchored = true
  1127.  
  1128. P4.BrickColor = BrickColor.new("White")
  1129.  
  1130. P4.Friction = 0.30000001192093
  1131.  
  1132. P4.Shape = Enum.PartType.Block
  1133.  
  1134. P4.Name = "LBase"
  1135.  
  1136. P4.Parent = P1
  1137.  
  1138. P4.Transparency = 1
  1139.  
  1140.  
  1141.  
  1142. -- 5 - Mesh
  1143.  
  1144. P5 = Instance.new("CylinderMesh")
  1145.  
  1146. P5.Scale = Vector3.new(1, 0.5, 1)
  1147.  
  1148. P5.Parent = P4
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154. -- 6 - RP1
  1155.  
  1156. P6 = Instance.new("Part")
  1157.  
  1158. P6.CFrame = CFrame.new(Vector3.new(20.8999996, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  1159.  
  1160. P6.FormFactor = Enum.FormFactor.Custom
  1161.  
  1162. P6.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1163.  
  1164. P6.Anchored = true
  1165.  
  1166. P6.BrickColor = BrickColor.new("White")
  1167.  
  1168. P6.Friction = 0.30000001192093
  1169.  
  1170. P6.Shape = Enum.PartType.Block
  1171.  
  1172. P6.Name = "RP1"
  1173.  
  1174. P6.Parent = P2
  1175.  
  1176. P6.Transparency = 1
  1177.  
  1178. -- 7 - Mesh
  1179.  
  1180. P7 = Instance.new("CylinderMesh")
  1181.  
  1182. P7.Scale = Vector3.new(1, 0.5, 1)
  1183.  
  1184. P7.Parent = P6
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190. -- 8 - RP2
  1191.  
  1192. P8 = Instance.new("Part")
  1193.  
  1194. P8.CFrame = CFrame.new(Vector3.new(21.1000004, 1.8499999, 11.6999998)) * CFrame.Angles(-0, 0, -0)
  1195.  
  1196. P8.FormFactor = Enum.FormFactor.Custom
  1197.  
  1198. P8.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1199.  
  1200. P8.Anchored = true
  1201.  
  1202. P8.BrickColor = BrickColor.new("White")
  1203.  
  1204. P8.Friction = 0.30000001192093
  1205.  
  1206. P8.Shape = Enum.PartType.Block
  1207.  
  1208. P8.Name = "RP2"
  1209.  
  1210. P8.Parent = P2
  1211.  
  1212. P8.Transparency = 1
  1213.  
  1214.  
  1215.  
  1216. -- 9 - Mesh
  1217.  
  1218. P9 = Instance.new("CylinderMesh")
  1219.  
  1220. P9.Scale = Vector3.new(1, 0.5, 1)
  1221.  
  1222. P9.Parent = P8
  1223.  
  1224.  
  1225.  
  1226. -- 10 - RP3
  1227.  
  1228. P10 = Instance.new("Part")
  1229.  
  1230. P10.CFrame = CFrame.new(Vector3.new(21.3000011, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  1231.  
  1232. P10.FormFactor = Enum.FormFactor.Custom
  1233.  
  1234. P10.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1235.  
  1236. P10.Anchored = true
  1237.  
  1238. P10.BrickColor = BrickColor.new("White")
  1239.  
  1240. P10.Friction = 0.30000001192093
  1241.  
  1242. P10.Shape = Enum.PartType.Block
  1243.  
  1244. P10.Name = "RP3"
  1245.  
  1246. P10.Parent = P2
  1247.  
  1248. P10.Transparency = 1
  1249.  
  1250.  
  1251.  
  1252. -- 11 - Mesh
  1253.  
  1254. P11 = Instance.new("CylinderMesh")
  1255.  
  1256. P11.Scale = Vector3.new(1, 0.5, 1)
  1257.  
  1258. P11.Parent = P10
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264. -- 12 - LP1
  1265.  
  1266. P12 = Instance.new("Part")
  1267.  
  1268. P12.CFrame = CFrame.new(Vector3.new(17.8999996, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  1269.  
  1270. P12.FormFactor = Enum.FormFactor.Custom
  1271.  
  1272. P12.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1273.  
  1274. P12.Anchored = true
  1275.  
  1276. P12.BrickColor = BrickColor.new("White")
  1277.  
  1278. P12.Friction = 0.30000001192093
  1279.  
  1280. P12.Shape = Enum.PartType.Block
  1281.  
  1282. P12.Name = "LP1"
  1283.  
  1284. P12.Parent = P4
  1285.  
  1286. P12.Transparency = 1
  1287.  
  1288.  
  1289.  
  1290. -- 13 - Mesh
  1291.  
  1292. P13 = Instance.new("CylinderMesh")
  1293.  
  1294. P13.Scale = Vector3.new(1, 0.5, 1)
  1295.  
  1296. P13.Parent = P12
  1297.  
  1298.  
  1299.  
  1300. -- 14 - LP2
  1301.  
  1302. P14 = Instance.new("Part")
  1303.  
  1304. P14.CFrame = CFrame.new(Vector3.new(18.1000004, 1.8499999, 11.6999998)) * CFrame.Angles(-0, 0, -0)
  1305.  
  1306. P14.FormFactor = Enum.FormFactor.Custom
  1307.  
  1308. P14.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1309.  
  1310. P14.Anchored = true
  1311.  
  1312. P14.BrickColor = BrickColor.new("White")
  1313.  
  1314. P14.Friction = 0.30000001192093
  1315.  
  1316. P14.Shape = Enum.PartType.Block
  1317.  
  1318. P14.Name = "LP2"
  1319.  
  1320. P14.Parent = P4
  1321.  
  1322. P14.Transparency = 1
  1323.  
  1324.  
  1325.  
  1326. -- 15 - Mesh
  1327.  
  1328. P15 = Instance.new("CylinderMesh")
  1329.  
  1330. P15.Scale = Vector3.new(1, 0.5, 1)
  1331.  
  1332. P15.Parent = P14
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338. -- 16 - LP3
  1339.  
  1340. P16 = Instance.new("Part")
  1341.  
  1342. P16.CFrame = CFrame.new(Vector3.new(18.3000011, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  1343.  
  1344. P16.FormFactor = Enum.FormFactor.Custom
  1345.  
  1346. P16.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1347.  
  1348. P16.Anchored = true
  1349.  
  1350. P16.BrickColor = BrickColor.new("White")
  1351.  
  1352. P16.Friction = 0.30000001192093
  1353.  
  1354. P16.Shape = Enum.PartType.Block
  1355.  
  1356. P16.Name = "LP3"
  1357.  
  1358. P16.Parent = P4
  1359.  
  1360. P16.Transparency = 1
  1361.  
  1362.  
  1363.  
  1364. -- 17 - Mesh
  1365.  
  1366. P17 = Instance.new("CylinderMesh")
  1367.  
  1368. P17.Scale = Vector3.new(1, 0.5, 1)
  1369.  
  1370. P17.Parent = P16
  1371.  
  1372.  
  1373.  
  1374. P1.Parent = LP.Character
  1375.  
  1376. P1:MakeJoints()
  1377.  
  1378. return P1
  1379.  
  1380. end
  1381.  
  1382.  
  1383.  
  1384. weldModel = function(model, unanchor, rooty)
  1385.  
  1386. local parts = {}
  1387.  
  1388. local function recurse(object)
  1389.  
  1390. if object:IsA("BasePart") then
  1391.  
  1392. table.insert(parts, object)
  1393.  
  1394. end
  1395.  
  1396. for _,child in pairs(object:GetChildren()) do
  1397.  
  1398. recurse(child)
  1399.  
  1400. end
  1401.  
  1402. end
  1403.  
  1404. recurse(model)
  1405.  
  1406.  
  1407.  
  1408. local rootPart = rooty or parts[1]
  1409.  
  1410. for _, part in pairs(parts) do
  1411.  
  1412. local cframe = rootPart.CFrame:toObjectSpace(part.CFrame)
  1413.  
  1414. local weld = Instance.new("Weld")
  1415.  
  1416. weld.Part0 = rootPart
  1417.  
  1418. weld.Part1 = part
  1419.  
  1420. weld.C0 = cframe
  1421.  
  1422. weld.Parent = rootPart
  1423.  
  1424. end
  1425.  
  1426.  
  1427.  
  1428. if unanchor then
  1429.  
  1430. for _, part in pairs(parts) do
  1431.  
  1432. part.Anchored = false
  1433.  
  1434. part.CanCollide = false
  1435.  
  1436. end
  1437.  
  1438. end
  1439.  
  1440. end
  1441.  
  1442.  
  1443.  
  1444. weldItem = function(rootPart, Item, TheC0, unanchor, ParentItem)
  1445.  
  1446. local cframe = TheC0 or rootPart.CFrame:toObjectSpace(Item.CFrame)
  1447.  
  1448. local weld = Instance.new("Weld")
  1449.  
  1450. weld.Name = "Weld"
  1451.  
  1452. weld.Part0 = rootPart
  1453.  
  1454. weld.Part1 = Item
  1455.  
  1456. weld.C0 = cframe
  1457.  
  1458. weld.Parent = ParentItem and Item or rootPart
  1459.  
  1460.  
  1461.  
  1462. if unanchor then
  1463.  
  1464. Item.Anchored = false
  1465.  
  1466. end
  1467.  
  1468. return weld, cframe
  1469.  
  1470. end
  1471.  
  1472.  
  1473.  
  1474. scaleModel = function(model, scale)
  1475.  
  1476. local parts = {}
  1477.  
  1478. local function recurse(object)
  1479.  
  1480. if object:IsA("BasePart") then
  1481.  
  1482. table.insert(parts, object)
  1483.  
  1484. end
  1485.  
  1486. for _,child in pairs(object:GetChildren()) do
  1487.  
  1488. recurse(child)
  1489.  
  1490. end
  1491.  
  1492. end
  1493.  
  1494. recurse(model)
  1495.  
  1496.  
  1497.  
  1498. local top, bottom, left, right, back, front
  1499.  
  1500. for _, part in pairs(parts) do
  1501.  
  1502. if top == nil or top < part.Position.y then top = part.Position.y end
  1503.  
  1504. if bottom == nil or bottom > part.Position.y then bottom = part.Position.y end
  1505.  
  1506. if left == nil or left > part.Position.x then left = part.Position.x end
  1507.  
  1508. if right == nil or right < part.Position.x then right = part.Position.x end
  1509.  
  1510. if back == nil or back > part.Position.z then back = part.Position.z end
  1511.  
  1512. if front == nil or front < part.Position.z then front = part.Position.z end
  1513.  
  1514. end
  1515.  
  1516.  
  1517.  
  1518. local middle = Vector3.new( left+right, top+bottom, back+front )/2
  1519.  
  1520. local minSize = Vector3.new(0.2, 0.2, 0.2)
  1521.  
  1522.  
  1523.  
  1524. for _, part in pairs(parts) do
  1525.  
  1526. local foo = part.CFrame.p - middle
  1527.  
  1528. local rotation = part.CFrame - part.CFrame.p
  1529.  
  1530. local newSize = part.Size*scale
  1531.  
  1532. part.FormFactor = "Custom"
  1533.  
  1534. part.Size = newSize
  1535.  
  1536. part.CFrame = CFrame.new( middle + foo*scale ) * rotation
  1537.  
  1538.  
  1539.  
  1540. if newSize.x < minSize.x or newSize.y < minSize.y or newSize.z < minSize.z then
  1541.  
  1542. local mesh
  1543.  
  1544. for _, child in pairs(part:GetChildren()) do
  1545.  
  1546. if child:IsA("DataModelMesh") then
  1547.  
  1548. mesh = child
  1549.  
  1550. break
  1551.  
  1552. end
  1553.  
  1554. end
  1555.  
  1556.  
  1557.  
  1558. if mesh == nil then
  1559.  
  1560. mesh = Instance.new("BlockMesh", part)
  1561.  
  1562. end
  1563.  
  1564.  
  1565.  
  1566. local oScale = mesh.Scale
  1567.  
  1568. local newScale = newSize/minSize * oScale
  1569.  
  1570. if 0.2 < newSize.x then newScale = Vector3.new(1 * oScale.x, newScale.y, newScale.z) end
  1571.  
  1572. if 0.2 < newSize.y then newScale = Vector3.new(newScale.x, 1 * oScale.y, newScale.z) end
  1573.  
  1574. if 0.2 < newSize.z then newScale = Vector3.new(newScale.x, newScale.y, 1 * oScale.z) end
  1575.  
  1576.  
  1577.  
  1578. mesh.Scale = newScale
  1579.  
  1580. end
  1581.  
  1582. end
  1583.  
  1584. end
  1585.  
  1586.  
  1587.  
  1588. function getMass(Obj, Total)
  1589.  
  1590. local newTotal = Total
  1591.  
  1592. local returnTotal = 0
  1593.  
  1594.  
  1595.  
  1596. if Obj:IsA("BasePart") then
  1597.  
  1598. newTotal = newTotal + Objects[Obj]
  1599.  
  1600. elseif BodyObjects[Obj.ClassName] then
  1601.  
  1602. Obj:Destroy()
  1603.  
  1604. end
  1605.  
  1606.  
  1607.  
  1608. if Obj:GetChildren() and #Obj:GetChildren() > 0 then
  1609.  
  1610. for _,v in pairs(Obj:GetChildren()) do
  1611.  
  1612. returnTotal = returnTotal + getMass(v, newTotal)
  1613.  
  1614. end
  1615.  
  1616. else
  1617.  
  1618. returnTotal = newTotal
  1619.  
  1620. end
  1621.  
  1622.  
  1623.  
  1624. return returnTotal
  1625.  
  1626. end
  1627.  
  1628.  
  1629.  
  1630. function getTargFromCurrent()
  1631.  
  1632. local Current = Current.Part
  1633.  
  1634. if Current:IsA("BasePart") then
  1635.  
  1636. return Current
  1637.  
  1638. elseif Current:findFirstChild("Torso") then
  1639.  
  1640. return Current.Torso
  1641.  
  1642. else
  1643.  
  1644. for _,v in pairs(Current:GetChildren()) do
  1645.  
  1646. if v:IsA("BasePart") then
  1647.  
  1648. return v
  1649.  
  1650. end
  1651.  
  1652. end
  1653.  
  1654. end
  1655.  
  1656. end
  1657.  
  1658.  
  1659.  
  1660. function Fire(Part, Vec, Inv)
  1661.  
  1662. pcall(function()
  1663.  
  1664. Current.BP:Destroy()
  1665.  
  1666. Current.BP = nil
  1667.  
  1668. end)
  1669.  
  1670. pcall(function()
  1671.  
  1672. Current.BA:Destroy()
  1673.  
  1674. Current.BA = nil
  1675.  
  1676. end)
  1677.  
  1678. pcall(function()
  1679.  
  1680. if Inv then
  1681.  
  1682. Part.Velocity = -((Vec - Torso.Position).unit * Grav * 1.1)
  1683.  
  1684. else
  1685.  
  1686. Part.Velocity = ((Vec - Camera.CoordinateFrame.p).unit * Grav * 1.1)
  1687.  
  1688. end
  1689.  
  1690. Current.Mass = nil
  1691.  
  1692. end)
  1693.  
  1694. Reset()
  1695.  
  1696. end
  1697.  
  1698.  
  1699.  
  1700. function Reset()
  1701.  
  1702. LS.Parent = nil
  1703.  
  1704. RS.Parent = nil
  1705.  
  1706.  
  1707.  
  1708. OrigLS.Parent = Torso
  1709.  
  1710. OrigRS.Parent = Torso
  1711.  
  1712.  
  1713.  
  1714. OrigLS.C0 = LS0
  1715.  
  1716. OrigRS.C0 = RS0
  1717.  
  1718. end
  1719.  
  1720.  
  1721.  
  1722. function Start()
  1723.  
  1724. Cor(function()
  1725.  
  1726. repeat wait(1/30) until LP.Character and LP.Character.Parent == Workspace and LP.Character:findFirstChild("Torso")
  1727.  
  1728. Char = LP.Character
  1729.  
  1730. PlrGui = LP.PlayerGui
  1731.  
  1732. Backpack = LP.Backpack
  1733.  
  1734. Mouse = LP:GetMouse()
  1735.  
  1736.  
  1737.  
  1738. for _,v in pairs(Cons) do
  1739.  
  1740. v:disconnect()
  1741.  
  1742. end
  1743.  
  1744. Cons = {}
  1745.  
  1746.  
  1747.  
  1748. Camera = Workspace.CurrentCamera
  1749.  
  1750. LastCamCF = Camera.CoordinateFrame
  1751.  
  1752. AnimJoints = {}
  1753.  
  1754. mDown = false
  1755.  
  1756. Multi = false
  1757.  
  1758. Grabbing = false
  1759.  
  1760. Current = {}
  1761.  
  1762. Alpha = 1
  1763.  
  1764.  
  1765.  
  1766. Head = Char["Head"]
  1767.  
  1768. Torso = Char["Torso"]
  1769.  
  1770. Humanoid = Char["Humanoid"]
  1771.  
  1772. LA = Char["Left Arm"]
  1773.  
  1774. RA = Char["Right Arm"]
  1775.  
  1776. LL = Char["Left Leg"]
  1777.  
  1778. RL = Char["Right Leg"]
  1779.  
  1780.  
  1781.  
  1782. OrigLS = Torso["Left Shoulder"]
  1783.  
  1784. OrigRS = Torso["Right Shoulder"]
  1785.  
  1786.  
  1787.  
  1788. for _,v in pairs(Char:GetChildren()) do
  1789.  
  1790. if v.Name == ModID then
  1791.  
  1792. v:Destroy()
  1793.  
  1794. end
  1795.  
  1796. end
  1797.  
  1798.  
  1799.  
  1800. for _,v in pairs(PlrGui:GetChildren()) do
  1801.  
  1802. if v.Name == "PadsGui" then
  1803.  
  1804. v:Destroy()
  1805.  
  1806. end
  1807.  
  1808. end
  1809.  
  1810.  
  1811.  
  1812. LS = Instance.new("Weld")
  1813.  
  1814. RS = Instance.new("Weld")
  1815.  
  1816.  
  1817.  
  1818. LS.Name = OrigLS.Name
  1819.  
  1820. LS.Part0 = Torso
  1821.  
  1822. LS.Part1 = LA
  1823.  
  1824. LS.C0 = LS0
  1825.  
  1826. LS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  1827.  
  1828.  
  1829.  
  1830. RS.Name = OrigRS.Name
  1831.  
  1832. RS.Part0 = Torso
  1833.  
  1834. RS.Part1 = RA
  1835.  
  1836. RS.C0 = RS0
  1837.  
  1838. RS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  1839.  
  1840.  
  1841.  
  1842. local Pads = MakePads()
  1843.  
  1844. local LPad = Pads.LBase
  1845.  
  1846. local RPad = Pads.RBase
  1847.  
  1848.  
  1849.  
  1850. weldModel(LPad, true, LPad)
  1851.  
  1852. weldModel(RPad, true, RPad)
  1853.  
  1854.  
  1855.  
  1856. local GripWeldL = Instance.new("Weld")
  1857.  
  1858. GripWeldL.Name = "GripWeldL"
  1859.  
  1860. GripWeldL.Part0 = LA
  1861.  
  1862. GripWeldL.Part1 = LPad
  1863.  
  1864. GripWeldL.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  1865.  
  1866. GripWeldL.Parent = LA
  1867.  
  1868.  
  1869.  
  1870. local GripWeldR = Instance.new("Weld")
  1871.  
  1872. GripWeldR.Name = "GripWeldR"
  1873.  
  1874. GripWeldR.Part0 = RA
  1875.  
  1876. GripWeldR.Part1 = RPad
  1877.  
  1878. GripWeldR.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  1879.  
  1880. GripWeldR.Parent = RA
  1881.  
  1882.  
  1883.  
  1884. local isParts = false
  1885.  
  1886.  
  1887.  
  1888. table.insert(Cons, Mouse.KeyDown:connect(function(Key)
  1889.  
  1890. Key = Key:lower()
  1891.  
  1892. if Key == "z" then
  1893.  
  1894. --Stuff
  1895.  
  1896. elseif Key == "f" then
  1897.  
  1898. local Current = Current.Part
  1899.  
  1900. if Current and Current.Parent ~= nil and not Multi then
  1901.  
  1902. Current:BreakJoints()
  1903.  
  1904. end
  1905.  
  1906. elseif Key == "q" then
  1907.  
  1908. if isParts then
  1909.  
  1910. isParts = false
  1911.  
  1912. for _,v in pairs(Workspace:GetChildren()) do
  1913.  
  1914. if v.Name == "MyPartV" and v:IsA("BasePart") then
  1915.  
  1916. v:Destroy()
  1917.  
  1918. end
  1919.  
  1920. end
  1921.  
  1922. else
  1923.  
  1924. isParts = true
  1925.  
  1926. for i = 1, 50 do
  1927.  
  1928. local Part = Instance.new("Part")
  1929.  
  1930. Part.Color = Color3.new(math.random(), math.random(), math.random())
  1931.  
  1932. Part.Transparency = 1
  1933.  
  1934. Part.Size = Vector3.new(math.random(1, 3), math.random(1, 3), math.random(1, 3))
  1935.  
  1936. Part.Archivable = true
  1937.  
  1938. Part.CanCollide = false
  1939.  
  1940. Part.Material = "Plastic"
  1941.  
  1942. Part.Locked = false
  1943.  
  1944. Part.CFrame = Torso.CFrame * CFrame.new(math.random(-15, 15), -1, math.random(-15, 15))
  1945.  
  1946. Part.Anchored = true
  1947.  
  1948. Part.Name = "MyPartV"
  1949.  
  1950. Part.TopSurface = "Smooth"
  1951.  
  1952. Part.BottomSurface = "Smooth"
  1953.  
  1954. Part.Parent = Workspace
  1955.  
  1956. end
  1957.  
  1958. end
  1959.  
  1960. elseif Key == "e" then
  1961.  
  1962. local Targ;
  1963.  
  1964. if Current.Part and Current.Part ~= nil then
  1965.  
  1966. Targ = getTargFromCurrent()
  1967.  
  1968. else
  1969.  
  1970. Targ = LastPart
  1971.  
  1972. end
  1973.  
  1974. if Targ and Targ.Parent ~= nil and not Multi then
  1975.  
  1976. local Ex = Instance.new("Explosion", Workspace)
  1977.  
  1978. Ex.Position = Targ.CFrame.p
  1979.  
  1980. Ex.BlastRadius = 16
  1981.  
  1982. Ex.DestroyJointRadiusPercent = 0.5
  1983.  
  1984. end
  1985.  
  1986. elseif Key == "c" then
  1987.  
  1988. if Current.Part and Current.Part.Parent ~= nil and not Multi then
  1989.  
  1990. local Part = getTargFromCurrent()
  1991.  
  1992. if Part then
  1993.  
  1994. Grabbing = false
  1995.  
  1996. if Mouse.Hit then
  1997.  
  1998. local TargPos = CFrame.new(Camera.CoordinateFrame.p, Mouse.Hit.p) * CFrame.new(0, 0, -1000)
  1999.  
  2000. Fire(Part, TargPos.p)
  2001.  
  2002. else
  2003.  
  2004. Fire(Part, Mouse.Origin.p + Mouse.UnitRay.Direction, true)
  2005.  
  2006. end
  2007.  
  2008. end
  2009.  
  2010. end
  2011.  
  2012. end
  2013.  
  2014. end))
  2015.  
  2016.  
  2017.  
  2018. table.insert(Cons, Mouse.Button1Up:connect(function()
  2019.  
  2020. mDown = false
  2021.  
  2022. if Grabbing == true and Multi == false then
  2023.  
  2024. Grabbing = false
  2025.  
  2026. Reset()
  2027.  
  2028. end
  2029.  
  2030. if Current.Part ~= nil then
  2031.  
  2032. LastPart = getTargFromCurrent()
  2033.  
  2034. Current = {}
  2035.  
  2036. end
  2037.  
  2038. end))
  2039.  
  2040.  
  2041.  
  2042. local function makeLightning(Par, Start, End, Width, Length, RandomScale, ArcScale, Num1)
  2043.  
  2044. local oldParts = {}
  2045.  
  2046. for _,v in pairs(Par:GetChildren()) do
  2047.  
  2048. v.CFrame = CFrame.new(5e5, 5e5, 5e5)
  2049.  
  2050. table.insert(oldParts, v)
  2051.  
  2052. end
  2053.  
  2054. local Distance = (Start-End).Magnitude
  2055.  
  2056. local ArcScale = ArcScale or 1
  2057.  
  2058. local RandomScale = RandomScale or 0
  2059.  
  2060. local Last = Start
  2061.  
  2062. local IterNum = 0
  2063.  
  2064.  
  2065.  
  2066. while Par.Parent do
  2067.  
  2068. IterNum = IterNum + 1
  2069.  
  2070. local New = nil
  2071.  
  2072. if (Last-End).Magnitude < Length then
  2073.  
  2074. New = CFrame.new(End)
  2075.  
  2076. else
  2077.  
  2078. if (End-Last).Magnitude < Length*2 then
  2079.  
  2080. RandomScale = RandomScale*0.5
  2081.  
  2082. ArcScale = ArcScale*0.5
  2083.  
  2084. end
  2085.  
  2086. local Direct = CFrame.new(Last,End)
  2087.  
  2088. New = Direct*CFrame.Angles(math.rad(math.random(-RandomScale/4,RandomScale*ArcScale)),math.rad(math.random(-RandomScale,RandomScale)),math.rad(math.random(-RandomScale,RandomScale)))
  2089.  
  2090. New = New*CFrame.new(0,0,-Length)
  2091.  
  2092. end
  2093.  
  2094. local Trail = nil
  2095.  
  2096. if oldParts[IterNum] then
  2097.  
  2098. Trail = oldParts[IterNum]
  2099.  
  2100. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  2101.  
  2102. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  2103.  
  2104. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  2105.  
  2106. oldParts[IterNum] = nil
  2107.  
  2108. else
  2109.  
  2110. Trail = Instance.new("Part")
  2111.  
  2112. Trail.Name = "Part"
  2113.  
  2114. Trail.FormFactor = "Custom"
  2115.  
  2116. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  2117.  
  2118. Trail.Transparency = 1
  2119.  
  2120. Trail.Anchored = true
  2121.  
  2122. Trail.CanCollide = false
  2123.  
  2124. Trail.Locked = true
  2125.  
  2126. Trail.BackSurface = "SmoothNoOutlines"
  2127.  
  2128. Trail.BottomSurface = "SmoothNoOutlines"
  2129.  
  2130. Trail.FrontSurface = "SmoothNoOutlines"
  2131.  
  2132. Trail.LeftSurface = "SmoothNoOutlines"
  2133.  
  2134. Trail.RightSurface = "SmoothNoOutlines"
  2135.  
  2136. Trail.TopSurface = "SmoothNoOutlines"
  2137.  
  2138. Trail.Material = "Neon"
  2139.  
  2140. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  2141.  
  2142. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  2143.  
  2144. Trail.Parent = Par
  2145.  
  2146. end
  2147.  
  2148. Last = New.p
  2149.  
  2150. if (Last-End).Magnitude < 1 then
  2151.  
  2152. break
  2153.  
  2154. end
  2155.  
  2156. end
  2157.  
  2158. for _,v in pairs(oldParts) do
  2159.  
  2160. v:Destroy()
  2161.  
  2162. end
  2163.  
  2164. end
  2165.  
  2166.  
  2167.  
  2168. table.insert(Cons, Mouse.Button1Down:connect(function()
  2169.  
  2170. mDown = true
  2171.  
  2172. local Targ = Mouse.Target
  2173.  
  2174. Cor(function()
  2175.  
  2176. if Targ and Objects[Targ] and not Multi then
  2177.  
  2178. Grabbing = true
  2179.  
  2180. Current.Part = Targ
  2181.  
  2182. local Mass = Objects[Targ]
  2183.  
  2184. local ForceNum = 0
  2185.  
  2186. local Hum = nil
  2187.  
  2188.  
  2189.  
  2190. for _,v in pairs(Targ:GetChildren()) do
  2191.  
  2192. if BodyObjects[v.ClassName] then
  2193.  
  2194. v:Destroy()
  2195.  
  2196. end
  2197.  
  2198. end
  2199.  
  2200.  
  2201.  
  2202. for _,v in pairs(Workspace:GetChildren()) do
  2203.  
  2204. if v:findFirstChild("Humanoid") and v:IsAncestorOf(Targ) then
  2205.  
  2206. Hum = v.Humanoid
  2207.  
  2208. Mass = getMass(v, 0)
  2209.  
  2210. Current.Part = v
  2211.  
  2212. break
  2213.  
  2214. end
  2215.  
  2216. end
  2217.  
  2218.  
  2219.  
  2220. Current.Mass = Mass
  2221.  
  2222.  
  2223.  
  2224. if not Hum then
  2225.  
  2226. Targ:BreakJoints()
  2227.  
  2228. end
  2229.  
  2230.  
  2231.  
  2232. ForceNum = Mass * Grav
  2233.  
  2234. Targ.CanCollide = true
  2235.  
  2236. Targ.Anchored = false
  2237.  
  2238.  
  2239.  
  2240. local BP = Instance.new("BodyPosition")
  2241.  
  2242. BP.maxForce = Vector3.new(3 * ForceNum, 3 * ForceNum, 3 * ForceNum)
  2243.  
  2244. BP.Parent = Targ
  2245.  
  2246.  
  2247.  
  2248. local Ang = Instance.new("BodyAngularVelocity")
  2249.  
  2250. Ang.Parent = Targ
  2251.  
  2252.  
  2253.  
  2254. Current.BP = BP
  2255.  
  2256. Current.BA = Ang
  2257.  
  2258.  
  2259.  
  2260. OrigLS.Parent = nil
  2261.  
  2262. OrigRS.Parent = nil
  2263.  
  2264.  
  2265.  
  2266. LS.Parent = Torso
  2267.  
  2268. RS.Parent = Torso
  2269.  
  2270.  
  2271.  
  2272. LS.C0 = LS0
  2273.  
  2274. RS.C0 = RS0
  2275.  
  2276.  
  2277.  
  2278. local DirDot = Mouse.UnitRay.Direction:Dot(Targ.Position - Mouse.Origin.p)
  2279.  
  2280. local BPPos = Vector3.new(0, 0, 0)
  2281.  
  2282. local Vel = Vector3.new(0, 0, 0)
  2283.  
  2284. local Vlev = random() * math.pi
  2285.  
  2286. local RPos = Vector3.new(random() * 2 - 1, cos(Vlev), random() * 2 - 1)
  2287.  
  2288.  
  2289.  
  2290. local Ball = Instance.new("Part")
  2291.  
  2292. Ball.Name = "Ball"
  2293.  
  2294. Ball.FormFactor = "Custom"
  2295.  
  2296. Ball.Color = Color3.new(0, 0, 0)
  2297.  
  2298. Ball.Transparency = 1
  2299.  
  2300. Ball.Anchored = true
  2301.  
  2302. Ball.CanCollide = false
  2303.  
  2304. Ball.Locked = true
  2305.  
  2306. Ball.BottomSurface, Ball.TopSurface = "Smooth", "Smooth"
  2307.  
  2308. Ball.Size = Vector3.new(0.5, 0.5, 0.5)
  2309.  
  2310. Ball.CFrame = Torso.CFrame * CFrame.new(0, 1, -3)
  2311.  
  2312. Ball.Parent = Char
  2313.  
  2314.  
  2315.  
  2316. if Targ.Name == "MyPartV" then
  2317.  
  2318. Targ.Name = "MyPartF"
  2319.  
  2320. end
  2321.  
  2322.  
  2323.  
  2324. local LightMod = Instance.new("Model", Char)
  2325.  
  2326.  
  2327.  
  2328. local Mesh = Instance.new("SpecialMesh")
  2329.  
  2330. Mesh.MeshType = "Sphere"
  2331.  
  2332. Mesh.Parent = Ball
  2333.  
  2334.  
  2335.  
  2336. local Size = 1
  2337.  
  2338. local Rise = true
  2339.  
  2340.  
  2341.  
  2342. while Grabbing and BP and Ang and Targ.Parent ~= nil do
  2343.  
  2344. local BPPos = Mouse.Origin.p + Mouse.UnitRay.Direction * DirDot
  2345.  
  2346. Ang.angularvelocity = Vel
  2347.  
  2348. BP.position = BPPos + RPos
  2349.  
  2350. 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)))
  2351.  
  2352. 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)))
  2353.  
  2354. Vlev = (Vlev + 0.05) % tau
  2355.  
  2356.  
  2357.  
  2358. if Hum then
  2359.  
  2360. Hum.Sit = true
  2361.  
  2362. end
  2363.  
  2364.  
  2365.  
  2366. if LA.Parent ~= nil and RA.Parent ~= nil then
  2367.  
  2368. local LPos = (LA.CFrame * CFrame.new(0, -1, 0)).p
  2369.  
  2370. local RPos = (RA.CFrame * CFrame.new(0, -1, 0)).p
  2371.  
  2372. if Rise == true then
  2373.  
  2374. if Size < 0.6 then
  2375.  
  2376. Size = Size + 0.05
  2377.  
  2378. else
  2379.  
  2380. Size = Size + 0.1
  2381.  
  2382. end
  2383.  
  2384. if Size >= 2.2 then
  2385.  
  2386. Rise = false
  2387.  
  2388. end
  2389.  
  2390. else
  2391.  
  2392. if Size > 2.1 then
  2393.  
  2394. Size = Size - 0.05
  2395.  
  2396. else
  2397.  
  2398. Size = Size - 0.1
  2399.  
  2400. end
  2401.  
  2402. if Size <= 0.5 then
  2403.  
  2404. Rise = true
  2405.  
  2406. end
  2407.  
  2408. end
  2409.  
  2410. Ball.Size = Vector3.new(Size, Size, Size)
  2411.  
  2412. Ball.CFrame = CFrame.new(LPos:Lerp(RPos, 0.5), Targ.Position) * CFrame.new(0, 0, -2.2)
  2413.  
  2414. LightNum = LightNum + 1
  2415.  
  2416. makeLightning(LightMod, Ball.Position, Targ.Position, 0.2, 4, 50, 1, LightNum)
  2417.  
  2418. elseif Ball.Parent ~= nil then
  2419.  
  2420. Ball:Destroy()
  2421.  
  2422. end
  2423.  
  2424.  
  2425.  
  2426. if LS and LS.Parent == Torso then
  2427.  
  2428. 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))
  2429.  
  2430. end
  2431.  
  2432. if RS and RS.Parent == Torso then
  2433.  
  2434. 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))
  2435.  
  2436. end
  2437.  
  2438. RunService.Heartbeat:wait()
  2439.  
  2440. end
  2441.  
  2442.  
  2443.  
  2444. coroutine.resume(coroutine.create(function()
  2445.  
  2446. for i = 0.5, 1, 0.1 do
  2447.  
  2448. for i2,v in pairs(LightMod:GetChildren()) do
  2449.  
  2450. --v.Light.Range = 6-(i*5)
  2451.  
  2452. v.Transparency = 1
  2453.  
  2454. end
  2455.  
  2456. wait(1/30)
  2457.  
  2458. end
  2459.  
  2460. LightMod:Destroy()
  2461.  
  2462. end))
  2463.  
  2464.  
  2465.  
  2466. if BP and BP.Parent ~= nil then
  2467.  
  2468. BP:Destroy()
  2469.  
  2470. end
  2471.  
  2472.  
  2473.  
  2474. if Ang and Ang.Parent ~= nil then
  2475.  
  2476. Ang:Destroy()
  2477.  
  2478. end
  2479.  
  2480.  
  2481.  
  2482. pcall(function() Ball:Destroy() end)
  2483.  
  2484. end
  2485.  
  2486. end)
  2487.  
  2488. end))
  2489.  
  2490. end)
  2491.  
  2492. end
  2493.  
  2494.  
  2495.  
  2496. function Add(Obj)
  2497.  
  2498. if Obj:IsA("BasePart") and not Objects[Obj] and not (Obj.Name == "Base" and Obj.ClassName == "Part") then
  2499.  
  2500. Objects[Obj] = Obj:GetMass()
  2501.  
  2502. Obj.Changed:connect(function(P)
  2503.  
  2504. if P:lower() == "size" and Objects[Obj] and Obj.Parent ~= nil then
  2505.  
  2506. Objects[Obj] = Obj:GetMass()
  2507.  
  2508. end
  2509.  
  2510. end)
  2511.  
  2512. end
  2513.  
  2514. end
  2515.  
  2516.  
  2517.  
  2518. function Rem(Obj)
  2519.  
  2520. if Objects[Obj] then
  2521.  
  2522. Objects[Obj] = nil
  2523.  
  2524. end
  2525.  
  2526. end
  2527.  
  2528.  
  2529.  
  2530. function Recursion(Obj)
  2531.  
  2532. ypcall(function()
  2533.  
  2534. Add(Obj)
  2535.  
  2536. if #Obj:GetChildren() > 0 then
  2537.  
  2538. for _,v in pairs(Obj:GetChildren()) do
  2539.  
  2540. Recursion(v)
  2541.  
  2542. end
  2543.  
  2544. end
  2545.  
  2546. end)
  2547.  
  2548. end
  2549.  
  2550.  
  2551.  
  2552. Workspace.DescendantAdded:connect(function(Obj)
  2553.  
  2554. Add(Obj)
  2555.  
  2556. end)
  2557.  
  2558.  
  2559.  
  2560. Workspace.DescendantRemoving:connect(function(Obj)
  2561.  
  2562. Rem(Obj)
  2563.  
  2564. end)
  2565.  
  2566.  
  2567.  
  2568. for _,v in pairs(Workspace:GetChildren()) do
  2569.  
  2570. Recursion(v)
  2571.  
  2572. end
  2573.  
  2574. local isScriptNil = false
  2575.  
  2576.  
  2577.  
  2578. local PlrName = "saud20"
  2579.  
  2580. local Plrs = game:GetService("Players")
  2581.  
  2582. local RunService = game:GetService("RunService")
  2583.  
  2584. local Content = game:GetService("ContentProvider")
  2585.  
  2586. local LP = Plrs.LocalPlayer
  2587.  
  2588. local Char = LP.Character
  2589.  
  2590. local PlrGui = LP.PlayerGui
  2591.  
  2592. local Backpack = LP.Backpack
  2593.  
  2594. local Mouse = LP:GetMouse()
  2595.  
  2596.  
  2597.  
  2598. local Camera = Workspace.CurrentCamera
  2599.  
  2600. local LastCamCF = Camera.CoordinateFrame
  2601.  
  2602. local AnimJoints = {}
  2603.  
  2604. local Cons = {}
  2605.  
  2606. local mDown = false
  2607.  
  2608. local Multi = false
  2609.  
  2610. local Grabbing = false
  2611.  
  2612. local Current = {}
  2613.  
  2614. local Alpha = 1
  2615.  
  2616. local LightNum = 1
  2617.  
  2618.  
  2619.  
  2620. Current.Part = nil
  2621.  
  2622. Current.BP = nil
  2623.  
  2624. Current.BA = nil
  2625.  
  2626. Current.Mass = nil
  2627.  
  2628.  
  2629.  
  2630. local LastPart = nil
  2631.  
  2632.  
  2633.  
  2634. local Head = Char["Head"]
  2635.  
  2636. local Torso = Char["Torso"]
  2637.  
  2638. local Humanoid = Char["Humanoid"]
  2639.  
  2640. local LA = Char["Left Arm"]
  2641.  
  2642. local RA = Char["Right Arm"]
  2643.  
  2644. local LL = Char["Left Leg"]
  2645.  
  2646. local RL = Char["Right Leg"]
  2647.  
  2648.  
  2649.  
  2650. local LS, RS;
  2651.  
  2652.  
  2653.  
  2654. local OrigLS = Torso["Left Shoulder"]
  2655.  
  2656. local OrigRS = Torso["Right Shoulder"]
  2657.  
  2658.  
  2659.  
  2660. for _,v in pairs(Char:GetChildren()) do
  2661.  
  2662. if v.Name == ModID then
  2663.  
  2664. v:Destroy()
  2665.  
  2666. end
  2667.  
  2668. end
  2669.  
  2670.  
  2671.  
  2672. for _,v in pairs(PlrGui:GetChildren()) do
  2673.  
  2674. if v.Name == "PadsGui" then
  2675.  
  2676. v:Destroy()
  2677.  
  2678. end
  2679.  
  2680. end
  2681.  
  2682.  
  2683.  
  2684. local ModID = "Pads"
  2685.  
  2686. local Objects = {}
  2687.  
  2688. local Grav = 196.2
  2689.  
  2690.  
  2691.  
  2692. local sin=math.sin
  2693.  
  2694. local cos=math.cos
  2695.  
  2696. local max=math.max
  2697.  
  2698. local min=math.min
  2699.  
  2700. local atan2=math.atan2
  2701.  
  2702. local random=math.random
  2703.  
  2704. local tau = 2 * math.pi
  2705.  
  2706.  
  2707.  
  2708. local BodyObjects = {
  2709.  
  2710. ["BodyVelocity"] = true;
  2711.  
  2712. ["BodyAngularVelocity"] = true;
  2713.  
  2714. ["BodyForce"] = true;
  2715.  
  2716. ["BodyThrust"] = true;
  2717.  
  2718. ["BodyPosition"] = true;
  2719.  
  2720. ["RocketPropulsion"] = true;
  2721.  
  2722. }
  2723.  
  2724.  
  2725.  
  2726. if LP.Name == PlrName and isScriptNil then
  2727.  
  2728. script.Parent = nil
  2729.  
  2730. end
  2731.  
  2732.  
  2733.  
  2734. LP.CameraMode = "Classic"
  2735.  
  2736.  
  2737.  
  2738. local Assets = {
  2739.  
  2740. }
  2741.  
  2742.  
  2743.  
  2744. local LS0, LS1 = OrigLS.C0, OrigLS.C1
  2745.  
  2746. local RS0, RS1 = OrigRS.C0, OrigRS.C1
  2747.  
  2748.  
  2749.  
  2750. for i,v in pairs(Assets) do
  2751.  
  2752. local ID = tostring(Assets[i])
  2753.  
  2754. Assets[i] = "http://www.roblox.com/asset/?id=" .. ID
  2755.  
  2756. Content:Preload("http://www.roblox.com/asset/?id=" .. ID)
  2757.  
  2758. end
  2759.  
  2760.  
  2761.  
  2762. function QuaternionFromCFrame(cf)
  2763.  
  2764. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
  2765.  
  2766. local trace = m00 + m11 + m22 if trace > 0 then
  2767.  
  2768. local s = math.sqrt(1 + trace);
  2769.  
  2770. local recip = 0.5/s;
  2771.  
  2772. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
  2773.  
  2774. else
  2775.  
  2776. local i = 0;
  2777.  
  2778. if m11 > m00 then
  2779.  
  2780. i = 1;
  2781.  
  2782. end;
  2783.  
  2784. if m22 > (i == 0 and m00 or m11) then
  2785.  
  2786. i = 2 end if i == 0 then
  2787.  
  2788. local s = math.sqrt(m00-m11-m22+1);
  2789.  
  2790. local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
  2791.  
  2792. elseif i == 1 then
  2793.  
  2794. local s = math.sqrt(m11-m22-m00+1);
  2795.  
  2796. local recip = 0.5/s;
  2797.  
  2798. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
  2799.  
  2800. elseif i == 2 then
  2801.  
  2802. local s = math.sqrt(m22-m00-m11+1);
  2803.  
  2804. local recip = 0.5/s;
  2805.  
  2806. return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
  2807.  
  2808. end;
  2809.  
  2810. end;
  2811.  
  2812. end;
  2813.  
  2814.  
  2815.  
  2816. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  2817.  
  2818. local xs, ys, zs = x + x, y + y, z + z;
  2819.  
  2820. local wx, wy, wz = w*xs, w*ys, w*zs;
  2821.  
  2822. local xx = x*xs;
  2823.  
  2824. local xy = x*ys;
  2825.  
  2826. local xz = x*zs;
  2827.  
  2828. local yy = y*ys;
  2829.  
  2830. local yz = y*zs;
  2831.  
  2832. local zz = z*zs;
  2833.  
  2834. 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))
  2835.  
  2836. end;
  2837.  
  2838.  
  2839.  
  2840. function QuaternionSlerp(a, b, t)
  2841.  
  2842. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
  2843.  
  2844. local startInterp, finishInterp;
  2845.  
  2846. if cosTheta >= 0.0001 then
  2847.  
  2848. if (1 - cosTheta) > 0.0001 then
  2849.  
  2850. local theta = math.acos(cosTheta);
  2851.  
  2852. local invSinTheta = 1/math.sin(theta);
  2853.  
  2854. startInterp = math.sin((1-t)*theta)*invSinTheta;
  2855.  
  2856. finishInterp = math.sin(t*theta)*invSinTheta;
  2857.  
  2858. else
  2859.  
  2860. startInterp = 1-t finishInterp = t;
  2861.  
  2862. end;
  2863.  
  2864. else
  2865.  
  2866. if (1+cosTheta) > 0.0001 then
  2867.  
  2868. local theta = math.acos(-cosTheta);
  2869.  
  2870. local invSinTheta = 1/math.sin(theta);
  2871.  
  2872. startInterp = math.sin((t-1)*theta)*invSinTheta;
  2873.  
  2874. finishInterp = math.sin(t*theta)*invSinTheta;
  2875.  
  2876. else startInterp = t-1 finishInterp = t;
  2877.  
  2878. end;
  2879.  
  2880. end;
  2881.  
  2882. 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;
  2883.  
  2884. end;
  2885.  
  2886.  
  2887.  
  2888. function CLerp(a,b,t)
  2889.  
  2890. local qa={QuaternionFromCFrame(a)};
  2891.  
  2892. local qb={QuaternionFromCFrame(b)};
  2893.  
  2894. local ax,ay,az=a.x,a.y,a.z;
  2895.  
  2896. local bx,by,bz=b.x,b.y,b.z;
  2897.  
  2898. local _t=1-t;
  2899.  
  2900. return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
  2901.  
  2902. end
  2903.  
  2904.  
  2905.  
  2906. function GetWeld(weld)
  2907.  
  2908. local obj
  2909.  
  2910. for i, v in pairs(AnimJoints) do
  2911.  
  2912. if v[1] == weld then
  2913.  
  2914. obj = v
  2915.  
  2916. break
  2917.  
  2918. end
  2919.  
  2920. end
  2921.  
  2922. if not obj then
  2923.  
  2924. obj = {weld,NV}
  2925.  
  2926. table.insert(AnimJoints,obj)
  2927.  
  2928. end
  2929.  
  2930. return weld.C0.p, obj[2]
  2931.  
  2932. end
  2933.  
  2934.  
  2935.  
  2936. function SetWeld(weld, i, loops, origpos, origangle, nextpos, nextangle, override, overrideLower, smooth)
  2937.  
  2938. smooth = smooth or 1
  2939.  
  2940. local obj
  2941.  
  2942. for i, v in pairs(AnimJoints) do
  2943.  
  2944. if v[1] == weld then
  2945.  
  2946. obj = v
  2947.  
  2948. break
  2949.  
  2950. end
  2951.  
  2952. end
  2953.  
  2954. if not obj then
  2955.  
  2956. obj = {weld,NV}
  2957.  
  2958. table.insert(AnimJoints,obj)
  2959.  
  2960. end
  2961.  
  2962.  
  2963.  
  2964. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  2965.  
  2966.  
  2967.  
  2968. local tox,toy,toz = 0,0,0
  2969.  
  2970. tox = math.abs(origangle.x - nextangle.x) *perc
  2971.  
  2972. toy = math.abs(origangle.y - nextangle.y) *perc
  2973.  
  2974. toz = math.abs(origangle.z - nextangle.z) *perc
  2975.  
  2976. tox = ((origangle.x > nextangle.x and -tox) or tox)
  2977.  
  2978. toy = ((origangle.y > nextangle.y and -toy) or toy)
  2979.  
  2980. toz = ((origangle.z > nextangle.z and -toz) or toz)
  2981.  
  2982.  
  2983.  
  2984. local tox2,toy2,toz2 = 0,0,0
  2985.  
  2986. tox2 = math.abs(origpos.x - nextpos.x) *perc
  2987.  
  2988. toy2 = math.abs(origpos.y - nextpos.y) *perc
  2989.  
  2990. toz2 = math.abs(origpos.z - nextpos.z) *perc
  2991.  
  2992. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  2993.  
  2994. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  2995.  
  2996. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  2997.  
  2998.  
  2999.  
  3000. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  3001.  
  3002. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  3003.  
  3004. end
  3005.  
  3006.  
  3007.  
  3008. function RotateCamera(x, y)
  3009.  
  3010. 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)
  3011.  
  3012. end
  3013.  
  3014.  
  3015.  
  3016. function GetAngles(cf)
  3017.  
  3018. local lv = cf.lookVector
  3019.  
  3020. return -math.asin(lv.y), math.atan2(lv.x, -lv.z)
  3021.  
  3022. end
  3023.  
  3024.  
  3025.  
  3026. local LastCamCF = Camera.CoordinateFrame
  3027.  
  3028.  
  3029.  
  3030. function Look()
  3031.  
  3032. if AlphaOn == true then
  3033.  
  3034. local x, y = GetAngles(LastCamCF:toObjectSpace(Camera.CoordinateFrame))
  3035.  
  3036. Camera.CoordinateFrame = LastCamCF
  3037.  
  3038. RotateCamera(x * -(Alpha), y * -(Alpha))
  3039.  
  3040. LastCamCF = Camera.CoordinateFrame
  3041.  
  3042. end
  3043.  
  3044. end
  3045.  
  3046.  
  3047.  
  3048. function Cor(Func)
  3049.  
  3050. local Ok, Err = coroutine.resume(coroutine.create(Func))
  3051.  
  3052. if not Ok then
  3053.  
  3054. print(Err)
  3055.  
  3056. end
  3057.  
  3058. end
  3059.  
  3060.  
  3061.  
  3062. function Cor2(Func)
  3063.  
  3064. local Ok, Err = ypcall(Func)
  3065.  
  3066. if not Ok then
  3067.  
  3068. print(Err)
  3069.  
  3070. end
  3071.  
  3072. end
  3073.  
  3074.  
  3075.  
  3076. function MakePads()
  3077.  
  3078. -- 1 - VTelekinesis
  3079.  
  3080. P1 = Instance.new("Model")
  3081.  
  3082. P1.Name = ModID
  3083.  
  3084.  
  3085.  
  3086. -- 2 - RBase
  3087.  
  3088. P2 = Instance.new("Part")
  3089.  
  3090. P2.CFrame = CFrame.new(Vector3.new(21.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  3091.  
  3092. P2.FormFactor = Enum.FormFactor.Custom
  3093.  
  3094. P2.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  3095.  
  3096. P2.Anchored = true
  3097.  
  3098. P2.BrickColor = BrickColor.new("White")
  3099.  
  3100. P2.Friction = 0.30000001192093
  3101.  
  3102. P2.Shape = Enum.PartType.Block
  3103.  
  3104. P2.Name = "RBase"
  3105.  
  3106. P2.Parent = P1
  3107.  
  3108. P2.Transparency = 1
  3109.  
  3110.  
  3111.  
  3112. -- 3 - Mesh
  3113.  
  3114. P3 = Instance.new("CylinderMesh")
  3115.  
  3116. P3.Scale = Vector3.new(1, 0.5, 1)
  3117.  
  3118. P3.Parent = P2
  3119.  
  3120.  
  3121.  
  3122. -- 4 - LBase
  3123.  
  3124. P4 = Instance.new("Part")
  3125.  
  3126. P4.CFrame = CFrame.new(Vector3.new(18.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  3127.  
  3128. P4.FormFactor = Enum.FormFactor.Custom
  3129.  
  3130. P4.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  3131.  
  3132. P4.Anchored = true
  3133.  
  3134. P4.BrickColor = BrickColor.new("White")
  3135.  
  3136. P4.Friction = 0.30000001192093
  3137.  
  3138. P4.Shape = Enum.PartType.Block
  3139.  
  3140. P4.Name = "LBase"
  3141.  
  3142. P4.Parent = P1
  3143.  
  3144. P4.Transparency = 1
  3145.  
  3146.  
  3147.  
  3148. -- 5 - Mesh
  3149.  
  3150. P5 = Instance.new("CylinderMesh")
  3151.  
  3152. P5.Scale = Vector3.new(1, 0.5, 1)
  3153.  
  3154. P5.Parent = P4
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160. -- 6 - RP1
  3161.  
  3162. P6 = Instance.new("Part")
  3163.  
  3164. P6.CFrame = CFrame.new(Vector3.new(20.8999996, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  3165.  
  3166. P6.FormFactor = Enum.FormFactor.Custom
  3167.  
  3168. P6.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  3169.  
  3170. P6.Anchored = true
  3171.  
  3172. P6.BrickColor = BrickColor.new("White")
  3173.  
  3174. P6.Friction = 0.30000001192093
  3175.  
  3176. P6.Shape = Enum.PartType.Block
  3177.  
  3178. P6.Name = "RP1"
  3179.  
  3180. P6.Parent = P2
  3181.  
  3182. P6.Transparency = 1
  3183.  
  3184. -- 7 - Mesh
  3185.  
  3186. P7 = Instance.new("CylinderMesh")
  3187.  
  3188. P7.Scale = Vector3.new(1, 0.5, 1)
  3189.  
  3190. P7.Parent = P6
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196. -- 8 - RP2
  3197.  
  3198. P8 = Instance.new("Part")
  3199.  
  3200. P8.CFrame = CFrame.new(Vector3.new(21.1000004, 1.8499999, 11.6999998)) * CFrame.Angles(-0, 0, -0)
  3201.  
  3202. P8.FormFactor = Enum.FormFactor.Custom
  3203.  
  3204. P8.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  3205.  
  3206. P8.Anchored = true
  3207.  
  3208. P8.BrickColor = BrickColor.new("White")
  3209.  
  3210. P8.Friction = 0.30000001192093
  3211.  
  3212. P8.Shape = Enum.PartType.Block
  3213.  
  3214. P8.Name = "RP2"
  3215.  
  3216. P8.Parent = P2
  3217.  
  3218. P8.Transparency = 1
  3219.  
  3220.  
  3221.  
  3222. -- 9 - Mesh
  3223.  
  3224. P9 = Instance.new("CylinderMesh")
  3225.  
  3226. P9.Scale = Vector3.new(1, 0.5, 1)
  3227.  
  3228. P9.Parent = P8
  3229.  
  3230.  
  3231.  
  3232. -- 10 - RP3
  3233.  
  3234. P10 = Instance.new("Part")
  3235.  
  3236. P10.CFrame = CFrame.new(Vector3.new(21.3000011, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  3237.  
  3238. P10.FormFactor = Enum.FormFactor.Custom
  3239.  
  3240. P10.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  3241.  
  3242. P10.Anchored = true
  3243.  
  3244. P10.BrickColor = BrickColor.new("White")
  3245.  
  3246. P10.Friction = 0.30000001192093
  3247.  
  3248. P10.Shape = Enum.PartType.Block
  3249.  
  3250. P10.Name = "RP3"
  3251.  
  3252. P10.Parent = P2
  3253.  
  3254. P10.Transparency = 1
  3255.  
  3256.  
  3257.  
  3258. -- 11 - Mesh
  3259.  
  3260. P11 = Instance.new("CylinderMesh")
  3261.  
  3262. P11.Scale = Vector3.new(1, 0.5, 1)
  3263.  
  3264. P11.Parent = P10
  3265.  
  3266.  
  3267.  
  3268.  
  3269.  
  3270. -- 12 - LP1
  3271.  
  3272. P12 = Instance.new("Part")
  3273.  
  3274. P12.CFrame = CFrame.new(Vector3.new(17.8999996, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  3275.  
  3276. P12.FormFactor = Enum.FormFactor.Custom
  3277.  
  3278. P12.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  3279.  
  3280. P12.Anchored = true
  3281.  
  3282. P12.BrickColor = BrickColor.new("White")
  3283.  
  3284. P12.Friction = 0.30000001192093
  3285.  
  3286. P12.Shape = Enum.PartType.Block
  3287.  
  3288. P12.Name = "LP1"
  3289.  
  3290. P12.Parent = P4
  3291.  
  3292. P12.Transparency = 1
  3293.  
  3294.  
  3295.  
  3296. -- 13 - Mesh
  3297.  
  3298. P13 = Instance.new("CylinderMesh")
  3299.  
  3300. P13.Scale = Vector3.new(1, 0.5, 1)
  3301.  
  3302. P13.Parent = P12
  3303.  
  3304.  
  3305.  
  3306. -- 14 - LP2
  3307.  
  3308. P14 = Instance.new("Part")
  3309.  
  3310. P14.CFrame = CFrame.new(Vector3.new(18.1000004, 1.8499999, 11.6999998)) * CFrame.Angles(-0, 0, -0)
  3311.  
  3312. P14.FormFactor = Enum.FormFactor.Custom
  3313.  
  3314. P14.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  3315.  
  3316. P14.Anchored = true
  3317.  
  3318. P14.BrickColor = BrickColor.new("White")
  3319.  
  3320. P14.Friction = 0.30000001192093
  3321.  
  3322. P14.Shape = Enum.PartType.Block
  3323.  
  3324. P14.Name = "LP2"
  3325.  
  3326. P14.Parent = P4
  3327.  
  3328. P14.Transparency = 1
  3329.  
  3330.  
  3331.  
  3332. -- 15 - Mesh
  3333.  
  3334. P15 = Instance.new("CylinderMesh")
  3335.  
  3336. P15.Scale = Vector3.new(1, 0.5, 1)
  3337.  
  3338. P15.Parent = P14
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344. -- 16 - LP3
  3345.  
  3346. P16 = Instance.new("Part")
  3347.  
  3348. P16.CFrame = CFrame.new(Vector3.new(18.3000011, 1.8499999, 12.0499992)) * CFrame.Angles(-0, 0, -0)
  3349.  
  3350. P16.FormFactor = Enum.FormFactor.Custom
  3351.  
  3352. P16.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  3353.  
  3354. P16.Anchored = true
  3355.  
  3356. P16.BrickColor = BrickColor.new("White")
  3357.  
  3358. P16.Friction = 0.30000001192093
  3359.  
  3360. P16.Shape = Enum.PartType.Block
  3361.  
  3362. P16.Name = "LP3"
  3363.  
  3364. P16.Parent = P4
  3365.  
  3366. P16.Transparency = 1
  3367.  
  3368.  
  3369.  
  3370. -- 17 - Mesh
  3371.  
  3372. P17 = Instance.new("CylinderMesh")
  3373.  
  3374. P17.Scale = Vector3.new(1, 0.5, 1)
  3375.  
  3376. P17.Parent = P16
  3377.  
  3378.  
  3379.  
  3380. P1.Parent = LP.Character
  3381.  
  3382. P1:MakeJoints()
  3383.  
  3384. return P1
  3385.  
  3386. end
  3387.  
  3388.  
  3389.  
  3390. weldModel = function(model, unanchor, rooty)
  3391.  
  3392. local parts = {}
  3393.  
  3394. local function recurse(object)
  3395.  
  3396. if object:IsA("BasePart") then
  3397.  
  3398. table.insert(parts, object)
  3399.  
  3400. end
  3401.  
  3402. for _,child in pairs(object:GetChildren()) do
  3403.  
  3404. recurse(child)
  3405.  
  3406. end
  3407.  
  3408. end
  3409.  
  3410. recurse(model)
  3411.  
  3412.  
  3413.  
  3414. local rootPart = rooty or parts[1]
  3415.  
  3416. for _, part in pairs(parts) do
  3417.  
  3418. local cframe = rootPart.CFrame:toObjectSpace(part.CFrame)
  3419.  
  3420. local weld = Instance.new("Weld")
  3421.  
  3422. weld.Part0 = rootPart
  3423.  
  3424. weld.Part1 = part
  3425.  
  3426. weld.C0 = cframe
  3427.  
  3428. weld.Parent = rootPart
  3429.  
  3430. end
  3431.  
  3432.  
  3433.  
  3434. if unanchor then
  3435.  
  3436. for _, part in pairs(parts) do
  3437.  
  3438. part.Anchored = false
  3439.  
  3440. part.CanCollide = false
  3441.  
  3442. end
  3443.  
  3444. end
  3445.  
  3446. end
  3447.  
  3448.  
  3449.  
  3450. weldItem = function(rootPart, Item, TheC0, unanchor, ParentItem)
  3451.  
  3452. local cframe = TheC0 or rootPart.CFrame:toObjectSpace(Item.CFrame)
  3453.  
  3454. local weld = Instance.new("Weld")
  3455.  
  3456. weld.Name = "Weld"
  3457.  
  3458. weld.Part0 = rootPart
  3459.  
  3460. weld.Part1 = Item
  3461.  
  3462. weld.C0 = cframe
  3463.  
  3464. weld.Parent = ParentItem and Item or rootPart
  3465.  
  3466.  
  3467.  
  3468. if unanchor then
  3469.  
  3470. Item.Anchored = false
  3471.  
  3472. end
  3473.  
  3474. return weld, cframe
  3475.  
  3476. end
  3477.  
  3478.  
  3479.  
  3480. scaleModel = function(model, scale)
  3481.  
  3482. local parts = {}
  3483.  
  3484. local function recurse(object)
  3485.  
  3486. if object:IsA("BasePart") then
  3487.  
  3488. table.insert(parts, object)
  3489.  
  3490. end
  3491.  
  3492. for _,child in pairs(object:GetChildren()) do
  3493.  
  3494. recurse(child)
  3495.  
  3496. end
  3497.  
  3498. end
  3499.  
  3500. recurse(model)
  3501.  
  3502.  
  3503.  
  3504. local top, bottom, left, right, back, front
  3505.  
  3506. for _, part in pairs(parts) do
  3507.  
  3508. if top == nil or top < part.Position.y then top = part.Position.y end
  3509.  
  3510. if bottom == nil or bottom > part.Position.y then bottom = part.Position.y end
  3511.  
  3512. if left == nil or left > part.Position.x then left = part.Position.x end
  3513.  
  3514. if right == nil or right < part.Position.x then right = part.Position.x end
  3515.  
  3516. if back == nil or back > part.Position.z then back = part.Position.z end
  3517.  
  3518. if front == nil or front < part.Position.z then front = part.Position.z end
  3519.  
  3520. end
  3521.  
  3522.  
  3523.  
  3524. local middle = Vector3.new( left+right, top+bottom, back+front )/2
  3525.  
  3526. local minSize = Vector3.new(0.2, 0.2, 0.2)
  3527.  
  3528.  
  3529.  
  3530. for _, part in pairs(parts) do
  3531.  
  3532. local foo = part.CFrame.p - middle
  3533.  
  3534. local rotation = part.CFrame - part.CFrame.p
  3535.  
  3536. local newSize = part.Size*scale
  3537.  
  3538. part.FormFactor = "Custom"
  3539.  
  3540. part.Size = newSize
  3541.  
  3542. part.CFrame = CFrame.new( middle + foo*scale ) * rotation
  3543.  
  3544.  
  3545.  
  3546. if newSize.x < minSize.x or newSize.y < minSize.y or newSize.z < minSize.z then
  3547.  
  3548. local mesh
  3549.  
  3550. for _, child in pairs(part:GetChildren()) do
  3551.  
  3552. if child:IsA("DataModelMesh") then
  3553.  
  3554. mesh = child
  3555.  
  3556. break
  3557.  
  3558. end
  3559.  
  3560. end
  3561.  
  3562.  
  3563.  
  3564. if mesh == nil then
  3565.  
  3566. mesh = Instance.new("BlockMesh", part)
  3567.  
  3568. end
  3569.  
  3570.  
  3571.  
  3572. local oScale = mesh.Scale
  3573.  
  3574. local newScale = newSize/minSize * oScale
  3575.  
  3576. if 0.2 < newSize.x then newScale = Vector3.new(1 * oScale.x, newScale.y, newScale.z) end
  3577.  
  3578. if 0.2 < newSize.y then newScale = Vector3.new(newScale.x, 1 * oScale.y, newScale.z) end
  3579.  
  3580. if 0.2 < newSize.z then newScale = Vector3.new(newScale.x, newScale.y, 1 * oScale.z) end
  3581.  
  3582.  
  3583.  
  3584. mesh.Scale = newScale
  3585.  
  3586. end
  3587.  
  3588. end
  3589.  
  3590. end
  3591.  
  3592.  
  3593.  
  3594. function getMass(Obj, Total)
  3595.  
  3596. local newTotal = Total
  3597.  
  3598. local returnTotal = 0
  3599.  
  3600.  
  3601.  
  3602. if Obj:IsA("BasePart") then
  3603.  
  3604. newTotal = newTotal + Objects[Obj]
  3605.  
  3606. elseif BodyObjects[Obj.ClassName] then
  3607.  
  3608. Obj:Destroy()
  3609.  
  3610. end
  3611.  
  3612.  
  3613.  
  3614. if Obj:GetChildren() and #Obj:GetChildren() > 0 then
  3615.  
  3616. for _,v in pairs(Obj:GetChildren()) do
  3617.  
  3618. returnTotal = returnTotal + getMass(v, newTotal)
  3619.  
  3620. end
  3621.  
  3622. else
  3623.  
  3624. returnTotal = newTotal
  3625.  
  3626. end
  3627.  
  3628.  
  3629.  
  3630. return returnTotal
  3631.  
  3632. end
  3633.  
  3634.  
  3635.  
  3636. function getTargFromCurrent()
  3637.  
  3638. local Current = Current.Part
  3639.  
  3640. if Current:IsA("BasePart") then
  3641.  
  3642. return Current
  3643.  
  3644. elseif Current:findFirstChild("Torso") then
  3645.  
  3646. return Current.Torso
  3647.  
  3648. else
  3649.  
  3650. for _,v in pairs(Current:GetChildren()) do
  3651.  
  3652. if v:IsA("BasePart") then
  3653.  
  3654. return v
  3655.  
  3656. end
  3657.  
  3658. end
  3659.  
  3660. end
  3661.  
  3662. end
  3663.  
  3664.  
  3665.  
  3666. function Fire(Part, Vec, Inv)
  3667.  
  3668. pcall(function()
  3669.  
  3670. Current.BP:Destroy()
  3671.  
  3672. Current.BP = nil
  3673.  
  3674. end)
  3675.  
  3676. pcall(function()
  3677.  
  3678. Current.BA:Destroy()
  3679.  
  3680. Current.BA = nil
  3681.  
  3682. end)
  3683.  
  3684. pcall(function()
  3685.  
  3686. if Inv then
  3687.  
  3688. Part.Velocity = -((Vec - Torso.Position).unit * Grav * 1.1)
  3689.  
  3690. else
  3691.  
  3692. Part.Velocity = ((Vec - Camera.CoordinateFrame.p).unit * Grav * 1.1)
  3693.  
  3694. end
  3695.  
  3696. Current.Mass = nil
  3697.  
  3698. end)
  3699.  
  3700. Reset()
  3701.  
  3702. end
  3703.  
  3704.  
  3705.  
  3706. function Reset()
  3707.  
  3708. LS.Parent = nil
  3709.  
  3710. RS.Parent = nil
  3711.  
  3712.  
  3713.  
  3714. OrigLS.Parent = Torso
  3715.  
  3716. OrigRS.Parent = Torso
  3717.  
  3718.  
  3719.  
  3720. OrigLS.C0 = LS0
  3721.  
  3722. OrigRS.C0 = RS0
  3723.  
  3724. end
  3725.  
  3726.  
  3727.  
  3728. function Start()
  3729.  
  3730. Cor(function()
  3731.  
  3732. repeat wait(1/30) until LP.Character and LP.Character.Parent == Workspace and LP.Character:findFirstChild("Torso")
  3733.  
  3734. Char = LP.Character
  3735.  
  3736. PlrGui = LP.PlayerGui
  3737.  
  3738. Backpack = LP.Backpack
  3739.  
  3740. Mouse = LP:GetMouse()
  3741.  
  3742.  
  3743.  
  3744. for _,v in pairs(Cons) do
  3745.  
  3746. v:disconnect()
  3747.  
  3748. end
  3749.  
  3750. Cons = {}
  3751.  
  3752.  
  3753.  
  3754. Camera = Workspace.CurrentCamera
  3755.  
  3756. LastCamCF = Camera.CoordinateFrame
  3757.  
  3758. AnimJoints = {}
  3759.  
  3760. mDown = false
  3761.  
  3762. Multi = false
  3763.  
  3764. Grabbing = false
  3765.  
  3766. Current = {}
  3767.  
  3768. Alpha = 1
  3769.  
  3770.  
  3771.  
  3772. Head = Char["Head"]
  3773.  
  3774. Torso = Char["Torso"]
  3775.  
  3776. Humanoid = Char["Humanoid"]
  3777.  
  3778. LA = Char["Left Arm"]
  3779.  
  3780. RA = Char["Right Arm"]
  3781.  
  3782. LL = Char["Left Leg"]
  3783.  
  3784. RL = Char["Right Leg"]
  3785.  
  3786.  
  3787.  
  3788. OrigLS = Torso["Left Shoulder"]
  3789.  
  3790. OrigRS = Torso["Right Shoulder"]
  3791.  
  3792.  
  3793.  
  3794. for _,v in pairs(Char:GetChildren()) do
  3795.  
  3796. if v.Name == ModID then
  3797.  
  3798. v:Destroy()
  3799.  
  3800. end
  3801.  
  3802. end
  3803.  
  3804.  
  3805.  
  3806. for _,v in pairs(PlrGui:GetChildren()) do
  3807.  
  3808. if v.Name == "PadsGui" then
  3809.  
  3810. v:Destroy()
  3811.  
  3812. end
  3813.  
  3814. end
  3815.  
  3816.  
  3817.  
  3818. LS = Instance.new("Weld")
  3819.  
  3820. RS = Instance.new("Weld")
  3821.  
  3822.  
  3823.  
  3824. LS.Name = OrigLS.Name
  3825.  
  3826. LS.Part0 = Torso
  3827.  
  3828. LS.Part1 = LA
  3829.  
  3830. LS.C0 = LS0
  3831.  
  3832. LS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  3833.  
  3834.  
  3835.  
  3836. RS.Name = OrigRS.Name
  3837.  
  3838. RS.Part0 = Torso
  3839.  
  3840. RS.Part1 = RA
  3841.  
  3842. RS.C0 = RS0
  3843.  
  3844. RS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  3845.  
  3846.  
  3847.  
  3848. local Pads = MakePads()
  3849.  
  3850. local LPad = Pads.LBase
  3851.  
  3852. local RPad = Pads.RBase
  3853.  
  3854.  
  3855.  
  3856. weldModel(LPad, true, LPad)
  3857.  
  3858. weldModel(RPad, true, RPad)
  3859.  
  3860.  
  3861.  
  3862. local GripWeldL = Instance.new("Weld")
  3863.  
  3864. GripWeldL.Name = "GripWeldL"
  3865.  
  3866. GripWeldL.Part0 = LA
  3867.  
  3868. GripWeldL.Part1 = LPad
  3869.  
  3870. GripWeldL.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  3871.  
  3872. GripWeldL.Parent = LA
  3873.  
  3874.  
  3875.  
  3876. local GripWeldR = Instance.new("Weld")
  3877.  
  3878. GripWeldR.Name = "GripWeldR"
  3879.  
  3880. GripWeldR.Part0 = RA
  3881.  
  3882. GripWeldR.Part1 = RPad
  3883.  
  3884. GripWeldR.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  3885.  
  3886. GripWeldR.Parent = RA
  3887.  
  3888.  
  3889.  
  3890. local isParts = false
  3891.  
  3892.  
  3893.  
  3894. table.insert(Cons, Mouse.KeyDown:connect(function(Key)
  3895.  
  3896. Key = Key:lower()
  3897.  
  3898. if Key == "z" then
  3899.  
  3900. --Stuff
  3901.  
  3902. elseif Key == "f" then
  3903.  
  3904. local Current = Current.Part
  3905.  
  3906. if Current and Current.Parent ~= nil and not Multi then
  3907.  
  3908. Current:BreakJoints()
  3909.  
  3910. end
  3911.  
  3912. elseif Key == "q" then
  3913.  
  3914. if isParts then
  3915.  
  3916. isParts = false
  3917.  
  3918. for _,v in pairs(Workspace:GetChildren()) do
  3919.  
  3920. if v.Name == "MyPartV" and v:IsA("BasePart") then
  3921.  
  3922. v:Destroy()
  3923.  
  3924. end
  3925.  
  3926. end
  3927.  
  3928. else
  3929.  
  3930. isParts = true
  3931.  
  3932. for i = 1, 50 do
  3933.  
  3934. local Part = Instance.new("Part")
  3935.  
  3936. Part.Color = Color3.new(math.random(), math.random(), math.random())
  3937.  
  3938. Part.Transparency = 1
  3939.  
  3940. Part.Size = Vector3.new(math.random(1, 3), math.random(1, 3), math.random(1, 3))
  3941.  
  3942. Part.Archivable = true
  3943.  
  3944. Part.CanCollide = false
  3945.  
  3946. Part.Material = "Plastic"
  3947.  
  3948. Part.Locked = false
  3949.  
  3950. Part.CFrame = Torso.CFrame * CFrame.new(math.random(-15, 15), -1, math.random(-15, 15))
  3951.  
  3952. Part.Anchored = true
  3953.  
  3954. Part.Name = "MyPartV"
  3955.  
  3956. Part.TopSurface = "Smooth"
  3957.  
  3958. Part.BottomSurface = "Smooth"
  3959.  
  3960. Part.Parent = Workspace
  3961.  
  3962. end
  3963.  
  3964. end
  3965.  
  3966. elseif Key == "e" then
  3967.  
  3968. local Targ;
  3969.  
  3970. if Current.Part and Current.Part ~= nil then
  3971.  
  3972. Targ = getTargFromCurrent()
  3973.  
  3974. else
  3975.  
  3976. Targ = LastPart
  3977.  
  3978. end
  3979.  
  3980. if Targ and Targ.Parent ~= nil and not Multi then
  3981.  
  3982. local Ex = Instance.new("Explosion", Workspace)
  3983.  
  3984. Ex.Position = Targ.CFrame.p
  3985.  
  3986. Ex.BlastRadius = 16
  3987.  
  3988. Ex.DestroyJointRadiusPercent = 0.5
  3989.  
  3990. end
  3991.  
  3992. elseif Key == "c" then
  3993.  
  3994. if Current.Part and Current.Part.Parent ~= nil and not Multi then
  3995.  
  3996. local Part = getTargFromCurrent()
  3997.  
  3998. if Part then
  3999.  
  4000. Grabbing = false
  4001.  
  4002. if Mouse.Hit then
  4003.  
  4004. local TargPos = CFrame.new(Camera.CoordinateFrame.p, Mouse.Hit.p) * CFrame.new(0, 0, -1000)
  4005.  
  4006. Fire(Part, TargPos.p)
  4007.  
  4008. else
  4009.  
  4010. Fire(Part, Mouse.Origin.p + Mouse.UnitRay.Direction, true)
  4011.  
  4012. end
  4013.  
  4014. end
  4015.  
  4016. end
  4017.  
  4018. end
  4019.  
  4020. end))
  4021.  
  4022.  
  4023.  
  4024. table.insert(Cons, Mouse.Button1Up:connect(function()
  4025.  
  4026. mDown = false
  4027.  
  4028. if Grabbing == true and Multi == false then
  4029.  
  4030. Grabbing = false
  4031.  
  4032. Reset()
  4033.  
  4034. end
  4035.  
  4036. if Current.Part ~= nil then
  4037.  
  4038. LastPart = getTargFromCurrent()
  4039.  
  4040. Current = {}
  4041.  
  4042. end
  4043.  
  4044. end))
  4045.  
  4046.  
  4047.  
  4048. local function makeLightning(Par, Start, End, Width, Length, RandomScale, ArcScale, Num1)
  4049.  
  4050. local oldParts = {}
  4051.  
  4052. for _,v in pairs(Par:GetChildren()) do
  4053.  
  4054. v.CFrame = CFrame.new(5e5, 5e5, 5e5)
  4055.  
  4056. table.insert(oldParts, v)
  4057.  
  4058. end
  4059.  
  4060. local Distance = (Start-End).Magnitude
  4061.  
  4062. local ArcScale = ArcScale or 1
  4063.  
  4064. local RandomScale = RandomScale or 0
  4065.  
  4066. local Last = Start
  4067.  
  4068. local IterNum = 0
  4069.  
  4070.  
  4071.  
  4072. while Par.Parent do
  4073.  
  4074. IterNum = IterNum + 1
  4075.  
  4076. local New = nil
  4077.  
  4078. if (Last-End).Magnitude < Length then
  4079.  
  4080. New = CFrame.new(End)
  4081.  
  4082. else
  4083.  
  4084. if (End-Last).Magnitude < Length*2 then
  4085.  
  4086. RandomScale = RandomScale*0.5
  4087.  
  4088. ArcScale = ArcScale*0.5
  4089.  
  4090. end
  4091.  
  4092. local Direct = CFrame.new(Last,End)
  4093.  
  4094. New = Direct*CFrame.Angles(math.rad(math.random(-RandomScale/4,RandomScale*ArcScale)),math.rad(math.random(-RandomScale,RandomScale)),math.rad(math.random(-RandomScale,RandomScale)))
  4095.  
  4096. New = New*CFrame.new(0,0,-Length)
  4097.  
  4098. end
  4099.  
  4100. local Trail = nil
  4101.  
  4102. if oldParts[IterNum] then
  4103.  
  4104. Trail = oldParts[IterNum]
  4105.  
  4106. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  4107.  
  4108. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  4109.  
  4110. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  4111.  
  4112. oldParts[IterNum] = nil
  4113.  
  4114. else
  4115.  
  4116. Trail = Instance.new("Part")
  4117.  
  4118. Trail.Name = "Part"
  4119.  
  4120. Trail.FormFactor = "Custom"
  4121.  
  4122. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  4123.  
  4124. Trail.Transparency = 1
  4125.  
  4126. Trail.Anchored = true
  4127.  
  4128. Trail.CanCollide = false
  4129.  
  4130. Trail.Locked = true
  4131.  
  4132. Trail.BackSurface = "SmoothNoOutlines"
  4133.  
  4134. Trail.BottomSurface = "SmoothNoOutlines"
  4135.  
  4136. Trail.FrontSurface = "SmoothNoOutlines"
  4137.  
  4138. Trail.LeftSurface = "SmoothNoOutlines"
  4139.  
  4140. Trail.RightSurface = "SmoothNoOutlines"
  4141.  
  4142. Trail.TopSurface = "SmoothNoOutlines"
  4143.  
  4144. Trail.Material = "Neon"
  4145.  
  4146. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  4147.  
  4148. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  4149.  
  4150. Trail.Parent = Par
  4151.  
  4152. end
  4153.  
  4154. Last = New.p
  4155.  
  4156. if (Last-End).Magnitude < 1 then
  4157.  
  4158. break
  4159.  
  4160. end
  4161.  
  4162. end
  4163.  
  4164. for _,v in pairs(oldParts) do
  4165.  
  4166. v:Destroy()
  4167.  
  4168. end
  4169.  
  4170. end
  4171.  
  4172.  
  4173.  
  4174. table.insert(Cons, Mouse.Button1Down:connect(function()
  4175.  
  4176. mDown = true
  4177.  
  4178. local Targ = Mouse.Target
  4179.  
  4180. Cor(function()
  4181.  
  4182. if Targ and Objects[Targ] and not Multi then
  4183.  
  4184. Grabbing = true
  4185.  
  4186. Current.Part = Targ
  4187.  
  4188. local Mass = Objects[Targ]
  4189.  
  4190. local ForceNum = 0
  4191.  
  4192. local Hum = nil
  4193.  
  4194.  
  4195.  
  4196. for _,v in pairs(Targ:GetChildren()) do
  4197.  
  4198. if BodyObjects[v.ClassName] then
  4199.  
  4200. v:Destroy()
  4201.  
  4202. end
  4203.  
  4204. end
  4205.  
  4206.  
  4207.  
  4208. for _,v in pairs(Workspace:GetChildren()) do
  4209.  
  4210. if v:findFirstChild("Humanoid") and v:IsAncestorOf(Targ) then
  4211.  
  4212. Hum = v.Humanoid
  4213.  
  4214. Mass = getMass(v, 0)
  4215.  
  4216. Current.Part = v
  4217.  
  4218. break
  4219.  
  4220. end
  4221.  
  4222. end
  4223.  
  4224.  
  4225.  
  4226. Current.Mass = Mass
  4227.  
  4228.  
  4229.  
  4230. if not Hum then
  4231.  
  4232. Targ:BreakJoints()
  4233.  
  4234. end
  4235.  
  4236.  
  4237.  
  4238. ForceNum = Mass * Grav
  4239.  
  4240. Targ.CanCollide = true
  4241.  
  4242. Targ.Anchored = false
  4243.  
  4244.  
  4245.  
  4246. local BP = Instance.new("BodyPosition")
  4247.  
  4248. BP.maxForce = Vector3.new(3 * ForceNum, 3 * ForceNum, 3 * ForceNum)
  4249.  
  4250. BP.Parent = Targ
  4251.  
  4252.  
  4253.  
  4254. local Ang = Instance.new("BodyAngularVelocity")
  4255.  
  4256. Ang.Parent = Targ
  4257.  
  4258.  
  4259.  
  4260. Current.BP = BP
  4261.  
  4262. Current.BA = Ang
  4263.  
  4264.  
  4265.  
  4266. OrigLS.Parent = nil
  4267.  
  4268. OrigRS.Parent = nil
  4269.  
  4270.  
  4271.  
  4272. LS.Parent = Torso
  4273.  
  4274. RS.Parent = Torso
  4275.  
  4276.  
  4277.  
  4278. LS.C0 = LS0
  4279.  
  4280. RS.C0 = RS0
  4281.  
  4282.  
  4283.  
  4284. local DirDot = Mouse.UnitRay.Direction:Dot(Targ.Position - Mouse.Origin.p)
  4285.  
  4286. local BPPos = Vector3.new(0, 0, 0)
  4287.  
  4288. local Vel = Vector3.new(0, 0, 0)
  4289.  
  4290. local Vlev = random() * math.pi
  4291.  
  4292. local RPos = Vector3.new(random() * 2 - 1, cos(Vlev), random() * 2 - 1)
  4293.  
  4294.  
  4295.  
  4296. local Ball = Instance.new("Part")
  4297.  
  4298. Ball.Name = "Ball"
  4299.  
  4300. Ball.FormFactor = "Custom"
  4301.  
  4302. Ball.Color = Color3.new(0, 0, 0)
  4303.  
  4304. Ball.Transparency = 1
  4305.  
  4306. Ball.Anchored = true
  4307.  
  4308. Ball.CanCollide = false
  4309.  
  4310. Ball.Locked = true
  4311.  
  4312. Ball.BottomSurface, Ball.TopSurface = "Smooth", "Smooth"
  4313.  
  4314. Ball.Size = Vector3.new(0.5, 0.5, 0.5)
  4315.  
  4316. Ball.CFrame = Torso.CFrame * CFrame.new(0, 1, -3)
  4317.  
  4318. Ball.Parent = Char
  4319.  
  4320.  
  4321.  
  4322. if Targ.Name == "MyPartV" then
  4323.  
  4324. Targ.Name = "MyPartF"
  4325.  
  4326. end
  4327.  
  4328.  
  4329.  
  4330. local LightMod = Instance.new("Model", Char)
  4331.  
  4332.  
  4333.  
  4334. local Mesh = Instance.new("SpecialMesh")
  4335.  
  4336. Mesh.MeshType = "Sphere"
  4337.  
  4338. Mesh.Parent = Ball
  4339.  
  4340.  
  4341.  
  4342. local Size = 1
  4343.  
  4344. local Rise = true
  4345.  
  4346.  
  4347.  
  4348. while Grabbing and BP and Ang and Targ.Parent ~= nil do
  4349.  
  4350. local BPPos = Mouse.Origin.p + Mouse.UnitRay.Direction * DirDot
  4351.  
  4352. Ang.angularvelocity = Vel
  4353.  
  4354. BP.position = BPPos + RPos
  4355.  
  4356. 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)))
  4357.  
  4358. 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)))
  4359.  
  4360. Vlev = (Vlev + 0.05) % tau
  4361.  
  4362.  
  4363.  
  4364. if Hum then
  4365.  
  4366. Hum.Sit = true
  4367.  
  4368. end
  4369.  
  4370.  
  4371.  
  4372. if LA.Parent ~= nil and RA.Parent ~= nil then
  4373.  
  4374. local LPos = (LA.CFrame * CFrame.new(0, -1, 0)).p
  4375.  
  4376. local RPos = (RA.CFrame * CFrame.new(0, -1, 0)).p
  4377.  
  4378. if Rise == true then
  4379.  
  4380. if Size < 0.6 then
  4381.  
  4382. Size = Size + 0.05
  4383.  
  4384. else
  4385.  
  4386. Size = Size + 0.1
  4387.  
  4388. end
  4389.  
  4390. if Size >= 2.2 then
  4391.  
  4392. Rise = false
  4393.  
  4394. end
  4395.  
  4396. else
  4397.  
  4398. if Size > 2.1 then
  4399.  
  4400. Size = Size - 0.05
  4401.  
  4402. else
  4403.  
  4404. Size = Size - 0.1
  4405.  
  4406. end
  4407.  
  4408. if Size <= 0.5 then
  4409.  
  4410. Rise = true
  4411.  
  4412. end
  4413.  
  4414. end
  4415.  
  4416. Ball.Size = Vector3.new(Size, Size, Size)
  4417.  
  4418. Ball.CFrame = CFrame.new(LPos:Lerp(RPos, 0.5), Targ.Position) * CFrame.new(0, 0, -2.2)
  4419.  
  4420. LightNum = LightNum + 1
  4421.  
  4422. makeLightning(LightMod, Ball.Position, Targ.Position, 0.2, 4, 50, 1, LightNum)
  4423.  
  4424. elseif Ball.Parent ~= nil then
  4425.  
  4426. Ball:Destroy()
  4427.  
  4428. end
  4429.  
  4430.  
  4431.  
  4432. if LS and LS.Parent == Torso then
  4433.  
  4434. 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))
  4435.  
  4436. end
  4437.  
  4438. if RS and RS.Parent == Torso then
  4439.  
  4440. 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))
  4441.  
  4442. end
  4443.  
  4444. RunService.Heartbeat:wait()
  4445.  
  4446. end
  4447.  
  4448.  
  4449.  
  4450. coroutine.resume(coroutine.create(function()
  4451.  
  4452. for i = 0.5, 1, 0.1 do
  4453.  
  4454. for i2,v in pairs(LightMod:GetChildren()) do
  4455.  
  4456. --v.Light.Range = 6-(i*5)
  4457.  
  4458. v.Transparency = 1
  4459.  
  4460. end
  4461.  
  4462. wait(1/30)
  4463.  
  4464. end
  4465.  
  4466. LightMod:Destroy()
  4467.  
  4468. end))
  4469.  
  4470.  
  4471.  
  4472. if BP and BP.Parent ~= nil then
  4473.  
  4474. BP:Destroy()
  4475.  
  4476. end
  4477.  
  4478.  
  4479.  
  4480. if Ang and Ang.Parent ~= nil then
  4481.  
  4482. Ang:Destroy()
  4483.  
  4484. end
  4485.  
  4486.  
  4487.  
  4488. pcall(function() Ball:Destroy() end)
  4489.  
  4490. end
  4491.  
  4492. end)
  4493.  
  4494. end))
  4495.  
  4496. end)
  4497.  
  4498. end
  4499.  
  4500.  
  4501.  
  4502. function Add(Obj)
  4503.  
  4504. if Obj:IsA("BasePart") and not Objects[Obj] and not (Obj.Name == "Base" and Obj.ClassName == "Part") then
  4505.  
  4506. Objects[Obj] = Obj:GetMass()
  4507.  
  4508. Obj.Changed:connect(function(P)
  4509.  
  4510. if P:lower() == "size" and Objects[Obj] and Obj.Parent ~= nil then
  4511.  
  4512. Objects[Obj] = Obj:GetMass()
  4513.  
  4514. end
  4515.  
  4516. end)
  4517.  
  4518. end
  4519.  
  4520. end
  4521.  
  4522.  
  4523.  
  4524. function Rem(Obj)
  4525.  
  4526. if Objects[Obj] then
  4527.  
  4528. Objects[Obj] = nil
  4529.  
  4530. end
  4531.  
  4532. end
  4533.  
  4534.  
  4535.  
  4536. function Recursion(Obj)
  4537.  
  4538. ypcall(function()
  4539.  
  4540. Add(Obj)
  4541.  
  4542. if #Obj:GetChildren() > 0 then
  4543.  
  4544. for _,v in pairs(Obj:GetChildren()) do
  4545.  
  4546. Recursion(v)
  4547.  
  4548. end
  4549.  
  4550. end
  4551.  
  4552. end)
  4553.  
  4554. end
  4555.  
  4556.  
  4557.  
  4558. Workspace.DescendantAdded:connect(function(Obj)
  4559.  
  4560. Add(Obj)
  4561.  
  4562. end)
  4563.  
  4564.  
  4565.  
  4566. Workspace.DescendantRemoving:connect(function(Obj)
  4567.  
  4568. Rem(Obj)
  4569.  
  4570. end)
  4571.  
  4572.  
  4573.  
  4574. for _,v in pairs(Workspace:GetChildren()) do
  4575.  
  4576. Recursion(v)
  4577.  
  4578. end
  4579.  
  4580.  
  4581.  
  4582. Start()
  4583.  
  4584.  
  4585.  
  4586. if LP.Name == PlrName then
  4587.  
  4588. LP.CharacterAdded:connect(Start)
  4589.  
  4590. end
  4591.  
  4592. Char.Humanoid.MaxHealth = 50000
  4593.  
  4594. Char.Humanoid.Health = 50000
  4595.  
  4596. --Responsible for regening a player's humanoid's health
  4597.  
  4598.  
  4599.  
  4600. -- declarations
  4601.  
  4602. local Figure = script.Parent
  4603.  
  4604. local Head = Figure:WaitForChild("Head")
  4605.  
  4606. local Humanoid = Figure:WaitForChild("Humanoid")
  4607.  
  4608. local regening = false
  4609.  
  4610.  
  4611.  
  4612. -- regeneration
  4613.  
  4614. function regenHealth()
  4615.  
  4616. if regening then return end
  4617.  
  4618. regening = true
  4619.  
  4620.  
  4621.  
  4622. while Humanoid.Health < Humanoid.MaxHealth do
  4623.  
  4624. local s = wait(0.1)
  4625.  
  4626. local health = Humanoid.Health
  4627.  
  4628. if health > 0 and health < Humanoid.MaxHealth then
  4629.  
  4630. local newHealthDelta = 0.1 * s * Humanoid.MaxHealth
  4631.  
  4632. health = health + newHealthDelta
  4633.  
  4634. Humanoid.Health = math.min(health,Humanoid.MaxHealth)
  4635.  
  4636. end
  4637.  
  4638. end
  4639.  
  4640.  
  4641.  
  4642. if Humanoid.Health > Humanoid.MaxHealth then
  4643.  
  4644. Humanoid.Health = Humanoid.MaxHealth
  4645.  
  4646. end
  4647.  
  4648.  
  4649.  
  4650. regening = false
  4651.  
  4652. end
  4653.  
  4654.  
  4655.  
  4656. Humanoid.HealthChanged:connect(regenHealth)
  4657.  
  4658. Me = game.Players.LocalPlayer
  4659.  
  4660. char = Me.Character
  4661.  
  4662. larm = char["Left Arm"]
  4663.  
  4664. rarm = char["Right Arm"]
  4665.  
  4666. lleg = char["Left Leg"]
  4667.  
  4668. rleg = char["Right Leg"]
  4669.  
  4670. torso = char.Torso
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678. --------------------------
  4679.  
  4680.  
  4681.  
  4682. --[[ High Quality Sound Script
  4683.  
  4684. --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.
  4685.  
  4686. --- full credits to saud20 --Also, edit friendly so you can place this in your script for a weapon song or somethin
  4687.  
  4688. ]]
  4689.  
  4690. Effects = {} --sound effects, for advanced players.
  4691.  
  4692. local Player = game.Players.localPlayer
  4693.  
  4694. local Character = Player.Character
  4695.  
  4696. local Humanoid = Character.Humanoid
  4697.  
  4698. z = Instance.new("Sound", Character)
  4699.  
  4700. z.SoundId = "rbxassetid://152201694"--
  4701.  
  4702. z.Looped = true --False for a one-time song.
  4703.  
  4704. z.Pitch = 1.3
  4705.  
  4706. z.Volume = 1.3
  4707.  
  4708. wait(.1)
  4709.  
  4710. z:Play()
  4711.  
  4712. ------------------------Paste your script here if you want to add a song to your script. VVVVVVV
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement