Advertisement
SlappyDappyCrappy

um?

Oct 29th, 2016
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 87.04 KB | None | 0 0
  1. print("Script has been loaded ;) Have fun b i t c h.")
  2.  
  3. local p = game.Players.LocalPlayer
  4. local char = p.Character
  5. local mouse = p:GetMouse()
  6. local larm = char["Left Arm"]
  7. local rarm = char["Right Arm"]
  8. local lleg = char["Left Leg"]
  9. local rleg = char["Right Leg"]
  10. local hed = char.Head
  11. local torso = char.Torso
  12. local hum = char.Humanoid
  13.  function clerp(c1,c2,al)
  14.     local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  15.     local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  16.     for i,v in pairs(com1) do
  17.         com1[i] = v+(com2[i]-v)*al
  18.     end
  19.     return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  20. end
  21.  
  22. plr = game:service'Players'.LocalPlayer
  23. char = plr.Character
  24. mouse = plr:GetMouse()
  25. humanoid = char:findFirstChild("Humanoid")
  26. torso = char:findFirstChild("Torso")
  27. head = char.Head
  28. ra = char:findFirstChild("Right Arm")
  29. la = char:findFirstChild("Left Arm")
  30. rl = char:findFirstChild("Right Leg")
  31. ll = char:findFirstChild("Left Leg")
  32. rs = torso:findFirstChild("Right Shoulder")
  33. ls = torso:findFirstChild("Left Shoulder")
  34. rh = torso:findFirstChild("Right Hip")
  35. lh = torso:findFirstChild("Left Hip")
  36. neck = torso:findFirstChild("Neck")
  37. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  38. animate = char:findFirstChild("Animate")
  39. if animate then
  40. animate:Destroy()
  41.         pls = game:GetService'Players'
  42.         rs = game:GetService'RunService'
  43.         uinps = game:GetService'UserInputService'
  44.         lp = pls.LocalPlayer
  45.         mouse = lp:GetMouse()
  46.         c = lp.Character
  47.         human = c.Humanoid
  48.         human.MaxHealth = 99999999999999999
  49.         soundVol = 0
  50.         wait()
  51.         human.Health = 99999999999999999
  52.         c.Health:Destroy()
  53. end
  54. rootpart = char:findFirstChild("HumanoidRootPart")
  55. camera = workspace.CurrentCamera
  56.  
  57. pcall(function() char:findFirstChild('charmodel'):Destroy() char:findFirstChild('SurvivorScript').Disabled = true char:findFirstChild('SurvivorScript'):Destroy() char:findFirstChild'FakeHead':Destroy()
  58. plr.PlayerGui:findFirstChild'BaseGui':Destroy() end)
  59.  
  60. script.Name = 'SurvivorScript'
  61.  
  62. charmodel = Instance.new("Model", char)
  63. charmodel.Name = "charmodel"
  64.  
  65. local rm = Instance.new("Motor", torso)
  66. rm.C0 = CFrame.new(1.5, 0.5, 0)
  67. rm.C1 = CFrame.new(0, 0.5, 0)
  68. rm.Part0 = torso
  69. rm.Part1 = ra
  70. rm.Name = "Right Shoulder"
  71.  
  72. local lm = Instance.new("Motor", torso)
  73. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  74. lm.C1 = CFrame.new(0, 0.5, 0)
  75. lm.Part0 = torso
  76. lm.Part1 = la
  77. lm.Name = "Left Shoulder"
  78.  
  79. local rlegm = Instance.new("Motor", torso)
  80. rlegm.C0 = CFrame.new(0.5, -1, 0)
  81. rlegm.C1 = CFrame.new(0, 1, 0)
  82. rlegm.Part0 = torso
  83. rlegm.Part1 = rl
  84. rlegm.Name = "Right Hip"
  85.  
  86. local llegm = Instance.new("Motor", torso)
  87. llegm.C0 = CFrame.new(-0.5, -1, 0)
  88. llegm.C1 = CFrame.new(0, 1, 0)
  89. llegm.Part0 = torso
  90. llegm.Part1 = ll
  91. llegm.Name = "Left Hip"
  92.  
  93. neck.C0 = CFrame.new(0, 1, 0)
  94. neck.C1 = CFrame.new(0, -0.5, 0)
  95.  
  96. rj.C0 = CFrame.new(0, -1.5, 0)
  97. rj.C1 = CFrame.new(0, -1.5, 0)
  98.  
  99. function LoadChatColorModule()
  100.     local COLOR_TABLE, Get, GetId
  101.     COLOR_TABLE = {
  102.         BrickColor.new("Really black"),
  103.         BrickColor.new("Really black"),
  104.         BrickColor.new("Really black"),
  105.         BrickColor.new("Really black"),
  106.         BrickColor.new("Really black"),
  107.         BrickColor.new("Really black"),
  108.         BrickColor.new("Really black"),
  109.         BrickColor.new("Really black")
  110.     }
  111.     function Get(name)
  112.         return COLOR_TABLE[GetId(name) + 1]
  113.     end
  114.     function GetId(name)
  115.         local length = #name
  116.         local modifier = (length % 2 == 0) and 1 or 0
  117.         local value = 0
  118.         for index = 1, length do
  119.             if (length - index + modifier) % 4 < 2 then
  120.                 value = value + string.byte(name, index)
  121.             else
  122.                 value = value - string.byte(name, index)
  123.             end
  124.         end
  125.         return value % 8
  126.     end
  127.     return {
  128.         COLOR_TABLE = COLOR_TABLE,
  129.         Get = Get,
  130.         GetId = GetId
  131.     }
  132. end
  133.  
  134. local ChatColor = LoadChatColorModule()
  135. local PocketColor = BrickColor.new(ChatColor.Get(plr.Name).Name)
  136.  
  137.  
  138.  
  139. rsc0 = rm.C0
  140. lsc0 = lm.C0
  141. neckc0 = neck.C0
  142. rootc0 = rj.C0
  143. llc0 = llegm.C0
  144. rlc0 = rlegm.C0
  145. speed = 0.25
  146. angle = 0
  147. mvmnt = 0
  148. anglespeed = 1
  149. humanoid.WalkSpeed = 8
  150. ctrl = false
  151. stopsprint = false
  152. action = false
  153. sprinting = false
  154. time_sprinted = 0
  155. sound_play_time = 0
  156.  
  157. local debounce = false
  158. local knife = false
  159. local knifeslash = false
  160.  
  161. mouse.KeyDown:connect(function(k)
  162.     repeat wait() until action == false
  163.     if not action then
  164.     if k:byte() == 48 then
  165.         sprinting = true
  166.         humanoid.WalkSpeed = 32
  167.     end
  168.     if k == '2' or k == 'c' then
  169.         if not prone then
  170.             ctrl = not ctrl
  171.             if ctrl then
  172.             humanoid.WalkSpeed = 5
  173.             else
  174.             humanoid.WalkSpeed = 8
  175.             end
  176.         end
  177.     end
  178.     if k == "y" then
  179.         flashlight = not flashlight
  180.         if flashlight then
  181.             do
  182.             knife = false
  183.                 if charmodel:findFirstChild("Knife") then
  184.                 charmodel:findFirstChild("Knife"):Destroy()
  185.             end
  186.                 local part = Instance.new("Part", charmodel)
  187.                 part.CanCollide = false
  188.                 part.FormFactor = 'Custom'
  189.                 part.Name = "Flashlight"
  190.                 part.Size = Vector3.new(.4, .4, 2.1)
  191.                 part:breakJoints()
  192.                 local mesh = Instance.new("SpecialMesh", part)
  193.                 mesh.TextureId = "rbxassetid://129026436"
  194.                 mesh.MeshId = "rbxassetid://87653956"
  195.                 mesh.Scale = Vector3.new(.7, .7, .7)
  196.                 local weld = Instance.new("Weld", part)
  197.                 weld.Part0 = part
  198.                 weld.Part1 = ra
  199.                 weld.C0 = CFrame.Angles(math.rad(70), 0, -math.rad(10))
  200.                 weld.C1 = CFrame.new(-.08, -1.225, .05)
  201.  
  202.  
  203.                 local point = Instance.new("PointLight", part)
  204.                 point.Range = 20
  205.                 local spot = Instance.new("SpotLight", part)
  206.                 spot.Shadows = true
  207.                 spot.Range = 55
  208.                 spot.Angle = 60
  209.                 spot.Brightness = 30
  210.             end
  211.         else
  212.             if charmodel:findFirstChild("Flashlight") then
  213.                 charmodel:findFirstChild("Flashlight"):Destroy()
  214.             end
  215.         end
  216.     end
  217.     if k == "x" then
  218.         ctrl = false
  219.         prone = true
  220.         humanoid.WalkSpeed = 2.5
  221.     end
  222.     if k == "t" then
  223.         knife = not knife
  224.         if knife then
  225.             flashlight = false
  226.             if charmodel:findFirstChild("Flashlight") then
  227.                 charmodel:findFirstChild("Flashlight"):Destroy()
  228.             end
  229.         local part = Instance.new("Part", charmodel)
  230.                 part.CanCollide = false
  231.                 part.FormFactor = 'Custom'
  232.                 part.Name = "Knife"
  233.                 part.Size = Vector3.new(.2, 1.7, .25)
  234.                 part:breakJoints()
  235.                 local weld = Instance.new("Weld", part)
  236.                 weld.Part0 = part
  237.                 weld.Part1 = ra
  238.                 weld.C0 = CFrame.Angles(math.pi/2, 0, -math.rad(10))
  239.                 weld.C1 = CFrame.new(0, -1, -.45)
  240.                 Instance.new("BlockMesh", part).Scale = Vector3.new(.5, 1, .8)
  241.                 local part2 = Instance.new("Part", part)
  242.                 part2.CanCollide = false
  243.                 part2.FormFactor = 'Custom'
  244.                 part2.Name = "Knife"
  245.                 part2.BrickColor = BrickColor.Black()
  246.                 part2.Size = Vector3.new(.3, 1.2, .3)
  247.                 part2:breakJoints()
  248.                 local weld2 = Instance.new("Weld", part2)
  249.                 weld2.Part0 = part2
  250.                 weld2.Part1 = part
  251.                 weld2.C1 = CFrame.new(0, -.45, 0)
  252.                 Instance.new("BlockMesh", part2).Scale = Vector3.new(.5, 1, .8)
  253.         else
  254.             if charmodel:findFirstChild("Knife") then
  255.                 charmodel:findFirstChild("Knife"):Destroy()
  256.             end
  257.         end
  258.     end
  259. end
  260. end)
  261.  
  262. mouse.KeyUp:connect(function(k)
  263.     repeat wait() until action == false
  264.     if not action then
  265.         repeat wait() until action == false
  266.     if k:byte() == 48 then
  267.         sprinting = false
  268.         if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 10 and hitz and time_sprinted >= .8 then
  269.             time_sprinted = 0
  270.         action = 'StopSprinting'
  271.         end
  272.         humanoid.WalkSpeed = 8
  273.         if ctrl then
  274.             humanoid.WalkSpeed = 5
  275.         end
  276.         if prone then
  277.             humanoid.WalkSpeed = 2.55
  278.         end
  279.     end
  280.     if k == 'x' then
  281.         prone = false
  282.         if ctrl then
  283.             humanoid.WalkSpeed = 5
  284.         else
  285.             humanoid.WalkSpeed = 8
  286.         end
  287.     end
  288.     end
  289. end)
  290.  
  291.  
  292. mouse.Button1Down:connect(function()
  293.     if knife == true then
  294.         if debounce then return end
  295.         local slashs = Instance.new("Sound", head)
  296.         slashs.SoundId = "rbxasset://sounds/swordslash.mp3"
  297.         slashs.Volume = 1
  298.         slashs.Pitch = 2
  299.         slashs.Name = 'Slash'
  300.         slashs:play()
  301.         debounce = true
  302.         knifeslash = true
  303.         wait(.35)
  304.         if charmodel:findFirstChild('Knife') then
  305.             local killdeb = false
  306.             charmodel:findFirstChild('Knife').Touched:connect(function(hit)
  307.                 if knifeslash then
  308.                 if killdeb then return end
  309.                     if hit and hit.Parent and hit.Parent:findFirstChild("Humanoid") and hit.Parent.Name ~= char.Name then
  310.                         killdeb = true
  311.                         hit.Parent:findFirstChild("Humanoid"):TakeDamage(math.random(9999999999,9999999999999999))
  312.                         local hitsound = Instance.new("Sound", head)
  313.                         hitsound.SoundId = "rbxasset://sounds/metal.mp3"
  314.                         hitsound.Volume = 1
  315.                         hitsound.Name = 'Hit'
  316.                         hitsound:play()
  317.                         wait(.5)
  318.                         hitsound:Destroy()
  319.                         slashs:Destroy()
  320.                     end
  321.                 end
  322.             end)
  323.         end
  324.         knifeslash = false
  325.         wait(.5)
  326.         debounce = false
  327.     end
  328. end)
  329.  
  330. plr.Chatted:connect(function(msg)
  331.     if msg == "/dance" then
  332.         action = 'Dancing'
  333.     end
  334.     if msg == "/point" then
  335.         action = 'Pointing'
  336.     end
  337.     if msg == "/wave" then
  338.         action = 'Waving'
  339.     end
  340.     if msg == "/cheer" then
  341.         action = 'Cheering'
  342.     end
  343.     if msg == "/squat" then
  344.         action = 'Squatting'
  345.     end
  346.     if msg == "/sit" then
  347.         action = 'Sitting'
  348.     end
  349. end)
  350.  
  351. Controls = game:service'ControllerService':children()[1]
  352.  
  353. local fakehead = head:clone()
  354. fakehead.Parent = char
  355. fakehead.Name = 'FakeHead'
  356. head.Transparency = 1
  357. for i,v in pairs(fakehead:children()) do
  358.     if v:IsA'Sound' or v:IsA'Decal' then
  359.         v:Destroy()
  360.     end
  361. end
  362.  
  363. for i,v in pairs(head:children()) do
  364.     if v:IsA'Sound' then
  365.         v:Destroy()
  366.     end
  367. end
  368.  
  369. waitingloop = false
  370.  
  371. local fakeweld = Instance.new("Weld", fakehead)
  372. fakeweld.Part0 = head
  373. fakeweld.Part1 = fakehead
  374.  
  375. humanoid.Jumping:connect(function()
  376.     if not action or not prone then
  377.         action = 'Jumping'
  378.     end
  379. end)
  380.  
  381. local ScreenGui = Instance.new("ScreenGui", plr.PlayerGui)
  382. ScreenGui.Name = "BaseGui"
  383. local WhatObject = Instance.new("TextLabel", ScreenGui)
  384. WhatObject.Size = UDim2.new(0, 50, 0, 10)
  385. WhatObject.BackgroundColor3 = Color3.new(.25, .25, .25)
  386. WhatObject.BackgroundTransparency = .45
  387. WhatObject.TextColor3 = Color3.new(1,1,1)
  388. WhatObject.TextXAlignment = 'Left'
  389. WhatObject.Visible = false
  390. local WhatObjectI = Instance.new("TextLabel", ScreenGui)
  391. WhatObjectI.Size = UDim2.new(0, 50, 0, 10)
  392. WhatObjectI.BackgroundColor3 = Color3.new(.05, .05, .05)
  393. WhatObjectI.TextColor3 = Color3.new(1,1,1)
  394. WhatObjectI.FontSize = "Size12"
  395. WhatObjectI.TextYAlignment = 'Top'
  396. WhatObjectI.TextXAlignment = 'Left'
  397. WhatObjectI.Visible = false
  398. WhatObjectI.ZIndex = 3
  399.  
  400. local RadioFrame = Instance.new("Frame", ScreenGui)
  401. RadioFrame.Size = UDim2.new(0, 90, 0, 30)
  402. RadioFrame.Position = UDim2.new(0, 0, .4, 0)
  403. RadioFrame.BackgroundColor3 = Color3.new(.25, .25, .25)
  404.  
  405. local InventoryBut = Instance.new("TextButton", ScreenGui)
  406. InventoryBut.Size = UDim2.new(0, 90, 0, 30)
  407. InventoryBut.Text = 'Inventory'
  408. InventoryBut.TextColor3 = Color3.new(1,1,1)
  409. InventoryBut.TextScaled = true
  410. InventoryBut.Position = UDim2.new(.4, 0, 0, 0)
  411. InventoryBut.BackgroundColor3 = Color3.new(.25, .25, .25)
  412.  
  413. local InventoryGui = Instance.new("Frame", ScreenGui)
  414. InventoryGui.Size = UDim2.new(.6, 0, .6, 0)
  415. InventoryGui.BackgroundColor3 = Color3.new(.25, .25, .25)
  416. InventoryGui.Position = UDim2.new(.2, 0, -1, 0)
  417.  
  418. InventoryBut.TouchTap:connect(function()
  419.     InvVisible = not InvVisible
  420.     if InvVisible then
  421.         InventoryGui:TweenPosition(UDim2.new(.2, 0, .2, 0), "Out", "Quad", .35, true)
  422.     elseif not InvVisible then
  423.         InventoryGui:TweenPosition(UDim2.new(.2, 0, -1, 0), "Out", "Quad", .35, true)
  424.     end
  425. end)
  426. InventoryBut.MouseButton1Down:connect(function()
  427.     InvVisible = not InvVisible
  428.     if InvVisible then
  429.         InventoryGui:TweenPosition(UDim2.new(.2, 0, .2, 0), "Out", "Quad", .35, true)
  430.     elseif not InvVisible then
  431.         InventoryGui:TweenPosition(UDim2.new(.2, 0, -1, 0), "Out", "Quad", .35, true)
  432.     end
  433. end)
  434.  
  435. Buildings = {}
  436.  
  437. local WoodenFence = Instance.new("Part")
  438. WoodenFence.Size = Vector3.new(10, 5, 1)
  439. WoodenFence.Anchored = true
  440. WoodenFence.Material = 'Wood'
  441. WoodenFence.BrickColor = BrickColor.new'Really red'
  442. table.insert(Buildings, {WoodenFence = 'Wooden Fence'})
  443.  
  444. for y = 1, 4 do
  445.     for x = 1, 4 do
  446.     local slot = Instance.new("ImageLabel", InventoryGui)
  447.     slot.Name = "Slot"..tostring(#InventoryGui:children())
  448.     slot.Size = UDim2.new(.155, 0, .2, 0)
  449.     slot.ZIndex = 2
  450.     slot.Position = UDim2.new(.2+((x-1)/4)*.8, 0, .025+(y-1)/4, 0)
  451.     slot.BackgroundColor3 = Color3.new(.35, .35, .35)
  452.     local stack = Instance.new("TextLabel", slot)
  453.     stack.Size = UDim2.new(0, 0, 0, 25)
  454.     stack.Position = UDim2.new(.95, 0, 1, -25)
  455.     stack.TextXAlignment = 'Right'
  456.     stack.FontSize = "Size12"
  457.     stack.ZIndex = 3
  458.     stack.TextColor3 = Color3.new(1,1,1)
  459.     stack.BackgroundTransparency = 1
  460.     stack.TextStrokeTransparency = .5
  461.     stack.Visible = false
  462.     stack.TextScaled = true
  463.     Instance.new("StringValue", slot).Name = 'ItemName'
  464.     Instance.new("StringValue", slot).Name = 'Description'
  465.     Instance.new("NumberValue", slot).Name = 'Stack'
  466.     Instance.new("BoolValue", slot).Name = 'Functionable'
  467.     Instance.new("StringValue", slot.Functionable).Name = 'Function'
  468.     slot.Functionable.Value = false
  469.         slot.Functionable.Changed:connect(function()
  470.                 if slot.Functionable.Function.Value == 'Place' then
  471.                     slot.MouseButton1Down:connect(function()
  472.                         InvVisible = false
  473.                         InventoryGui:TweenPosition(UDim2.new(.2, 0, -1, 0), "Out", "Quad", .35, true)
  474.                         local PlaceObject
  475.                         for i,v in pairs(Buildings) do
  476.                             if v.Name == slot.Name.Value then
  477.                                 PlaceObject = v:clone()
  478.                                 PlabeObject.Parent = workspace
  479.                             end
  480.                         end
  481.                         local Placed = false
  482.                         mouse.KeyDown:connect(function(k)
  483.                             if Placed then return end
  484.                             if k == "r" then
  485.                                 if PlaceObject:IsA'Model' then
  486.                                     PlabeObject.Dragger:AxisRotate()
  487.                                 end
  488.                                 if PlaceObject:IsA'Part' then
  489.                                     PlaceObject.Rotation = Vector3.new(PlabeObject.Rotation.X, PlabeObject.Rotation.Y+90, PlabeObject.Rotation.Z)
  490.                                 end
  491.                             end
  492.                         end)
  493.                         mouse.Move:connect(function()
  494.                             if Placed then return end
  495.                             PlaceObject:TranslateBy(Vector3.new(mouse.Hit.x, mouse.Hit.y, mouse.Hit.z))
  496.                         end)
  497.                         mouse.Button1Down:connect(function()
  498.                             Placed = true
  499.                         end)
  500.                     end)
  501.                 end
  502.         end)
  503.         slot.Stack.Changed:connect(function()
  504.             if slot.Stack.Value == '0' then
  505.                 stack.Visible = false
  506.             else
  507.                 stack.Visible = true
  508.                 stack.Text = slot.Stack.Value
  509.                 stack.Size = UDim2.new(0, -stack.TextBounds.x, 0, 25)
  510.             end
  511.         end)
  512.         slot.MouseEnter:connect(function()
  513.             if slot.Description.Value ~= '' then
  514.                     WhatObjectI.Parent = slot
  515.                     WhatObjectI.Position = UDim2.new(0, 0, 1, 0)
  516.                     WhatObjectI.Text = slot.Description.Value
  517.                     wait(0)
  518.                     WhatObjectI.Size = UDim2.new(0, WhatObjectI.TextBounds.x, 0, WhatObjectI.TextBounds.Y)
  519.                     WhatObjectI.Visible = true
  520.             end
  521.         end)
  522.         slot.MouseLeave:connect(function()
  523.             WhatObjectI.Visible = false
  524.         end)
  525.     end
  526. end
  527.  
  528. InventoryGui.Slot1.Image = "rbxassetid://154927249"
  529. InventoryGui.Slot1.Description.Value = [[A regular flashlight,
  530. Equip with F.]]
  531.  
  532. InventoryGui.Slot2.Image = "rbxassetid://154931868"
  533. InventoryGui.Slot2.Description.Value = [[It's a survival knife,
  534. slaughter or gather materials!
  535. Equip with K.]]
  536.  
  537. InventoryGui.Slot3.Description.Value = [[It's wood,
  538. You can build or use it as material.]]
  539. InventoryGui.Slot3.Stack.Value = 10
  540. InventoryGui.Slot3.Image = "rbxassetid://154979500"
  541.  
  542. InventoryGui.Slot4.ItemName.Value = "Wooden Fence"
  543. InventoryGui.Slot4.Description.Value = [[Defending building.]]
  544. InventoryGui.Slot4.Stack.Value = 1
  545. InventoryGui.Slot4.Functionable.Function.Value = 'Place'
  546.  
  547. radiosound = Instance.new("Sound", head)
  548. radiosound.Volume = 1
  549. radiosound.Name = 'IMPOSSIBRU'
  550.  
  551. Music = {
  552.     ['1'] = function(plr)
  553.     game:service'ContentProvider':Preload("rbxassetid://335958739")
  554.     radiosound.SoundId = "rbxassetid://335958739"
  555.     radiosound.Pitch = 1
  556.     end;
  557.     ['2'] = function(plr)
  558.     game:service'ContentProvider':Preload("rbxassetid://399570826")
  559.     radiosound.SoundId = "rbxassetid://399570826"
  560.     end;
  561.     ['3'] = function(plr)
  562.     game:service'ContentProvider':Preload("rbxassetid://187324310")
  563.     radiosound.SoundId = "rbxassetid://187324310"
  564.     end;
  565.     ['4'] = function(plr)
  566.     game:service'ContentProvider':Preload("rbxassetid://164834038")
  567.     radiosound.SoundId = "rbxassetid://164834038"
  568.     end;
  569.     ['5'] = function(plr)
  570.     game:service'ContentProvider':Preload("rbxassetid://384949210")
  571.     radiosound.SoundId = "rbxassetid://384949210"
  572.     end;
  573.     ['6'] = function(plr)
  574.     game:service'ContentProvider':Preload("rbxassetid://366789853")
  575.     radiosound.SoundId = "rbxassetid://366789853"
  576.     end;
  577.     ['7'] = function(plr)
  578.     game:service'ContentProvider':Preload("rbxassetid://338512454")
  579.     radiosound.SoundId = "rbxassetid://338512454"
  580.     end;
  581.     ['8'] = function(plr)
  582.     game:service'ContentProvider':Preload("rbxassetid://344965733")
  583.     radiosound.SoundId = "rbxassetid://344965733"
  584.     end;
  585.     ['9'] = function(plr)
  586.     game:service'ContentProvider':Preload("rbxassetid://182621515")
  587.     radiosound.SoundId = "rbxassetid://182621515"
  588.     end;
  589.     ['10'] = function(plr)
  590.     game:service'ContentProvider':Preload("rbxassetid://186747165")
  591.     radiosound.SoundId = "rbxassetid://186747165"
  592.     radiosound.Pitch = 1
  593.     end;
  594.     ['11'] = function(plr)
  595.     game:service'ContentProvider':Preload("rbxassetid://171217870")
  596.     radiosound.SoundId = "rbxassetid://171217870"
  597.     radiosound.Pitch = 1
  598.     end;
  599.     ['12'] = function(plr)
  600.     game:service'ContentProvider':Preload("rbxassetid://163722380")
  601.     radiosound.SoundId = "rbxassetid://163722380"
  602.     end;
  603.     ['13'] = function(plr)
  604.     game:service'ContentProvider':Preload("rbxassetid://338228788")
  605.     radiosound.SoundId = "rbxassetid://338228788"
  606.     end;
  607.     ['14'] = function(plr)
  608.     game:service'ContentProvider':Preload("rbxassetid://156105878")
  609.     radiosound.SoundId = "rbxassetid://156105878"
  610.     end;
  611.     ['15'] = function(plr)
  612.     game:service'ContentProvider':Preload("rbxassetid://322616696")
  613.     radiosound.SoundId = "rbxassetid://322616696"
  614.     end;
  615.     ['16'] = function(plr)
  616.     game:service'ContentProvider':Preload("rbxassetid://272467655")
  617.     radiosound.SoundId = "rbxassetid://272467655"
  618.     end;
  619.     ['17'] = function(plr)
  620.     game:service'ContentProvider':Preload("rbxassetid://197769965")
  621.     radiosound.SoundId = "rbxassetid://197769965"
  622.     end;
  623.     ['18'] = function(plr)
  624.     game:service'ContentProvider':Preload("rbxassetid://257768376")
  625.     radiosound.SoundId = "rbxassetid://257768376"
  626.     end;
  627.     ['19'] = function(plr)
  628.     game:service'ContentProvider':Preload("rbxassetid://142300879")
  629.     radiosound.SoundId = "rbxassetid://142300879"
  630.     end;
  631.     ['20'] = function(plr)
  632.     game:service'ContentProvider':Preload("rbxassetid://300143023")
  633.     radiosound.SoundId = "rbxassetid://300143023"
  634.     end;
  635.     ['21'] = function(plr)
  636.     game:service'ContentProvider':Preload("rbxassetid://174212113")
  637.     radiosound.SoundId = "rbxassetid://174212113"
  638.     end;
  639.     ['22'] = function(plr)
  640.     game:service'ContentProvider':Preload("rbxassetid://185320433")
  641.     radiosound.SoundId = "rbxassetid://185320433"
  642.     end;
  643.     ['23'] = function(plr)
  644.     game:service'ContentProvider':Preload("rbxassetid://218299512")
  645.     radiosound.SoundId = "rbxassetid://218299512"
  646.     end;
  647.     ['24'] = function(plr)
  648.     game:service'ContentProvider':Preload("rbxassetid://280971159")
  649.     radiosound.SoundId = "rbxassetid://280971159"
  650.     end;
  651.     ['25'] = function(plr)
  652.     game:service'ContentProvider':Preload("rbxassetid://263504315")
  653.     radiosound.SoundId = "rbxassetid://263504315"
  654.     end;
  655.     ['26'] = function(plr)
  656.     game:service'ContentProvider':Preload("rbxassetid://198249011")
  657.     radiosound.SoundId = "rbxassetid://198249011"
  658.     end;
  659.     ['27'] = function(plr)
  660.     game:service'ContentProvider':Preload("rbxassetid://239902092")
  661.     radiosound.SoundId = "rbxassetid://239902092"
  662.     end;
  663.     ['28'] = function(plr)
  664.     game:service'ContentProvider':Preload("rbxassetid://241148012")
  665.     radiosound.SoundId = "rbxassetid://241148012"
  666.     end;
  667.     ['29'] = function(plr)
  668.     game:service'ContentProvider':Preload("rbxassetid://158353213")
  669.     radiosound.SoundId = "rbxassetid://158353213"
  670.     end;
  671.     ['30'] = function(plr)
  672.     game:service'ContentProvider':Preload("rbxassetid://201129564")
  673.     radiosound.SoundId = "rbxassetid://201129564"
  674.     end;
  675.     ['31'] = function(plr)
  676.     game:service'ContentProvider':Preload("rbxassetid://181663037")
  677.     radiosound.SoundId = "rbxassetid://181663037"
  678.     radiosound.Pitch = 1
  679.     end;
  680.     ['32'] = function(plr)
  681.     game:service'ContentProvider':Preload("rbxassetid://150488830")
  682.     radiosound.SoundId = "rbxassetid://150488830"
  683.     radiosound.Pitch = 1
  684.     end;
  685.     ['33'] = function(plr)
  686.     game:service'ContentProvider':Preload("rbxassetid://165295816")
  687.     radiosound.SoundId = "rbxassetid://165295816"
  688.     end;
  689.     ['34'] = function(plr)
  690.     game:service'ContentProvider':Preload("rbxassetid://143003257")
  691.     radiosound.SoundId = "rbxassetid://143003257"
  692.     end;
  693.     ['35'] = function(plr)
  694.     game:service'ContentProvider':Preload("rbxassetid://237265076")
  695.     radiosound.SoundId = "rbxassetid://237265076"
  696.     end;
  697.     ['36'] = function(plr)
  698.     game:service'ContentProvider':Preload("rbxassetid://146626271")
  699.     radiosound.SoundId = "rbxassetid://146626271"
  700.     end;
  701. }
  702.  
  703. local HowMuchMusic = 0
  704. for _,_ in pairs(Music) do
  705.     HowMuchMusic = HowMuchMusic + 1
  706. end
  707. RadioEnabled = false
  708. local song
  709. local current = 1
  710. local CurrentNumber = Instance.new("TextLabel", RadioFrame)
  711. CurrentNumber.Size = UDim2.new(0, 60, 0, 15)
  712. CurrentNumber.Position = UDim2.new(0, 0, 0, -15)
  713. CurrentNumber.TextColor3 = Color3.new(1,1,1)
  714. CurrentNumber.BackgroundTransparency = 1
  715. CurrentNumber.Text = tostring(current).."/"..HowMuchMusic
  716. CurrentNumber.TextScaled = true
  717. local OnOff = Instance.new("TextButton", RadioFrame)
  718. OnOff.Size = UDim2.new(0, 60, 0, 28)
  719. OnOff.Position = UDim2.new(0, 1, 0, 1)
  720. OnOff.TextColor3 = Color3.new(1,1,1)
  721. OnOff.BackgroundColor3 = Color3.new(.6, 0, 0)
  722. OnOff.Text = 'OFF'
  723. OnOff.TextScaled = true
  724.  
  725. function nextSong(current2)
  726.     local CurrentSong = current2
  727.     coroutine.wrap(function()
  728.         for i = 1, 121 do
  729.             if RadioEnabled and CurrentSong == current2 then
  730.                 wait(1)
  731.             else return end
  732.         end
  733.         if RadioEnabled and CurrentSong == current then
  734.             radiosound:stop()
  735.             current = current + 1
  736.             if current > HowMuchMusic then
  737.                 current = 1
  738.             end
  739.             for index,func in pairs(Music) do
  740.                 if index == tostring(current) then
  741.                     func(plr)
  742.                 end
  743.             end
  744.         CurrentNumber.Text = tostring(current).."/"..HowMuchMusic
  745.         radiosound:play()
  746.         nextSong(current)
  747.         end
  748.     end)()
  749. end
  750.  
  751. OnOff.MouseButton1Down:connect(function()
  752.     RadioEnabled = not RadioEnabled
  753.     if RadioEnabled then
  754.         OnOff.BackgroundColor3 = Color3.new(0, .6, 0)
  755.         OnOff.Text = 'ON'
  756.         song = Music[tostring(current)]
  757.         for index,func in pairs(Music) do
  758.             if index == tostring(current) then
  759.             func(plr)
  760.             end
  761.         end
  762.         radiosound:play()
  763.         nextSong(current)
  764.     elseif not RadioEnabled then
  765.         OnOff.BackgroundColor3 = Color3.new(.6, 0, 0)
  766.         OnOff.Text = 'OFF'
  767.         radiosound:pause()
  768.     end
  769. end)
  770.  
  771. OnOff.TouchTap:connect(function()
  772.     RadioEnabled = not RadioEnabled
  773.     if RadioEnabled then
  774.         OnOff.BackgroundColor3 = Color3.new(0, .6, 0)
  775.         OnOff.Text = 'ON'
  776.         song = Music[tostring(current)]
  777.         for index,func in pairs(Music) do
  778.             if index == tostring(current) then
  779.             func(plr)
  780.             end
  781.         end
  782.         radiosound:play()
  783.         CurrentNumber.Text = tostring(current).."/"..HowMuchMusic
  784.         radiosound:play()
  785.         nextSong(current)
  786.     elseif not RadioEnabled then
  787.         OnOff.BackgroundColor3 = Color3.new(.6, 0, 0)
  788.         OnOff.Text = 'OFF'
  789.         radiosound:pause()
  790.     end
  791. end)
  792.  
  793. local Next = Instance.new("TextButton", RadioFrame)
  794. Next.Size = UDim2.new(0, 28, 0, 28)
  795. Next.Position = UDim2.new(0, 61, 0, 1)
  796. Next.TextColor3 = Color3.new(1,1,1)
  797. Next.BackgroundTransparency = 1
  798. Next.Text = '>'
  799.  
  800. Next.MouseButton1Down:connect(function()
  801. radiosound:stop()
  802. radiosound:stop()
  803. current = current + 1
  804. if current > HowMuchMusic then
  805.     current = 1
  806. end
  807. CurrentNumber.Text = tostring(current).."/"..HowMuchMusic
  808. song = Music[tostring(current)]
  809. for index,func in pairs(Music) do
  810.     if index == tostring(current) then
  811.         func(plr)
  812.     end
  813. end
  814. if RadioEnabled then
  815.     radiosound:play()
  816. end
  817. end)
  818.  
  819. humanoid.Changed:connect(function(changed)
  820.     --[[if ctrl and changed == 'Jump' then
  821.         humanoid.Jump = false
  822.         action = 'Rolling'
  823.     end--]]
  824.     if action ~= false or prone then
  825.         humanoid.Jump = false
  826.     end
  827. end)
  828.  
  829. humanoid.Climbing:connect(function(speed)
  830.     if speed > 4 then
  831.         action = 'Climbing'
  832.         humanoid.WalkSpeed = 8
  833.     else
  834.         action = false
  835.         if ctrl then
  836.             humanoid.WalkSpeed = 5
  837.         elseif prone then
  838.             humanoid.WalkSpeed = 2.5
  839.         end
  840.     end
  841. end)
  842.  
  843. mouse.Move:connect(function()
  844.     if (mouse.Target ~= nil and mouse.Target:IsA('Part') and mouse.Target.Parent and mouse.Target.Parent:IsA('Model') and mouse.Target.Parent:findFirstChild'Humanoid') or (mouse.Target ~= nil and mouse.Target:IsA('Part') and mouse.Target.Parent and mouse.Target.Parent:IsA'Hat' and mouse.Target.Parent.Parent and mouse.Target.Parent.Parent:findFirstChild'Humanoid') then
  845.         local target = mouse.Target
  846.         WhatObject.Visible = true
  847.         if target.Parent:IsA'Model' then
  848.         WhatObject.Text = target.Parent.Name
  849.         elseif target.Parent:IsA'Hat' then
  850.             WhatObject.Text = target.Parent.Parent.Name
  851.         end
  852.         WhatObject.Size = UDim2.new(0, WhatObject.TextBounds.x, 0, 10)
  853.         WhatObject.Position = UDim2.new(0, mouse.X + 10, 0, mouse.Y - 15)
  854.     else
  855.         WhatObject.Visible = false
  856.     end
  857. end)
  858.  
  859. wait()
  860.  
  861. local sound = Instance.new("Sound", head)
  862. sound.Volume = .65
  863. game:service'RunService'.Stepped:connect(function()
  864.     if prone or ctrl then
  865.      rootpart.CanCollide = false
  866.     end
  867. end)
  868.  
  869. idling = 0
  870. dancingtime = 0
  871.  
  872. game:service'RunService'.RenderStepped:connect(function()
  873.     if charmodel.Parent ~= char then charmodel.Parent = char end
  874.     if fakehead.Parent ~= char then fakehead.Parent = char end
  875.     if not loopedaction then
  876.         local rscf = rsc0
  877.         local lscf = lsc0
  878.         local rlcf = rlc0
  879.         local llcf = llc0
  880.         local rjcf = rootc0
  881.         local ncf = neckc0
  882.         local rayz = Ray.new(rootpart.Position, Vector3.new(0, -4.1, 0))
  883.         local hitz, enz = workspace:findPartOnRay(rayz, char)
  884.         angle = (angle % 100) + anglespeed/10
  885.         mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  886.         for i,object in pairs(char:children()) do
  887.             if object:IsA("Tool") then
  888.                 if not wldunknown then
  889.                 wldunknown = Instance.new("Weld", rarm)
  890.                 wldunknown.Name = "RightGrip"
  891.                 wldunknown.Part0 = rarm
  892.                 if object:findFirstChild("Handle") then
  893.                 wldunknown.Part1 = object:findFirstChild("Handle")
  894.                 end
  895.                 end
  896.                 tool = true
  897.             elseif not object:IsA("Tool") then
  898.                 if tool then
  899.                     pcall(function()
  900.                         wldunknown:Destroy()
  901.                         wldunknown:Destroy()
  902.                     end)
  903.                 end
  904.                 tool = false
  905.             end
  906.         end
  907.         if action ~= false then
  908.             idling = 0
  909.             if action == 'StopSprinting' then
  910.                 Controls.Parent = nil
  911.                 speed = 0.15
  912.                 local bodyvelocity = Instance.new("BodyVelocity", rootpart)
  913.                 bodyvelocity.maxForce = Vector3.new(1/0,0,1/0)
  914.                 bodyvelocity.velocity = rootpart.CFrame.lookVector * 16
  915.                 ncf = neckc0 * CFrame.Angles(math.rad(-12), -math.rad(15), 0)
  916.                 rscf = rsc0 * CFrame.Angles(math.rad(-21), 0, math.rad(4.5))
  917.                 lscf = lsc0 * CFrame.Angles(math.rad(-23.5), 0, -math.rad(3.5))
  918.                 rjcf = rootc0 * CFrame.new(0, -.35, 0) * CFrame.Angles(math.rad(15), math.rad(25), 0)
  919.                 llcf = llc0 * CFrame.new(0, .15, -.25) * CFrame.Angles(-math.rad(30), 0, -math.rad(5.5))
  920.                 rlcf = rlcf * CFrame.new(0, .05, -.15) * CFrame.Angles(math.rad(20), 0, math.rad(2))
  921.                 loopedaction = true
  922.                 for i = 0, 25 do
  923.                     bodyvelocity.velocity = rootpart.CFrame.lookVector * (16 - i/1.5)
  924.                     rm.C0 = clerp(rm.C0,rscf,speed)
  925.                     lm.C0 = clerp(lm.C0,lscf,speed)
  926.                     rj.C0 = clerp(rj.C0,rjcf,speed)
  927.                     rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  928.                     llegm.C0 = clerp(llegm.C0,llcf,speed)
  929.                     neck.C0 = clerp(neck.C0,ncf,speed)
  930.                     wait()
  931.                 end
  932.                 bodyvelocity:Destroy()
  933.                 loopedaction = false
  934.                 stopsprint = false
  935.                 action = false
  936.                 Controls.Parent = game:service'ControllerService'
  937.                 humanoid.WalkSpeed = 8
  938.                 if ctrl then
  939.                     humanoid.WalkSpeed = 5
  940.                 elseif prone then
  941.                     humanoid.WalkSpeed = 2.5
  942.                 end
  943.             end
  944.             if action == "Climbing" then
  945.                 anglespeed = 2
  946.                 speed = 0.1
  947.                 ncf = neckc0 * CFrame.Angles(math.pi/3, 0, 0)
  948.                 rjcf = rootc0
  949.                 rscf = rsc0 * CFrame.new(0, -0.2 + -mvmnt*0.2, 0.45) * CFrame.Angles(math.pi/1.5, 0, -math.abs(mvmnt)*0.025)
  950.                 lscf = lsc0 * CFrame.new(0, -0.2 + mvmnt*0.2, 0.45) * CFrame.Angles(math.pi/1.5, 0, math.abs(mvmnt)*0.025)
  951.                 rlcf = rlc0 * CFrame.new(0, 0.3 + mvmnt*0.2, 0) * CFrame.Angles(math.pi/14, 0, 0)
  952.                 llcf = llc0 * CFrame.new(0, 0.3 + -mvmnt*0.2, 0) * CFrame.Angles(math.pi/14, 0, 0)
  953.             end
  954.             if action == 'Jumping' then
  955.                 if not prone or ctrl then
  956.                 loopedaction = true
  957.                 ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  958.                 rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  959.                 rscf = rsc0 * CFrame.Angles(-math.pi/16, -math.sin(angle)*0.08, 0)
  960.                 lscf = lsc0 * CFrame.Angles(-math.pi/17, math.sin(angle)*0.08, 0)
  961.                 rlcf = rlc0 * CFrame.new(0, .45, -.45) * CFrame.Angles(-math.pi/16+-math.sin(angle)*0.125, -math.sin(angle)*0.08, math.rad(2.5))
  962.                 llcf = llc0 * CFrame.Angles(-math.pi/17+-math.sin(angle)*0.125, math.sin(angle)*0.08, -math.rad(2.5))
  963.                 for i = 0, 12 do
  964.                     rm.C0 = clerp(rm.C0,rscf,speed)
  965.                     lm.C0 = clerp(lm.C0,lscf,speed)
  966.                     rj.C0 = clerp(rj.C0,rjcf,speed)
  967.                     rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  968.                     llegm.C0 = clerp(llegm.C0,llcf,speed)
  969.                     neck.C0 = clerp(neck.C0,ncf,speed)
  970.                     wait()
  971.                 end
  972.                 end
  973.                 loopedaction = false
  974.                 action = false
  975.             end
  976.             if action == 'Pointing' then
  977.                 if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  978.                 anglespeed = .5
  979.                 speed = 0.25
  980.                 ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.007, 0, 0)
  981.                 rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.0015, 0, 0)
  982.                 rscf = rsc0 * CFrame.Angles(math.pi/2, -math.sin(angle)*0.008, 0)
  983.                 lscf = lsc0 * CFrame.Angles(0, math.sin(angle)*0.008, 0)
  984.                 rlcf = rlc0 * CFrame.Angles(-math.sin(angle)*0.0015, -math.sin(angle)*0.008, math.rad(2.5))
  985.                 llcf = llc0 * CFrame.Angles(-math.sin(angle)*0.0015, math.sin(angle)*0.008, -math.rad(2.5))
  986.                 else
  987.                 action = false
  988.                 end
  989.             end
  990.             if action == 'Waving' then
  991.                 if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  992.                 anglespeed = .5
  993.                 speed = 0.25
  994.                 ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.007, 0, 0)
  995.                 rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.0025, 0, 0)
  996.                 rscf = rsc0 * CFrame.Angles(0, -math.sin(angle)*0.008, math.pi/1.4+math.sin(angle)*.5)
  997.                 lscf = lsc0 * CFrame.Angles(0, math.sin(angle)*0.008, 0)
  998.                 rlcf = rlc0 * CFrame.Angles(-math.sin(angle)*0.0025, -math.sin(angle)*0.008, math.rad(2.5))
  999.                 llcf = llc0 * CFrame.Angles(-math.sin(angle)*0.0025, math.sin(angle)*0.008, -math.rad(2.5))
  1000.                 else
  1001.                 action = false
  1002.                 end
  1003.             end
  1004.             if action == 'Cheering' then
  1005.                 if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  1006.                 anglespeed = 2
  1007.                 speed = 0.25
  1008.                 ncf = neckc0 * CFrame.Angles(math.pi/24.85, 0, 0)
  1009.                 rjcf = rootc0 * CFrame.new(0, math.abs(math.sin(angle)), 0)
  1010.                 rscf = rsc0 * CFrame.Angles(math.pi-math.abs(math.sin(angle))*.25, 0, math.rad(2))
  1011.                 lscf = lsc0 * CFrame.Angles(math.pi-math.abs(math.sin(angle))*.25, 0, -math.rad(2))
  1012.                 rlcf = rlc0 * CFrame.Angles(0, 0, math.rad(5))
  1013.                 llcf = llc0 * CFrame.Angles(0, 0, -math.rad(5))
  1014.                 else
  1015.                 action = false
  1016.                 end
  1017.             end
  1018.             if action == 'Rolling' then
  1019.                 loopedaction = true
  1020.                 anglespeed = 2
  1021.                 speed = 0.6
  1022.                 Controls.Parent = nil
  1023.                 local bodyvelocity = Instance.new("BodyVelocity", rootpart)
  1024.                 bodyvelocity.maxForce = Vector3.new(1/0,1/0,1/0)
  1025.                 bodyvelocity.velocity = rootpart.CFrame.lookVector * 10
  1026.                 rj.C1 = CFrame.new()
  1027.                 for roll = 0, 360, 2 do
  1028.                         ncf = neckc0 * CFrame.Angles(-math.pi/1.85, 0, 0)
  1029.                         rjcf = CFrame.new() * CFrame.new(0, -1, 0) * CFrame.Angles(-math.rad(roll), 0, 0)
  1030.                         rscf = rsc0 * CFrame.Angles(math.pi/2.5, 0, -math.rad(30))
  1031.                         lscf = lsc0 * CFrame.Angles(math.pi/2.5, 0, math.rad(30))
  1032.                         rlcf = rlc0 * CFrame.new(0, .6, -.75) * CFrame.Angles(-math.pi/2.5, 0, 0)
  1033.                         llcf = llc0 * CFrame.new(0, .6, -.75) * CFrame.Angles(-math.pi/2.5, 0, 0)
  1034.                         rm.C0 = clerp(rm.C0,rscf,speed)
  1035.                         lm.C0 = clerp(lm.C0,lscf,speed)
  1036.                         rj.C0 = clerp(rj.C0,rjcf,speed)
  1037.                         neck.C0 = clerp(neck.C0,ncf,speed)
  1038.                         rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  1039.                         llegm.C0 = clerp(llegm.C0,llcf,speed)
  1040.                         wait()
  1041.                 end
  1042.                 rj.C0 = CFrame.new(0, -1.5, 0)
  1043.                 rj.C1 = CFrame.new(0, -1.5, 0)
  1044.                 bodyvelocity:Destroy()
  1045.                 action = false
  1046.                 Controls.Parent = game:service'ControllerService'
  1047.                 loopedaction = false
  1048.             end
  1049.             if action == 'Dancing' then
  1050.                 if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  1051.                 dancingtime = dancingtime + 1/60
  1052.                 anglespeed = 1
  1053.                 speed = 0.25
  1054.                 if dancingtime <= 12 then
  1055.                 ncf = neckc0 * CFrame.Angles(math.pi/24.85, 0, 0)
  1056.                 rjcf = rootc0 * CFrame.new(0, 0.75 + -math.abs(math.sin(angle)), 0) * CFrame.Angles(0, 0, math.sin(angle)*.1)
  1057.                 rscf = rsc0 * CFrame.Angles(math.pi-math.abs(math.sin(angle))*.5, 0, math.rad(2))
  1058.                 lscf = lsc0 * CFrame.Angles(math.pi-math.abs(math.sin(angle))*.5, 0, -math.rad(2))
  1059.                 rlcf = rlc0 * CFrame.Angles(math.sin(angle)*.25, 0, math.rad(5))
  1060.                 llcf = llc0 * CFrame.Angles(-math.sin(angle)*.25, 0, -math.rad(5))
  1061.                 elseif dancingtime <= 22 then
  1062.                 ncf = neckc0 * CFrame.Angles(math.pi/24.85, 0, 0)
  1063.                 rjcf = rootc0 * CFrame.new(0, math.abs(math.cos(angle)*.05), 0) * CFrame.Angles(0, math.sin(angle)*.035, math.sin(angle)*.015)
  1064.                 rscf = rsc0 * CFrame.Angles(math.pi/2-math.abs(math.sin(angle))*.5, 0, math.rad(2))
  1065.                 lscf = lsc0 * CFrame.Angles(math.pi/2-math.abs(math.sin(angle))*.5, 0, -math.rad(2))
  1066.                 rlcf = rlc0 * CFrame.Angles(math.sin(angle)*.05, 0, math.rad(5))
  1067.                 llcf = llc0 * CFrame.Angles(-math.sin(angle)*.05, 0, -math.rad(5))
  1068.                 elseif dancingtime >= 22 then
  1069.                     dancingtime = 0
  1070.                 end
  1071.                 else
  1072.                 action = false
  1073.                 end
  1074.             end
  1075.             if action == 'Squatting' then
  1076.                 if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  1077.                 anglespeed = 0.15
  1078.                 speed = 0.25
  1079.                 ncf = neckc0 * CFrame.Angles(math.pi/12-math.sin(angle)*0.005,0,0)
  1080.                 rscf = rsc0 * CFrame.new(-.35, 0, -.35+math.sin(angle)*0.005) * CFrame.Angles(math.pi/2.2+math.sin(-angle)*.005, 0, -math.pi/4.5)
  1081.                 lscf = lsc0 * CFrame.new(.35, 0, -.35+math.sin(angle)*0.005) * CFrame.Angles(math.pi/2.2+math.sin(angle)*.005, 0, math.pi/4.5)
  1082.                 rjcf = rootc0 * CFrame.new(0, -.9, .55) * CFrame.Angles(-math.pi/12+math.sin(angle)*0.005, 0, 0)
  1083.                 llcf = llc0 * CFrame.new(0, .95, -.55) * CFrame.Angles(math.pi/12, 0, -math.rad(2))
  1084.                 rlcf = rlcf * CFrame.new(0, .95, -.55) * CFrame.Angles(math.pi/14, 0, math.rad(2))
  1085.                 else
  1086.                 action = false
  1087.                 end
  1088.             end
  1089.             if action == 'Sitting' then
  1090.                 if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  1091.                 anglespeed = 0.15
  1092.                 speed = 0.15
  1093.                 ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.005,0,0)
  1094.                 rscf = rsc0 * CFrame.Angles(-math.pi/16, 0, math.pi/24)
  1095.                 lscf = lsc0 * CFrame.Angles(-math.pi/16, 0, -math.pi/24)
  1096.                 rjcf = rootc0 * CFrame.new(0, -1.9, 0) * CFrame.Angles(math.pi/16+math.sin(angle)*0.005, 0, 0)
  1097.                 llcf = llc0 * CFrame.new(0, .95, -.75) * CFrame.Angles(math.pi/5, 0, -math.rad(7))
  1098.                 rlcf = rlcf * CFrame.new(0, .95, -.75) * CFrame.Angles(math.pi/5, 0, math.rad(7))
  1099.                 else
  1100.                 action = false
  1101.                 end
  1102.             end
  1103.         end
  1104.         if hitz and hitz.Material == Enum.Material.Grass or hitz and hitz.Material == Enum.Material.Fabric or hitz and hitz.Material == Enum.Material.Pebble or hitz and hitz.Material == Enum.Material.Sand then
  1105.             sound.SoundId = "rbxasset://sounds/grass2.mp3"
  1106.         elseif hitz and hitz.Material == Enum.Material.Plastic or hitz and hitz.Material == Enum.Material.SmoothPlastic then
  1107.             sound.SoundId = "rbxasset://sounds/plasticplastic.mp3"
  1108.         elseif hitz and hitz.Material == Enum.Material.Brick or hitz and hitz.Material == Enum.Material.Slate or hitz and hitz.Material == Enum.Material.Granite or hitz and hitz.Material == Enum.Material.Concrete or hitz and hitz.Material == Enum.Material.Marble then
  1109.             sound.SoundId = "rbxasset://sounds/stone.mp3"
  1110.         elseif hitz and hitz.Material == Enum.Material.Ice then
  1111.             sound.SoundId = "rbxasset://sounds/ice2.mp3"
  1112.         elseif hitz and hitz.Material == Enum.Material.CorrodedMetal or hitz and hitz.Material == Enum.Material.DiamondPlate then
  1113.             sound.SoundId = "rbxasset://sounds/metal3.mp3"
  1114.         elseif hitz and hitz.Material == Enum.Material.Wood then
  1115.             sound.SoundId = "rbxasset://sounds/woodwood.mp3"
  1116.         end
  1117.         if not action then
  1118.         if humanoid.Sit then
  1119.             ncf = neckc0 * CFrame.Angles(0, 0, 0)
  1120.             rjcf = rootc0 * CFrame.new(0, -.5, 0) * CFrame.Angles(math.rad(10), 0, 0)
  1121.             rscf = rsc0 * CFrame.Angles(-math.rad(10), 0, math.rad(5))
  1122.             lscf = lsc0 * CFrame.Angles(-math.rad(10), 0, -math.rad(5))
  1123.             rlcf = rlc0 * CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2-math.rad(10), 0, math.rad(5.5))
  1124.             llcf = llc0 * CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2-math.rad(10), 0, -math.rad(5.5))
  1125.         elseif not hitz and torso.Velocity.y <= -0.5 then
  1126.             anglespeed = 1
  1127.             if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 15 then
  1128.                     if not waitingloop then
  1129.                     waitingloop = true
  1130.                         coroutine.wrap(function()
  1131.                             repeat wait() until hitz
  1132.                             action = 'StopSprinting'
  1133.                         end)()
  1134.                     end
  1135.             end
  1136.             anglespeed = 3
  1137.             local VelY = torso.Velocity.Y
  1138.             if VelY <= -85 then VelY = -85 end
  1139.                 ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  1140.                 rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  1141.                 rscf = rsc0 * CFrame.Angles(-math.rad(VelY)-math.sin(angle)*0.48, 0, math.rad(15.5+math.random(-1,3)))
  1142.                 lscf = lsc0 * CFrame.Angles(-math.rad(VelY)+math.sin(angle)*0.48, 0, -math.rad(15.5+math.random(1,3)))
  1143.                 rlcf = rlc0 * CFrame.Angles(-math.pi/16+-math.sin(angle)*0.35, -math.sin(angle)*0.008, math.rad(2.5))
  1144.                 llcf = llc0 * CFrame.Angles(-math.pi/17+math.sin(angle)*0.35, math.sin(angle)*0.008, math.rad(-2.5))
  1145.         elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  1146.             sound_play_time = 0
  1147.             if stopsprint and time_sprinted >= .8 then
  1148.                 time_sprinted = 0
  1149.                 action = 'StopSprinting'
  1150.             end
  1151.             time_sprinted = 0
  1152.             anglespeed = 0.15
  1153.             if prone then
  1154.             speed = 0.1
  1155.             ncf = neckc0 * CFrame.Angles(math.pi/2.1, 0, 0)
  1156.             rscf = rsc0 * CFrame.Angles(math.pi/.2-math.rad(10), -math.sin(angle)*0.02, 0)
  1157.             lscf = lsc0 * CFrame.Angles(math.pi/.2-math.rad(10), math.sin(angle)*0.02, 0)
  1158.             rjcf = rootc0 * CFrame.new(0, -.95, 0) * CFrame.Angles(-math.pi/2, 0, 0)
  1159.             llcf = llc0 * CFrame.new(0, 0, -.15) * CFrame.Angles(0, 0, math.rad(-5))
  1160.             rlcf = rlcf * CFrame.new(0, 0, -.15) * CFrame.Angles(0, 0, math.rad(5))
  1161.             elseif ctrl then
  1162.             speed = 0.15
  1163.             ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  1164.             rscf = rsc0 * CFrame.Angles(0, -math.sin(angle)*0.08, math.pi/18)
  1165.             lscf = lsc0 * CFrame.Angles(0, math.sin(angle)*0.08, -math.pi/18)
  1166.             rjcf = rootc0 * CFrame.new(0, -1.25, 0)
  1167.             llcf = llc0 * CFrame.new(0, 0, -.4999) * CFrame.Angles(-math.pi/2.2, 0, 0)
  1168.             rlcf = rlcf * CFrame.new(0, 1.25, -.85)
  1169.             elseif not ctrl and not prone then
  1170.             speed = 0.15
  1171.             idling = idling + 1/20
  1172.             if idling >= 20 then
  1173.             ncf = neckc0 * CFrame.Angles(math.pi/12-math.sin(angle)*0.005,0,0)
  1174.             rscf = rsc0 * CFrame.new(-.35, 0, -.35+math.sin(angle)*0.005) * CFrame.Angles(math.pi/2.2+math.sin(-angle)*.005, 0, -math.pi/4.5)
  1175.             lscf = lsc0 * CFrame.new(.35, 0, -.35+math.sin(angle)*0.005) * CFrame.Angles(math.pi/2.2+math.sin(angle)*.005, 0, math.pi/4.5)
  1176.             rjcf = rootc0 * CFrame.new(0, -.9, .55) * CFrame.Angles(-math.pi/12+math.sin(angle)*0.005, 0, 0)
  1177.             llcf = llc0 * CFrame.new(0, .95, -.55) * CFrame.Angles(math.pi/12, 0, -math.rad(2))
  1178.             rlcf = rlcf * CFrame.new(0, .95, -.55) * CFrame.Angles(math.pi/14, 0, math.rad(2))
  1179.             else
  1180.             ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  1181.             rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  1182.             rscf = rsc0 * CFrame.Angles(0, -math.sin(angle)*0.08, 0)
  1183.             lscf = lsc0 * CFrame.Angles(0, math.sin(angle)*0.08, 0)
  1184.             rlcf = rlc0 * CFrame.Angles(-math.sin(angle)*0.025, -math.sin(angle)*0.08, math.rad(2.5))
  1185.             llcf = llc0 * CFrame.Angles(-math.sin(angle)*0.025, math.sin(angle)*0.08, -math.rad(2.5))
  1186.         end
  1187.             end
  1188.         elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 10 then
  1189.             if stopsprint and time_sprinted >= .8 then
  1190.                 action = 'StopSprinting'
  1191.             end
  1192.             sound_play_time = sound_play_time + 1/60
  1193.             time_sprinted = 0
  1194.             idling = 0
  1195.             anglespeed = 1.5
  1196.             if prone then
  1197.             speed = 0.1
  1198.             anglespeed = .85
  1199.             ncf = neckc0 * CFrame.Angles(math.pi/2.1, 0, 0)
  1200.             rscf = rsc0 * CFrame.new(0, .7+ math.sin(angle)*.35, .1 + math.cos(-angle)*.1) * CFrame.Angles(math.pi/.2-math.rad(10), -math.sin(angle)*0.02, -math.pi/8)
  1201.             lscf = lsc0 * CFrame.new(0, .7+ -math.sin(angle)*.35, .1 - math.cos(angle)*.1) * CFrame.Angles(math.pi/.2-math.rad(10), math.sin(angle)*0.02, math.pi/8)
  1202.             rjcf = rootc0 * CFrame.new(0, -.95, 0) * CFrame.Angles(-math.pi/2, 0, 0)
  1203.             llcf = llc0 * CFrame.new(0, .35 + -math.sin(angle)*.35, 0) * CFrame.new(0, 0, -.15) * CFrame.Angles(0, 0, math.rad(-5))
  1204.             rlcf = rlcf * CFrame.new(0, .35 + math.sin(angle)*.35, 0) * CFrame.new(0, 0, -.15) * CFrame.Angles(0, 0, math.rad(5))
  1205.             elseif ctrl then
  1206.             speed = 0.25
  1207.             if sound_play_time >= .4 then
  1208.                 sound.Volume = .45
  1209.                 sound:play()
  1210.                 sound_play_time = 0
  1211.             end
  1212.             ncf = neckc0 * CFrame.Angles(math.pi/12,0,0)
  1213.             rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.025) * CFrame.Angles(math.pi/24+math.sin(-angle)*.05, 0, math.pi/18-math.abs(mvmnt)*0.02)
  1214.             lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.025) * CFrame.Angles(math.pi/24+math.sin(angle)*.05, 0, -math.pi/18+math.abs(mvmnt)*0.02)
  1215.             rjcf = rootc0 * CFrame.new(0, -.7, 0) * CFrame.Angles(math.abs(math.sin(angle))*0.025 + -math.pi/12, 0, 0)
  1216.             llcf = llc0 * CFrame.new(0, .85 + .2 - math.cos(angle)*.2, -.5 + (-.4+math.sin(angle)*0.25)) * CFrame.Angles(math.pi/18 + -math.pi/10 - math.sin(angle)*.45, 0, 0)
  1217.             rlcf = rlcf * CFrame.new(0, .85 + .2 + math.cos(angle)*.2, -.5 + (-.25-math.sin(angle)*0.25)) * CFrame.Angles(math.pi/18 + -math.pi/10 + math.sin(angle)*.45, 0, 0)
  1218.             elseif not ctrl and not prone then
  1219.             speed = 0.25
  1220.             if sound_play_time >= .4 then
  1221.                 sound.Volume = .65
  1222.                 sound:play()
  1223.                 sound_play_time = 0
  1224.             end
  1225.             rjcf = rootc0 * CFrame.Angles(math.abs(math.sin(angle))*0.025 + -math.pi/64, 0, 0)
  1226.             rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*.5, 0, -math.abs(mvmnt)*0.02)
  1227.             lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*.5, 0, math.abs(mvmnt)*0.02)
  1228.             rlcf = rlc0 * CFrame.new(0, .075 + -math.cos(-angle)*.075, -.05+math.sin(angle)*0.1) * CFrame.Angles(math.sin(-angle)*.45, 0, math.rad(.5))
  1229.             llcf = llc0 * CFrame.new(0, .075 - -math.cos(angle)*.075, -.05-math.sin(angle)*0.1) * CFrame.Angles(math.sin(angle)*.45, 0, -math.rad(.5))
  1230.             end
  1231.         elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 15 then
  1232.             idling = 0
  1233.             time_sprinted = time_sprinted + 1/60
  1234.             sound_play_time = sound_play_time + 1/60
  1235.             stopsprint = true --when released
  1236.             anglespeed = 2
  1237.             speed = .3
  1238.             if sound_play_time >= .375 then
  1239.                 sound.Volume = .75
  1240.                 sound:play()
  1241.                 sound_play_time = 0
  1242.             end
  1243.             local RotVelocityZ = torso.RotVelocity.Y
  1244.             if RotVelocityZ >= 15 then
  1245.                 RotVelocityZ = 15
  1246.             elseif RotVelocityZ <= -15 then
  1247.                 RotVelocityZ = -15
  1248.             end
  1249.             ncf = neckc0 * CFrame.Angles(0, -math.sin(angle)*.1, 0)
  1250.             rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*1.1, 0, -math.abs(mvmnt)*0.02)
  1251.             lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*1.1, 0, math.abs(mvmnt)*0.02)
  1252.             rjcf = rootc0 * CFrame.new(0, 0, 0) * CFrame.Angles(math.abs(math.sin(angle))*0.055 + -math.pi/18, math.sin(angle)*.1, math.sin(angle)*.045 + math.rad(RotVelocityZ)*2.5)
  1253.             rlcf = rlc0 * CFrame.new(0, .3 + -math.cos(-angle)*.3, -.2+math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
  1254.             llcf = llc0 * CFrame.new(0, .3 - -math.cos(angle)*.3, -.05-math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
  1255.             --rlcf -.2+math.sin(angle)*0.25
  1256.             --llcf -.05-math.sin(angle)*0.25
  1257.         end
  1258.         end
  1259.             if knife then
  1260.                 if prone then
  1261.                     rscf = rsc0 * CFrame.Angles(math.rad(170), -math.rad(10), -.2)
  1262.                 else
  1263.                     rscf = rsc0 * CFrame.Angles(math.rad(50), -math.rad(10), -.2)
  1264.                 end
  1265.             elseif flashlight then
  1266.                 if prone then
  1267.                     rscf = rsc0 * CFrame.Angles(math.rad(170), -math.rad(10), -.2)
  1268.                 else
  1269.                     rscf = rsc0 * CFrame.Angles(math.rad(70), -math.rad(10), -.2)
  1270.                 end
  1271.             end
  1272.             if knifeslash then
  1273.                 if prone then
  1274.                     rscf = rsc0 * CFrame.Angles(math.rad(190), -math.rad(10), -.2)
  1275.                 else
  1276.                     rscf = rsc0 * CFrame.Angles(math.rad(100), -math.rad(10), -.2)
  1277.                 end
  1278.             end
  1279.     rm.C0 = clerp(rm.C0,rscf,speed)
  1280.     lm.C0 = clerp(lm.C0,lscf,speed)
  1281.     rj.C0 = clerp(rj.C0,rjcf,speed)
  1282.     rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  1283.     llegm.C0 = clerp(llegm.C0,llcf,speed)
  1284.     neck.C0 = clerp(neck.C0,ncf,speed)
  1285. end
  1286. end)
  1287. hed.face.Texture = "rbxassetid://411170797"
  1288. --Credits Eurse
  1289. local v=Vector3.new
  1290. local yield=coroutine.yield
  1291. local uvec=Vector3.new(1, 1, 1)
  1292. local inf=math.huge
  1293. local infvec=uvec*inf
  1294. local down=false
  1295. local speed;
  1296.  
  1297.  
  1298. local players=game:GetService"Players"
  1299. local player=players.LocalPlayer
  1300. local mouse=player:GetMouse()
  1301. repeat yield() until player.Character
  1302. local character=player.Character
  1303. local torso=character:WaitForChild"Torso"
  1304. local humanoid=character:WaitForChild"Humanoid"
  1305.  
  1306. function weld(p1, p2)
  1307.     local weld=Instance.new"Weld"
  1308.     weld.Parent=p1
  1309.     weld.Part0=p1
  1310.     weld.Part1=p2
  1311.     return weld
  1312. end
  1313.  
  1314. local ball=Instance.new"Part"
  1315. ball.CanCollide=false
  1316. ball.TopSurface="Smooth"
  1317. ball.BottomSurface="Smooth"
  1318. ball.BrickColor=BrickColor.new"Pastel brown"
  1319. ball.FormFactor="Custom"
  1320. Instance.new("SpecialMesh", ball).MeshType=Enum.MeshType.Sphere
  1321.  
  1322. local lb=ball:Clone()
  1323. lb.Size=uvec*1.1
  1324. lb.Parent=character
  1325. local lbn=ball:clone()
  1326. lbn.BrickColor=BrickColor.new"Medium red"
  1327. lbn.Size=uvec*.2
  1328. lbn.Parent=character
  1329.  
  1330. local rb=lb:Clone()
  1331. rb.Parent=character
  1332. local rbn=lbn:Clone()
  1333. rbn.Parent=character
  1334.  
  1335. local lbnw=weld(lb, lbn)
  1336. local rbnw=weld(rb, rbn)
  1337. lbnw.C0=CFrame.new(0, 0, -(lb.Size.X/2-lbn.Size.X/4))
  1338. rbnw.C0=lbnw.C0
  1339.  
  1340. local lbw=weld(torso, lb)
  1341. local rbw=weld(torso, rb)
  1342. lbw.C0=CFrame.new(-lb.Size.X/2, lb.Size.X/2, -lb.Size.X/2)
  1343. rbw.C0=lbw.C0*CFrame.new(lb.Size.X, 0, 0)
  1344.  
  1345. while true do
  1346.     local dt=yield()
  1347.     local v=torso.Velocity
  1348.     local c0=CFrame.new(-lb.Size.X/2, lb.Size.X/2, -lb.Size.X/2)
  1349.     local deg=-math.max(math.min(v.Y*1.8, 50), -50)/70
  1350.     --print(deg)
  1351.     local ang=CFrame.Angles(deg * math.pi/2 , 0, 0)
  1352.     lbw.C0=c0*CFrame.Angles(0, deg*1.2*math.pi/4, 0)*ang
  1353.     rbw.C0=c0*CFrame.new(lb.Size.X, 0, 0)*CFrame.Angles(0, -deg*1.2*math.pi/4, 0)*ang
  1354. end
  1355. pairs(chr:GetChildren()) do if v:IsA("Shirt") then v:Destroy() end end
  1356.  
  1357. local isScriptNil = false
  1358.  
  1359. local PlrName = "hotboybilly"
  1360. local Plrs = game:GetService("Players")
  1361. local RunService = game:GetService("RunService")
  1362. local Content = game:GetService("ContentProvider")
  1363. local LP = Plrs.LocalPlayer
  1364. local Char = LP.Character
  1365. local PlrGui = LP.PlayerGui
  1366. local Backpack = LP.Backpack
  1367. local Mouse = LP:GetMouse()
  1368.  
  1369. local Camera = Workspace.CurrentCamera
  1370. local LastCamCF = Camera.CoordinateFrame
  1371. local AnimJoints = {}
  1372. local Cons = {}
  1373. local mDown = false
  1374. local Multi = false
  1375. local Grabbing = false
  1376. local Current = {}
  1377. local Alpha = 1
  1378. local LightNum = 1
  1379.  
  1380. Current.Part = nil
  1381. Current.BP = nil
  1382. Current.BA = nil
  1383. Current.Mass = nil
  1384.  
  1385. local LastPart = nil
  1386.  
  1387. local Head = Char["Head"]
  1388. local Torso = Char["Torso"]
  1389. local Humanoid = Char["Humanoid"]
  1390. local LA = Char["Left Arm"]
  1391. local RA = Char["Right Arm"]
  1392. local LL = Char["Left Leg"]
  1393. local RL = Char["Right Leg"]
  1394.  
  1395. local LS, RS;
  1396.  
  1397. local OrigLS = Torso["Left Shoulder"]
  1398. local OrigRS = Torso["Right Shoulder"]
  1399.  
  1400. for _,v in pairs(Char:GetChildren()) do
  1401.     if v.Name == ModID then
  1402.         v:Destroy()
  1403.     end
  1404. end
  1405.  
  1406. for _,v in pairs(PlrGui:GetChildren()) do
  1407.     if v.Name == "PadsGui" then
  1408.         v:Destroy()
  1409.     end
  1410. end
  1411.  
  1412. local ModID = "Pads"
  1413. local Objects = {}
  1414. local Grav = 196.2
  1415.  
  1416. local sin=math.sin
  1417. local cos=math.cos
  1418. local max=math.max
  1419. local min=math.min
  1420. local atan2=math.atan2
  1421. local random=math.random
  1422. local tau = 2 * math.pi
  1423.  
  1424. local BodyObjects = {
  1425.     ["BodyVelocity"] = true;
  1426.     ["BodyAngularVelocity"] = true;
  1427.     ["BodyForce"] = true;
  1428.     ["BodyThrust"] = true;
  1429.     ["BodyPosition"] = true;
  1430.     ["RocketPropulsion"] = true;
  1431. }
  1432.  
  1433. if LP.Name == PlrName and isScriptNil then
  1434.     script.Parent = nil
  1435. end
  1436.  
  1437. LP.CameraMode = "Classic"
  1438.  
  1439. local Assets = {
  1440. }
  1441.  
  1442. local LS0, LS1 = OrigLS.C0, OrigLS.C1
  1443. local RS0, RS1 = OrigRS.C0, OrigRS.C1
  1444.  
  1445. for i,v in pairs(Assets) do
  1446.     local ID = tostring(Assets[i])
  1447.     Assets[i] = "http://www.roblox.com/asset/?id=" .. ID
  1448.     Content:Preload("http://www.roblox.com/asset/?id=" .. ID)
  1449. end
  1450.  
  1451. function QuaternionFromCFrame(cf)
  1452.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
  1453.     local trace = m00 + m11 + m22 if trace > 0 then
  1454.         local s = math.sqrt(1 + trace);
  1455.         local recip = 0.5/s;
  1456.         return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
  1457.     else
  1458.         local i = 0;
  1459.         if m11 > m00 then
  1460.             i = 1;
  1461.         end;
  1462.         if m22 > (i == 0 and m00 or m11) then
  1463.             i = 2 end if i == 0 then
  1464.             local s = math.sqrt(m00-m11-m22+1);
  1465.             local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
  1466.         elseif i == 1 then
  1467.             local s = math.sqrt(m11-m22-m00+1);
  1468.             local recip = 0.5/s;
  1469.             return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
  1470.         elseif i == 2 then
  1471.             local s = math.sqrt(m22-m00-m11+1);
  1472.             local recip = 0.5/s;
  1473.             return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
  1474.         end;
  1475.     end;
  1476. end;
  1477.  
  1478. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1479.     local xs, ys, zs = x + x, y + y, z + z;
  1480.     local wx, wy, wz = w*xs, w*ys, w*zs;
  1481.     local xx = x*xs;
  1482.     local xy = x*ys;
  1483.     local xz = x*zs;
  1484.     local yy = y*ys;
  1485.     local yz = y*zs;
  1486.     local zz = z*zs;
  1487.     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))
  1488. end;
  1489.  
  1490. function QuaternionSlerp(a, b, t)
  1491.     local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
  1492.     local startInterp, finishInterp;
  1493.     if cosTheta >= 0.0001 then
  1494.         if (1 - cosTheta) > 0.0001 then
  1495.             local theta = math.acos(cosTheta);
  1496.             local invSinTheta = 1/math.sin(theta);
  1497.             startInterp = math.sin((1-t)*theta)*invSinTheta;
  1498.             finishInterp = math.sin(t*theta)*invSinTheta;
  1499.         else
  1500.             startInterp = 1-t finishInterp = t;
  1501.         end;
  1502.     else
  1503.         if (1+cosTheta) > 0.0001 then
  1504.             local theta = math.acos(-cosTheta);
  1505.             local invSinTheta = 1/math.sin(theta);
  1506.             startInterp = math.sin((t-1)*theta)*invSinTheta;
  1507.             finishInterp = math.sin(t*theta)*invSinTheta;
  1508.         else startInterp = t-1 finishInterp = t;
  1509.         end;
  1510.     end;
  1511.     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;
  1512. end;
  1513.  
  1514. function CLerp(a,b,t)
  1515.     local qa={QuaternionFromCFrame(a)};
  1516.     local qb={QuaternionFromCFrame(b)};
  1517.     local ax,ay,az=a.x,a.y,a.z;
  1518.     local bx,by,bz=b.x,b.y,b.z;
  1519.     local _t=1-t;
  1520.     return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
  1521. end
  1522.  
  1523. function GetWeld(weld)
  1524.     local obj
  1525.     for i, v in pairs(AnimJoints) do
  1526.         if v[1] == weld then
  1527.             obj = v
  1528.             break
  1529.         end
  1530.     end
  1531.     if not obj then
  1532.         obj = {weld,NV}
  1533.         table.insert(AnimJoints,obj)
  1534.     end
  1535.     return weld.C0.p, obj[2]
  1536. end
  1537.  
  1538. function SetWeld(weld, i, loops, origpos, origangle, nextpos, nextangle, override, overrideLower, smooth)
  1539.     smooth = smooth or 1
  1540.     local obj
  1541.     for i, v in pairs(AnimJoints) do
  1542.         if v[1] == weld then
  1543.             obj = v
  1544.             break
  1545.         end
  1546.     end
  1547.     if not obj then
  1548.         obj = {weld,NV}
  1549.         table.insert(AnimJoints,obj)
  1550.     end
  1551.    
  1552.     local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  1553.    
  1554.     local tox,toy,toz = 0,0,0
  1555.     tox = math.abs(origangle.x - nextangle.x) *perc
  1556.     toy = math.abs(origangle.y - nextangle.y) *perc
  1557.     toz = math.abs(origangle.z - nextangle.z) *perc
  1558.     tox = ((origangle.x > nextangle.x and -tox) or tox)
  1559.     toy = ((origangle.y > nextangle.y and -toy) or toy)
  1560.     toz = ((origangle.z > nextangle.z and -toz) or toz)
  1561.    
  1562.     local tox2,toy2,toz2 = 0,0,0
  1563.     tox2 = math.abs(origpos.x - nextpos.x) *perc
  1564.     toy2 = math.abs(origpos.y - nextpos.y) *perc
  1565.     toz2 = math.abs(origpos.z - nextpos.z) *perc
  1566.     tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  1567.     toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  1568.     toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  1569.    
  1570.     obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  1571.     weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  1572. end
  1573.  
  1574. function RotateCamera(x, y)
  1575.     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)
  1576. end
  1577.  
  1578. function GetAngles(cf)
  1579.     local lv = cf.lookVector
  1580.     return -math.asin(lv.y), math.atan2(lv.x, -lv.z)
  1581. end
  1582.  
  1583. local LastCamCF = Camera.CoordinateFrame
  1584.  
  1585. function Look()
  1586.     if AlphaOn == true then
  1587.         local x, y = GetAngles(LastCamCF:toObjectSpace(Camera.CoordinateFrame))
  1588.         Camera.CoordinateFrame = LastCamCF
  1589.         RotateCamera(x * -(Alpha), y * -(Alpha))
  1590.         LastCamCF = Camera.CoordinateFrame
  1591.     end
  1592. end
  1593.  
  1594. function Cor(Func)
  1595.     local Ok, Err = coroutine.resume(coroutine.create(Func))
  1596.     if not Ok then
  1597.         print(Err)
  1598.     end
  1599. end
  1600.  
  1601. function Cor2(Func)
  1602.     local Ok, Err = ypcall(Func)
  1603.     if not Ok then
  1604.         print(Err)
  1605.     end
  1606. end
  1607.  
  1608. function MakePads()
  1609.     -- 1 - VTelekinesis
  1610.     P1 = Instance.new("Model")
  1611.     P1.Name = ModID
  1612.  
  1613.     -- 2 - RBase
  1614.     P2 = Instance.new("Part")
  1615.     P2.CFrame = CFrame.new(Vector3.new(21.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  1616.     P2.FormFactor = Enum.FormFactor.Custom
  1617.     P2.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  1618.     P2.Anchored = true
  1619.     P2.BrickColor = BrickColor.new("White")
  1620.     P2.Friction = 0.30000001192093
  1621.     P2.Shape = Enum.PartType.Block
  1622.     P2.Name = "RBase"
  1623.     P2.Parent = P1
  1624.     P2.Transparency = 1
  1625.     -- 3 - Mesh
  1626.     P3 = Instance.new("CylinderMesh")
  1627.     P3.Scale = Vector3.new(1, 0.5, 1)
  1628.     P3.Parent = P2
  1629.  
  1630.     -- 4 - LBase
  1631.     P4 = Instance.new("Part")
  1632.     P4.CFrame = CFrame.new(Vector3.new(18.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  1633.     P4.FormFactor = Enum.FormFactor.Custom
  1634.     P4.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  1635.     P4.Anchored = true
  1636.     P4.BrickColor = BrickColor.new("White")
  1637.     P4.Friction = 0.30000001192093
  1638.     P4.Shape = Enum.PartType.Block
  1639.     P4.Name = "LBase"
  1640.     P4.Parent = P1
  1641.     P4.Transparency = 1
  1642.     -- 5 - Mesh
  1643.     P5 = Instance.new("CylinderMesh")
  1644.     P5.Scale = Vector3.new(1, 0.5, 1)
  1645.     P5.Parent = P4
  1646.  
  1647.     -- 7 - Mesh
  1648.     P7 = Instance.new("CylinderMesh")
  1649.     P7.Scale = Vector3.new(1, 0.5, 1)
  1650.     P7.Parent = P6
  1651.  
  1652.    
  1653.  
  1654.     -- 9 - Mesh
  1655.     P9 = Instance.new("CylinderMesh")
  1656.     P9.Scale = Vector3.new(1, 0.5, 1)
  1657.     P9.Parent = P8
  1658.  
  1659.    
  1660.  
  1661.     -- 11 - Mesh
  1662.     P11 = Instance.new("CylinderMesh")
  1663.     P11.Scale = Vector3.new(1, 0.5, 1)
  1664.     P11.Parent = P10
  1665.  
  1666.    
  1667.     -- 13 - Mesh
  1668.     P13 = Instance.new("CylinderMesh")
  1669.     P13.Scale = Vector3.new(1, 0.5, 1)
  1670.     P13.Parent = P12
  1671.  
  1672.  
  1673.     -- 15 - Mesh
  1674.     P15 = Instance.new("CylinderMesh")
  1675.     P15.Scale = Vector3.new(1, 0.5, 1)
  1676.     P15.Parent = P14
  1677.  
  1678.     -- 17 - Mesh
  1679.     P17 = Instance.new("CylinderMesh")
  1680.     P17.Scale = Vector3.new(1, 0.5, 1)
  1681.     P17.Parent = P16
  1682.  
  1683.     P1.Parent = LP.Character
  1684.     P1:MakeJoints()
  1685.     return P1
  1686. end
  1687.  
  1688. weldModel = function(model, unanchor, rooty)
  1689.     local parts = {}
  1690.     local function recurse(object)
  1691.         if object:IsA("BasePart") then
  1692.             table.insert(parts, object)
  1693.         end
  1694.         for _,child in pairs(object:GetChildren()) do
  1695.             recurse(child)
  1696.         end
  1697.     end
  1698.     recurse(model)
  1699.    
  1700.     local rootPart = rooty or parts[1]
  1701.     for _, part in pairs(parts) do
  1702.         local cframe = rootPart.CFrame:toObjectSpace(part.CFrame)
  1703.         local weld = Instance.new("Weld")
  1704.         weld.Part0 = rootPart
  1705.         weld.Part1 = part
  1706.         weld.C0 = cframe
  1707.         weld.Parent = rootPart
  1708.     end
  1709.    
  1710.     if unanchor then
  1711.         for _, part in pairs(parts) do
  1712.             part.Anchored = false
  1713.             part.CanCollide = false
  1714.         end
  1715.     end
  1716. end
  1717.  
  1718. weldItem = function(rootPart, Item, TheC0, unanchor, ParentItem)
  1719.     local cframe = TheC0 or rootPart.CFrame:toObjectSpace(Item.CFrame)
  1720.     local weld = Instance.new("Weld")
  1721.     weld.Name = "Weld"
  1722.     weld.Part0 = rootPart
  1723.     weld.Part1 = Item
  1724.     weld.C0 = cframe
  1725.     weld.Parent = ParentItem and Item or rootPart
  1726.    
  1727.     if unanchor then
  1728.         Item.Anchored = false
  1729.     end
  1730.     return weld, cframe
  1731. end
  1732.  
  1733. scaleModel = function(model, scale)
  1734.     local parts = {}
  1735.     local function recurse(object)
  1736.         if object:IsA("BasePart") then
  1737.             table.insert(parts, object)
  1738.         end
  1739.         for _,child in pairs(object:GetChildren()) do
  1740.             recurse(child)
  1741.         end
  1742.     end
  1743.     recurse(model)
  1744.    
  1745.     local top, bottom, left, right, back, front
  1746.     for _, part in pairs(parts) do
  1747.         if top == nil or top < part.Position.y then         top = part.Position.y end
  1748.         if bottom == nil or bottom > part.Position.y then   bottom = part.Position.y end
  1749.         if left == nil or left > part.Position.x then       left = part.Position.x end
  1750.         if right == nil or right < part.Position.x then     right = part.Position.x end
  1751.         if back == nil or back > part.Position.z then       back = part.Position.z end
  1752.         if front == nil or front < part.Position.z then     front = part.Position.z end
  1753.     end
  1754.    
  1755.     local middle = Vector3.new( left+right, top+bottom, back+front )/2
  1756.     local minSize = Vector3.new(0.2, 0.2, 0.2)
  1757.    
  1758.     for _, part in pairs(parts) do
  1759.         local foo = part.CFrame.p - middle
  1760.         local rotation = part.CFrame - part.CFrame.p
  1761.         local newSize = part.Size*scale
  1762.         part.FormFactor = "Custom"
  1763.         part.Size = newSize
  1764.         part.CFrame = CFrame.new( middle + foo*scale ) * rotation
  1765.        
  1766.         if newSize.x < minSize.x or newSize.y < minSize.y or newSize.z < minSize.z then
  1767.             local mesh
  1768.             for _, child in pairs(part:GetChildren()) do
  1769.                 if child:IsA("DataModelMesh") then
  1770.                     mesh = child
  1771.                     break
  1772.                 end
  1773.             end
  1774.            
  1775.             if mesh == nil then
  1776.                 mesh = Instance.new("BlockMesh", part)
  1777.             end
  1778.            
  1779.             local oScale = mesh.Scale
  1780.             local newScale = newSize/minSize * oScale
  1781.             if 0.2 < newSize.x then newScale = Vector3.new(1 * oScale.x, newScale.y, newScale.z) end
  1782.             if 0.2 < newSize.y then newScale = Vector3.new(newScale.x, 1 * oScale.y, newScale.z) end
  1783.             if 0.2 < newSize.z then newScale = Vector3.new(newScale.x, newScale.y, 1 * oScale.z) end
  1784.            
  1785.             mesh.Scale = newScale
  1786.         end
  1787.     end
  1788. end
  1789.  
  1790. function getMass(Obj, Total)
  1791.     local newTotal = Total
  1792.     local returnTotal = 0
  1793.    
  1794.     if Obj:IsA("BasePart") then
  1795.         newTotal = newTotal + Objects[Obj]
  1796.     elseif BodyObjects[Obj.ClassName] then
  1797.         Obj:Destroy()
  1798.     end
  1799.    
  1800.     if Obj:GetChildren() and #Obj:GetChildren() > 0 then
  1801.         for _,v in pairs(Obj:GetChildren()) do
  1802.             returnTotal = returnTotal + getMass(v, newTotal)
  1803.         end
  1804.     else
  1805.         returnTotal = newTotal
  1806.     end
  1807.    
  1808.     return returnTotal
  1809. end
  1810.  
  1811. function getTargFromCurrent()
  1812.     local Current = Current.Part
  1813.     if Current:IsA("BasePart") then
  1814.         return Current
  1815.     elseif Current:findFirstChild("Torso") then
  1816.         return Current.Torso
  1817.     else
  1818.         for _,v in pairs(Current:GetChildren()) do
  1819.             if v:IsA("BasePart") then
  1820.                 return v
  1821.             end
  1822.         end
  1823.     end
  1824. end
  1825.  
  1826. function Fire(Part, Vec, Inv)
  1827.     pcall(function()
  1828.         Current.BP:Destroy()
  1829.         Current.BP = nil
  1830.     end)
  1831.     pcall(function()
  1832.         Current.BA:Destroy()
  1833.         Current.BA = nil
  1834.     end)
  1835.     pcall(function()
  1836.         if Inv then
  1837.             Part.Velocity = -((Vec - Torso.Position).unit * Grav * 1.1)
  1838.         else
  1839.             Part.Velocity = ((Vec - Camera.CoordinateFrame.p).unit * Grav * 1.1)
  1840.         end
  1841.         Current.Mass = nil
  1842.     end)
  1843.     Reset()
  1844. end
  1845.  
  1846. function Reset()
  1847.     LS.Parent = nil
  1848.     RS.Parent = nil
  1849.    
  1850.     OrigLS.Parent = Torso
  1851.     OrigRS.Parent = Torso
  1852.    
  1853.     OrigLS.C0 = LS0
  1854.     OrigRS.C0 = RS0
  1855. end
  1856.  
  1857. function Start()
  1858.     Cor(function()
  1859.         repeat wait(1/30) until LP.Character and LP.Character.Parent == Workspace and LP.Character:findFirstChild("Torso")
  1860.         Char = LP.Character
  1861.         PlrGui = LP.PlayerGui
  1862.         Backpack = LP.Backpack
  1863.         Mouse = LP:GetMouse()
  1864.        
  1865.         for _,v in pairs(Cons) do
  1866.             v:disconnect()
  1867.         end
  1868.         Cons = {}
  1869.  
  1870.         Camera = Workspace.CurrentCamera
  1871.         LastCamCF = Camera.CoordinateFrame
  1872.         AnimJoints = {}
  1873.         mDown = false
  1874.         Multi = false
  1875.         Grabbing = false
  1876.         Current = {}
  1877.         Alpha = 1
  1878.  
  1879.         Head = Char["Head"]
  1880.         Torso = Char["Torso"]
  1881.         Humanoid = Char["Humanoid"]
  1882.         LA = Char["Left Arm"]
  1883.         RA = Char["Right Arm"]
  1884.         LL = Char["Left Leg"]
  1885.         RL = Char["Right Leg"]
  1886.        
  1887.         OrigLS = Torso["Left Shoulder"]
  1888.         OrigRS = Torso["Right Shoulder"]
  1889.  
  1890.         for _,v in pairs(Char:GetChildren()) do
  1891.             if v.Name == ModID then
  1892.                 v:Destroy()
  1893.             end
  1894.         end
  1895.  
  1896.         for _,v in pairs(PlrGui:GetChildren()) do
  1897.             if v.Name == "PadsGui" then
  1898.                 v:Destroy()
  1899.             end
  1900.         end
  1901.        
  1902.         LS = Instance.new("Weld")
  1903.         RS = Instance.new("Weld")
  1904.  
  1905.         LS.Name = OrigLS.Name
  1906.         LS.Part0 = Torso
  1907.         LS.Part1 = LA
  1908.         LS.C0 = LS0
  1909.         LS.C1 = CFrame.new(0, 0.5, 0,  1, 0, 0,  0, 0, 1,  0, -1, 0)
  1910.  
  1911.         RS.Name = OrigRS.Name
  1912.         RS.Part0 = Torso
  1913.         RS.Part1 = RA
  1914.         RS.C0 = RS0
  1915.         RS.C1 = CFrame.new(0, 0.5, 0,  1, 0, 0,  0, 0, 1,  0, -1, 0)
  1916.  
  1917.         local Pads = MakePads()
  1918.         local LPad = Pads.LBase
  1919.         local RPad = Pads.RBase
  1920.  
  1921.         weldModel(LPad, true, LPad)
  1922.         weldModel(RPad, true, RPad)
  1923.  
  1924.         local GripWeldL = Instance.new("Weld")
  1925.         GripWeldL.Name = "GripWeldL"
  1926.         GripWeldL.Part0 = LA
  1927.         GripWeldL.Part1 = LPad
  1928.         GripWeldL.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  1929.         GripWeldL.Parent = LA
  1930.  
  1931.         local GripWeldR = Instance.new("Weld")
  1932.         GripWeldR.Name = "GripWeldR"
  1933.         GripWeldR.Part0 = RA
  1934.         GripWeldR.Part1 = RPad
  1935.         GripWeldR.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  1936.         GripWeldR.Parent = RA
  1937.        
  1938.         local isParts = false
  1939.  
  1940.         table.insert(Cons, Mouse.KeyDown:connect(function(Key)
  1941.             Key = Key:lower()
  1942.             if Key == "z" then
  1943.                 --Stuff
  1944.             elseif Key == "f" then
  1945.                 local Current = Current.Part
  1946.                 if Current and Current.Parent ~= nil and not Multi then
  1947.                     Current:BreakJoints()
  1948.                 end
  1949.             elseif Key == "q" then
  1950.                 if isParts then
  1951.                     isParts = false
  1952.                     for _,v in pairs(Workspace:GetChildren()) do
  1953.                         if v.Name == "MyPartV" and v:IsA("BasePart") then
  1954.                             v:Destroy()
  1955.                         end
  1956.                     end
  1957.                 else
  1958.                     isParts = true
  1959.                     for i = 1, 50 do
  1960.                         local Part = Instance.new("Part")
  1961.                         Part.Color = Color3.new(math.random(), math.random(), math.random())
  1962.                         Part.Transparency = 0
  1963.                         Part.Size = Vector3.new(math.random(1, 3), math.random(1, 3), math.random(1, 3))
  1964.                         Part.Archivable = true
  1965.                         Part.CanCollide = false
  1966.                         Part.Material = "Neon"
  1967.                         Part.Locked = false
  1968.                         Part.CFrame = Torso.CFrame * CFrame.new(math.random(-15, 15), -1, math.random(-15, 15))
  1969.                         Part.Anchored = true
  1970.                         Part.Name = "MyPartV"
  1971.                         Part.TopSurface = "Smooth"
  1972.                         Part.BottomSurface = "Smooth"
  1973.                         Part.Parent = Workspace
  1974.                     end
  1975.                 end
  1976.             elseif Key == "e" then
  1977.                 local Targ;
  1978.                 if Current.Part and Current.Part ~= nil then
  1979.                     Targ = getTargFromCurrent()
  1980.                 else
  1981.                     Targ = LastPart
  1982.                 end
  1983.                 if Targ and Targ.Parent ~= nil and not Multi then
  1984.                     local Ex = Instance.new("Explosion", Workspace)
  1985.                     Ex.Position = Targ.CFrame.p
  1986.                     Ex.BlastRadius = 16
  1987.                     Ex.DestroyJointRadiusPercent = 0.5
  1988.                 end
  1989.             elseif Key == "c" then
  1990.                 if Current.Part and Current.Part.Parent ~= nil and not Multi then
  1991.                     local Part = getTargFromCurrent()
  1992.                     if Part then
  1993.                         Grabbing = false
  1994.                         if Mouse.Hit then
  1995.                             local TargPos = CFrame.new(Camera.CoordinateFrame.p, Mouse.Hit.p) * CFrame.new(0, 0, -1000)
  1996.                             Fire(Part, TargPos.p)
  1997.                         else
  1998.                             Fire(Part, Mouse.Origin.p + Mouse.UnitRay.Direction, true)
  1999.                         end
  2000.                     end
  2001.                 end
  2002.             end
  2003.         end))
  2004.  
  2005.         table.insert(Cons, Mouse.Button1Up:connect(function()
  2006.             mDown = false
  2007.             if Grabbing == true and Multi == false then
  2008.                 Grabbing = false
  2009.                 Reset()
  2010.             end
  2011.             if Current.Part ~= nil then
  2012.                 LastPart = getTargFromCurrent()
  2013.                 Current = {}
  2014.             end
  2015.         end))
  2016.  
  2017.         local function makeLightning(Par, Start, End, Width, Length, RandomScale, ArcScale, Num1)
  2018.             local oldParts = {}
  2019.             for _,v in pairs(Par:GetChildren()) do
  2020.                 v.CFrame = CFrame.new(5e5, 5e5, 5e5)
  2021.                 table.insert(oldParts, v)
  2022.             end
  2023.             local Distance = (Start-End).Magnitude
  2024.             local ArcScale = ArcScale or 1
  2025.             local RandomScale = RandomScale or 0
  2026.             local Last = Start
  2027.             local IterNum = 0
  2028.  
  2029.             while Par.Parent do
  2030.                 IterNum = IterNum + 1
  2031.                 local New = nil
  2032.                 if (Last-End).Magnitude < Length then
  2033.                     New = CFrame.new(End)
  2034.                 else
  2035.                     if (End-Last).Magnitude < Length*2 then
  2036.                         RandomScale = RandomScale*0.5
  2037.                         ArcScale = ArcScale*0.5
  2038.                     end
  2039.                     local Direct = CFrame.new(Last,End)
  2040.                     New = Direct*CFrame.Angles(math.rad(math.random(-RandomScale/4,RandomScale*ArcScale)),math.rad(math.random(-RandomScale,RandomScale)),math.rad(math.random(-RandomScale,RandomScale)))
  2041.                     New = New*CFrame.new(0,0,-Length)
  2042.                 end
  2043.                 local Trail = nil
  2044.                 if oldParts[IterNum] then
  2045.                     Trail = oldParts[IterNum]
  2046.                     Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("Persimmon")) or BrickColor.new("Really red")
  2047.                     Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  2048.                     Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  2049.                     oldParts[IterNum] = nil
  2050.                 else
  2051.                     Trail = Instance.new("Part")
  2052.                     Trail.Name = "Part"
  2053.                     Trail.FormFactor = "Custom"
  2054.                     Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  2055.                     Trail.Transparency = 0
  2056.                     Trail.Anchored = true
  2057.                     Trail.CanCollide = false
  2058.                     Trail.Locked = true
  2059.                     Trail.BackSurface = "SmoothNoOutlines"
  2060.                     Trail.BottomSurface = "SmoothNoOutlines"
  2061.                     Trail.FrontSurface = "SmoothNoOutlines"
  2062.                     Trail.LeftSurface = "SmoothNoOutlines"
  2063.                     Trail.RightSurface = "SmoothNoOutlines"
  2064.                     Trail.TopSurface = "SmoothNoOutlines"
  2065.                     Trail.Material = "Neon"
  2066.                     Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  2067.                     Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  2068.                     Trail.Parent = Par
  2069.                 end
  2070.                 Last = New.p
  2071.                 if (Last-End).Magnitude < 1 then
  2072.                     break
  2073.                 end
  2074.             end
  2075.             for _,v in pairs(oldParts) do
  2076.                 v:Destroy()
  2077.             end
  2078.         end
  2079.  
  2080.         table.insert(Cons, Mouse.Button1Down:connect(function()
  2081.             mDown = true
  2082.             local Targ = Mouse.Target
  2083.             Cor(function()
  2084.                 if Targ and Objects[Targ] and not Multi then
  2085.                     Grabbing = true
  2086.                     Current.Part = Targ
  2087.                     local Mass = Objects[Targ]
  2088.                     local ForceNum = 0
  2089.                     local Hum = nil
  2090.                    
  2091.                     for _,v in pairs(Targ:GetChildren()) do
  2092.                         if BodyObjects[v.ClassName] then
  2093.                             v:Destroy()
  2094.                         end
  2095.                     end
  2096.                    
  2097.                     for _,v in pairs(Workspace:GetChildren()) do
  2098.                         if v:findFirstChild("Humanoid") and v:IsAncestorOf(Targ) then
  2099.                             Hum = v.Humanoid
  2100.                             Mass = getMass(v, 0)
  2101.                             Current.Part = v
  2102.                             break
  2103.                         end
  2104.                     end
  2105.                    
  2106.                     Current.Mass = Mass
  2107.                    
  2108.                     if not Hum then
  2109.                         Targ:BreakJoints()
  2110.                     end
  2111.                    
  2112.                     ForceNum = Mass * Grav
  2113.                     Targ.CanCollide = true
  2114.                     Targ.Anchored = false
  2115.                    
  2116.                     local BP = Instance.new("BodyPosition")
  2117.                     BP.maxForce = Vector3.new(3 * ForceNum, 3 * ForceNum, 3 * ForceNum)
  2118.                     BP.Parent = Targ
  2119.                    
  2120.                     local Ang = Instance.new("BodyAngularVelocity")
  2121.                     Ang.Parent = Targ
  2122.                    
  2123.                     Current.BP = BP
  2124.                     Current.BA = Ang
  2125.                    
  2126.                     OrigLS.Parent = nil
  2127.                     OrigRS.Parent = nil
  2128.                    
  2129.                     LS.Parent = Torso
  2130.                     RS.Parent = Torso
  2131.                    
  2132.                     LS.C0 = LS0
  2133.                     RS.C0 = RS0
  2134.                    
  2135.                     local DirDot = Mouse.UnitRay.Direction:Dot(Targ.Position - Mouse.Origin.p)
  2136.                     local BPPos = Vector3.new(0, 0, 0)
  2137.                     local Vel = Vector3.new(0, 0, 0)
  2138.                     local Vlev = random() * math.pi
  2139.                     local RPos = Vector3.new(random() * 2 - 1, cos(Vlev), random() * 2 - 1)
  2140.                    
  2141.                     local Ball = Instance.new("Part")
  2142.                     Ball.Name = "Ball"
  2143.                     Ball.FormFactor = "Custom"
  2144.                     Ball.Color = Color3.new(0, 1, 1)
  2145.                     Ball.Transparency = 0.3
  2146.                     Ball.Anchored = true
  2147.                     Ball.CanCollide = false
  2148.                     Ball.Locked = true
  2149.                     Ball.BottomSurface, Ball.TopSurface = "Smooth", "Smooth"
  2150.                     Ball.Size = Vector3.new(0.5, 0.5, 0.5)
  2151.                     Ball.CFrame = Torso.CFrame * CFrame.new(0, 1, -3)
  2152.                     Ball.Parent = Char
  2153.  
  2154.                     if Targ.Name == "MyPartV" then
  2155.                         Targ.Name = "MyPartF"
  2156.                     end
  2157.  
  2158.                     local LightMod = Instance.new("Model", Char)
  2159.                        
  2160.                     local Mesh = Instance.new("SpecialMesh")
  2161.                     Mesh.MeshType = "Sphere"
  2162.                     Mesh.Parent = Ball
  2163.                    
  2164.                     local Size = 0.5
  2165.                     local Rise = true
  2166.                    
  2167.                     while Grabbing and BP and Ang and Targ.Parent ~= nil do
  2168.                         local BPPos = Mouse.Origin.p + Mouse.UnitRay.Direction * DirDot
  2169.                         Ang.angularvelocity = Vel
  2170.                         BP.position = BPPos + RPos
  2171.                         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)))
  2172.                         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)))
  2173.                         Vlev = (Vlev + 0.05) % tau
  2174.                        
  2175.                         if Hum then
  2176.                             Hum.Sit = true
  2177.                         end
  2178.                        
  2179.                         if LA.Parent ~= nil and RA.Parent ~= nil then
  2180.                             local LPos = (LA.CFrame * CFrame.new(0, -1, 0)).p
  2181.                             local RPos = (RA.CFrame * CFrame.new(0, -1, 0)).p
  2182.                             if Rise == true then
  2183.                                 if Size < 0.6 then
  2184.                                     Size = Size + 0.05
  2185.                                 else
  2186.                                     Size = Size + 0.1
  2187.                                 end
  2188.                                 if Size >= 2.2 then
  2189.                                     Rise = false
  2190.                                 end
  2191.                             else
  2192.                                 if Size > 2.1 then
  2193.                                     Size = Size - 0.05
  2194.                                 else
  2195.                                     Size = Size - 0.1
  2196.                                 end
  2197.                                 if Size <= 0.5 then
  2198.                                     Rise = true
  2199.                                 end
  2200.                             end
  2201.                             Ball.Size = Vector3.new(Size, Size, Size)
  2202.                             Ball.CFrame = CFrame.new(LPos:Lerp(RPos, 0.5), Targ.Position) * CFrame.new(0, 0, -2.2)
  2203.                             LightNum = LightNum + 1
  2204.                             makeLightning(LightMod, Ball.Position, Targ.Position, 0.2, 4, 50, 1, LightNum)
  2205.                         elseif Ball.Parent ~= nil then
  2206.                             Ball:Destroy()
  2207.                         end
  2208.                        
  2209.                         if LS and LS.Parent == Torso then
  2210.                             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))
  2211.                         end
  2212.                         if RS and RS.Parent == Torso then
  2213.                             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))
  2214.                         end
  2215.                         RunService.Heartbeat:wait()
  2216.                     end
  2217.  
  2218.                     coroutine.resume(coroutine.create(function()
  2219.                         for i = 0.5, 1, 0.1 do
  2220.                             for i2,v in pairs(LightMod:GetChildren()) do
  2221.                                 --v.Light.Range = 6-(i*5)
  2222.                                 v.Transparency = i
  2223.                             end
  2224.                             wait(1/30)
  2225.                         end
  2226.                         LightMod:Destroy()
  2227.                     end))
  2228.                    
  2229.                     if BP and BP.Parent ~= nil then
  2230.                         BP:Destroy()
  2231.                     end
  2232.                    
  2233.                     if Ang and Ang.Parent ~= nil then
  2234.                         Ang:Destroy()
  2235.                     end
  2236.                    
  2237.                     pcall(function() Ball:Destroy() end)
  2238.                 end
  2239.             end)
  2240.         end))
  2241.     end)
  2242. end
  2243.  
  2244. function Add(Obj)
  2245.     if Obj:IsA("BasePart") and not Objects[Obj] and not (Obj.Name == "Base" and Obj.ClassName == "Part") then
  2246.         Objects[Obj] = Obj:GetMass()
  2247.         Obj.Changed:connect(function(P)
  2248.             if P:lower() == "size" and Objects[Obj] and Obj.Parent ~= nil then
  2249.                 Objects[Obj] = Obj:GetMass()
  2250.             end
  2251.         end)
  2252.     end
  2253. end
  2254.  
  2255. function Rem(Obj)
  2256.     if Objects[Obj] then
  2257.         Objects[Obj] = nil
  2258.     end
  2259. end
  2260.  
  2261. function Recursion(Obj)
  2262.     ypcall(function()
  2263.         Add(Obj)
  2264.         if #Obj:GetChildren() > 0 then
  2265.             for _,v in pairs(Obj:GetChildren()) do
  2266.                 Recursion(v)
  2267.             end
  2268.         end
  2269.     end)
  2270. end
  2271.  
  2272. Workspace.DescendantAdded:connect(function(Obj)
  2273.     Add(Obj)
  2274. end)
  2275.  
  2276. Workspace.DescendantRemoving:connect(function(Obj)
  2277.     Rem(Obj)
  2278. end)
  2279.  
  2280. for _,v in pairs(Workspace:GetChildren()) do
  2281.     Recursion(v)
  2282. end
  2283.  
  2284. Start()
  2285.  
  2286. if LP.Name == PlrName then
  2287.     LP.CharacterAdded:connect(Start)
  2288. end
  2289.  
  2290. local verlet = {}
  2291. verlet.step_time = 1 / 50
  2292. verlet.gravity = Vector3.new(0, -10, 0)
  2293.  
  2294. local char = game.Players.LocalPlayer.Character
  2295. local torso = char:WaitForChild("Torso")
  2296. local parts = {}
  2297. local render = game:GetService("RunService").RenderStepped
  2298.  
  2299. wait(2)
  2300.  
  2301. local point = {}
  2302. local link = {}
  2303. local rope = {}
  2304.  
  2305. local function ccw(A,B,C)
  2306.     return (C.y-A.y) * (B.x-A.x) > (B.y-A.y) * (C.x-A.x)
  2307. end
  2308.  
  2309. local function intersect(A,B,C,D)
  2310.     return ccw(A,C,D) ~= ccw(B,C,D) and ccw(A,B,C) ~= ccw(A,B,D)
  2311. end
  2312.  
  2313. local function vec2(v)
  2314.     return Vector2.new(v.x, v.z)
  2315. end
  2316.  
  2317. function point:step()
  2318.     if not self.fixed then
  2319.         local derivative = (self.position - self.last_position) * 0.95
  2320.         self.last_position = self.position
  2321.         self.position = self.position + derivative + (self.velocity * verlet.step_time ^ 2)
  2322.         --[[local torsoP = torso.CFrame * CFrame.new(-1, 0, 0.5)
  2323.         local torsoE = torso.CFrame * CFrame.new(1, 0, 0.5)
  2324.         local pointE = self.position + torso.CFrame.lookVector * 100
  2325.         local doIntersect = intersect(vec2(torsoP.p), vec2(torsoE.p), vec2(self.position), vec2(pointE))
  2326.         if not doIntersect then
  2327.             self.postition = self.position - torso.CFrame.lookVector * 10
  2328.         end]]
  2329.     end
  2330. end
  2331.  
  2332. function link:step()
  2333.     for i = 1, 1 do
  2334.         local distance = self.point1.position - self.point2.position
  2335.         local magnitude = distance.magnitude
  2336.         local differance = (self.length - magnitude) / magnitude
  2337.         local translation = ((self.point1.fixed or self.point2.fixed) and 1 or 0.6) * distance * differance
  2338.         if not self.point1.fixed then
  2339.             self.point1.position = self.point1.position + translation
  2340.         end
  2341.         if not self.point2.fixed then
  2342.             self.point2.position = self.point2.position - translation
  2343.         end
  2344.     end
  2345. end
  2346.  
  2347. function verlet.new(class, a, b, c)
  2348.     if class == "Point" then
  2349.         local new = {}
  2350.         setmetatable(new, {__index = point})
  2351.         new.class = class
  2352.         new.position = a or Vector3.new()
  2353.         new.last_position = new.position
  2354.         new.velocity = verlet.gravity
  2355.         new.fixed = false
  2356.         return new
  2357.     elseif class == "Link" then
  2358.         local new = {}
  2359.         setmetatable(new, {__index = link})
  2360.         new.class = class
  2361.         new.point1 = a
  2362.         new.point2 = b
  2363.         new.length = c or (a.position - b.position).magnitude
  2364.         return new
  2365.     elseif class == "Rope" then
  2366.         local new = {}
  2367.         setmetatable(new, {__index = link})
  2368.         new.class = class
  2369.         new.start_point = a
  2370.         new.finish_point = b
  2371.         new.points = {}
  2372.         new.links = {}
  2373.         local inc = (b - a) / 10
  2374.         for i = 0, 10 do
  2375.             table.insert(new.points, verlet.new("Point", a + (i * inc)))
  2376.         end
  2377.         for i = 2, #new.points do
  2378.             table.insert(new.links, verlet.new("Link", new.points[i - 1], new.points[i]))
  2379.         end
  2380.         return new
  2381.     end
  2382. end
  2383.  
  2384. local tris = {}
  2385. local triParts = {}
  2386.  
  2387. local function GetDiscoColor(hue)
  2388.  local section = hue % 1 * 3
  2389.  local secondary = 0.5 * math.pi * (section % 1)
  2390.  if section < 1 then
  2391.   return Color3.new(0, 0, 0)
  2392.  elseif section < 2 then
  2393.   return Color3.new(0, 0, 0)
  2394.  else
  2395.   return Color3.new(0, 0, 0)
  2396.  end
  2397. end
  2398.  
  2399. local function setupPart(part)
  2400.     part.Anchored = true
  2401.     part.FormFactor = 3
  2402.     part.CanCollide = false
  2403.     part.TopSurface = 10
  2404.     part.BottomSurface = 10
  2405.     part.LeftSurface = 10
  2406.     part.RightSurface = 10
  2407.     part.FrontSurface = 10
  2408.     part.BackSurface = 10
  2409.     part.Material = "Neon"
  2410.     local m = Instance.new("SpecialMesh", part)
  2411.     m.MeshType = "Wedge"
  2412.     m.Scale = Vector3.new(0.2, 1, 1)
  2413.     return part
  2414. end
  2415.  
  2416. local function CFrameFromTopBack(at, top, back)
  2417.     local right = top:Cross(back)
  2418.     return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x,  right.y, top.y, back.y, right.z, top.z, back.z)
  2419. end
  2420.  
  2421. local function drawTri(parent, a, b, c)
  2422.     local this = {}
  2423.     local mPart1 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  2424.     local mPart2 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  2425.     function this:Set(a, b, c)
  2426.         local ab, bc, ca = b-a, c-b, a-c
  2427.         local abm, bcm, cam = ab.magnitude, bc.magnitude, ca.magnitude
  2428.         local edg1 = math.abs(0.5 + ca:Dot(ab)/(abm*abm))
  2429.         local edg2 = math.abs(0.5 + ab:Dot(bc)/(bcm*bcm))
  2430.         local edg3 = math.abs(0.5 + bc:Dot(ca)/(cam*cam))
  2431.         if edg1 < edg2 then
  2432.             if edg1 >= edg3 then       
  2433.                 a, b, c = c, a, b
  2434.                 ab, bc, ca = ca, ab, bc
  2435.                 abm = cam
  2436.             end
  2437.         else
  2438.             if edg2 < edg3 then
  2439.                 a, b, c = b, c, a
  2440.                 ab, bc, ca = bc, ca, ab
  2441.                 abm = bcm
  2442.             else
  2443.                 a, b, c = c, a, b
  2444.                 ab, bc, ca = ca, ab, bc
  2445.                 abm = cam
  2446.             end
  2447.         end
  2448.      
  2449.         local len1 = -ca:Dot(ab)/abm
  2450.         local len2 = abm - len1
  2451.         local width = (ca + ab.unit*len1).magnitude
  2452.      
  2453.         local maincf = CFrameFromTopBack(a, ab:Cross(bc).unit, -ab.unit)
  2454.      
  2455.         if len1 > 0.2 then
  2456.             mPart1.Parent = parent
  2457.             mPart1.Size = Vector3.new(0.2, width, len1)
  2458.             mPart1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  2459.         else
  2460.             mPart1.Parent = nil
  2461.         end
  2462.        
  2463.         if len2 > 0.2 then
  2464.             mPart2.Parent = parent
  2465.             mPart2.Size = Vector3.new(0.2, width, len2)
  2466.             mPart2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  2467.         else
  2468.             mPart2.Parent = nil
  2469.         end
  2470.     end
  2471.     function this:SetProperty(prop, value)
  2472.         mPart1[prop] = value
  2473.         mPart2[prop] = value
  2474.     end
  2475.     this:Set(a, b, c)
  2476.     function this:Destroy()
  2477.         mPart1:Destroy()
  2478.         mPart2:Destroy()
  2479.     end
  2480.     this.p1 = mPart1
  2481.     this.p2 = mPart2
  2482.     this.p1.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p1.CFrame.Y * 0.5 + time())))
  2483.     this.p2.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p2.CFrame.Y * 0.5 + time())))
  2484.     return this
  2485. end
  2486.  
  2487. function verlet.draw(object, id)
  2488.     if object.class == "Point" then
  2489.         local part = parts[id]
  2490.         part.BrickColor = BrickColor.new(255, 0, 0)
  2491.         part.Transparency = 0
  2492.         part.formFactor = 3
  2493.         part.Anchored = true
  2494.         part.CanCollide = false
  2495.         part.TopSurface = 0
  2496.         part.BottomSurface = 0
  2497.         part.Size = Vector3.new(0.35, 0.35, 0.35)
  2498.         part.Material = "Neon"
  2499.         part.CFrame = CFrame.new(object.position)
  2500.         part.Parent = torso
  2501.         return part
  2502.     elseif object.class == "Link" then
  2503.         local part = parts[id]
  2504.         local dist = (object.point1.position - object.point2.position).magnitude
  2505.         part.Size = Vector3.new(0.2, 0.2, dist)
  2506.         part.CFrame = CFrame.new(object.point1.position, object.point2.position) * CFrame.new(0, 0, dist * -0.5)
  2507.         part.Parent = torso
  2508.         return part
  2509.     end
  2510. end
  2511.  
  2512. function verlet.clear()
  2513.     for _, v in pairs(workspace:GetChildren()) do
  2514.         if v.Name == "Part" then
  2515.             v:Destroy()
  2516.         end
  2517.     end
  2518. end
  2519.  
  2520. local points = {}
  2521. local links = {}
  2522.  
  2523. for x = 0, 2 do
  2524.     points[x] = {}
  2525.     for y = 0, 3 do
  2526.         points[x][y] = verlet.new("Point", torso.Position + Vector3.new(x * 0.8 - 2, 2 - y * 0.8, 5 + y * 0.4))
  2527.         points[x][y].fixed = y == 0
  2528.     end
  2529. end
  2530.  
  2531. for x = 1, 2 do
  2532.     for y = 0, 3 do
  2533.         links[#links + 1] = verlet.new("Link", points[x][y], points[x - 1][y], 1 + y * 0.08)
  2534.     end
  2535. end
  2536.  
  2537. for x = 0, 2 do
  2538.     for y = 1, 3 do
  2539.         links[#links + 1] = verlet.new("Link", points[x][y], points[x][y - 1], 1.2 + y * 0.03)
  2540.     end
  2541. end
  2542.  
  2543. render:connect(function()
  2544.     for x = 0, 2 do
  2545.         for y = 0, 3 do
  2546.             if y == 0 then
  2547.                 points[x][y].position = (torso.CFrame * CFrame.new(x * 1 - 1, 1, 0.5)).p
  2548.             else
  2549.                 points[x][y]:step()
  2550.             end
  2551.         end
  2552.     end
  2553.     for i = 1, #links do
  2554.         links[i]:step()
  2555.     end
  2556.     for i = 1, #tris do
  2557.         triParts[#triParts + 1] = tris[i].p1
  2558.         triParts[#triParts + 1] = tris[i].p2
  2559.     end
  2560.     tris = {}
  2561.     for x = 1, 2 do
  2562.         for y = 1, 3 do
  2563.             tris[#tris + 1] = drawTri(torso, points[x - 1][y - 1].position, points[x - 1][y].position, points[x][y - 1].position)
  2564.             tris[#tris + 1] = drawTri(torso, points[x][y].position, points[x - 1][y].position, points[x][y - 1].position)
  2565.         end
  2566.     end
  2567. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement