Advertisement
Gokussjg

Untitled

May 8th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 79.39 KB | None | 0 0
  1. -- K to bad time
  2. -- Q for gaster blaster
  3. -- E for power full gaster blaster to off badtime press k again?
  4. -- Left Click and hold on a player/object Fo telekinesis then press R to explode it :D
  5. -- Change "MRePotatoes" to your Username
  6. -- Used Sevral scripts to make this : http://pastebin.com/vrMBrtNj http://pastebin.com/VLuqGHpG http://pastebin.com/5gye0XCv http://pastebin.com/VLuqGHpG
  7.  
  8. --------------------------------------------------------
  9.  
  10. local PlrName = "MRePotatoes"
  11. pls = game:GetService'Players'
  12. rs = game:GetService'RunService'
  13. uinps = game:GetService'UserInputService'
  14. lp = pls.LocalPlayer
  15. mouse = lp:GetMouse()
  16. c = lp.Character
  17. human = c.Humanoid
  18. human.MaxHealth = 1000000
  19. wait()
  20. human.Health = 1000000
  21.  
  22. --------------------------------------------------------
  23.  
  24. Debounces = {
  25. AnimationCycles = 0;
  26. FPS = 0;
  27. scalingDamage = false;
  28. damageLevel = 0;
  29. attackNumber = 0;
  30. isAttacking = false;
  31. isMoving = false;
  32. isSprinting = false;
  33. isBoosting = false;
  34. isPassive = false;
  35. isTyping = false;
  36. }
  37.  
  38. --------------------------------------------------------
  39.  
  40. wait(0.1)
  41. local Plr = game.Players.LocalPlayer
  42. local PChar = Plr.Character
  43. local HeadID = "542459871"
  44. local TalkSoundID = "358280695"
  45. -- New Instances
  46. local BillGui = Instance.new("BillboardGui", game.Workspace)
  47. local Frame = Instance.new("Frame", BillGui)
  48. local ImageFace = Instance.new("ImageLabel", Frame)
  49. local TextDial = Instance.new("TextLabel", Frame)
  50. local TalkSound = Instance.new("Sound", BillGui)
  51. -- SetUp GUI
  52. BillGui.Size = UDim2.new(0, 200, 0, 52)
  53.  
  54. Frame.Position = UDim2.new(0, 0, 0, -50)
  55. Frame.Size = UDim2.new(0, 200, 0, 52)
  56. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  57. Frame.BorderColor3 = Color3.new(255, 255, 255)
  58.  
  59. ImageFace.BackgroundTransparency = 1
  60. ImageFace.Image = "http://www.roblox.com/asset/?id="..HeadID
  61. ImageFace.Size = UDim2.new(0, 50, 0, 52)
  62.  
  63. TextDial.Text = "* Lone!Sans Script !"
  64. TextDial.BackgroundTransparency = 1
  65. TextDial.Position = UDim2.new(0, 52, 0, 0)
  66. TextDial.Size = UDim2.new(0, 150, 0, 52)
  67. TextDial.TextColor3 = Color3.new(255, 255, 255)
  68.  
  69. TalkSound.SoundId = "http://www.roblox.com/asset/?id="..TalkSoundID
  70. TalkSound.Pitch = 1.5
  71.  
  72. Frame.Visible = true
  73.  
  74. wait(1)
  75.  
  76. BillGui.Parent = PChar.Head
  77. -- Chatted Function
  78. Plr.Chatted:connect(function(MSG)
  79. Frame.Visible = true
  80. TextDial.Text = "* "
  81. for i = 1,string.len(MSG) do wait(0.07)
  82. TextDial.Text = TextDial.Text..MSG:sub(i,i)
  83.  
  84.  
  85. TalkSound:Play()
  86. end
  87. end)
  88.  
  89. --------------------------------------------------------
  90.  
  91. numLerp = function(start, goal, alpha)
  92. return(((goal - start) * alpha) + start)
  93. end
  94.  
  95. CFrameZero = function()
  96. return CFrame.new(Vector3.new())
  97. end
  98.  
  99. rad = function(value)
  100. return math.rad(value)
  101. end
  102.  
  103. CFAngles = function(Vector)
  104. return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z))
  105. end
  106.  
  107. --------------------------------------------------------
  108.  
  109. AnimStat = {
  110. lerpSpeed = .2;
  111. lerpSpeed2 = .35;
  112. lerpTween = 0;
  113. }
  114.  
  115. Joints = {
  116. c.HumanoidRootPart.RootJoint;
  117. c.Torso.Neck;
  118. c.Torso['Left Shoulder'];
  119. c.Torso['Right Shoulder'];
  120. c.Torso['Left Hip'];
  121. c.Torso['Right Hip'];
  122. }
  123.  
  124. JointTargets = {
  125. CFrameZero();
  126. CFrameZero();
  127. CFrameZero();
  128. CFrameZero();
  129. CFrameZero();
  130. CFrameZero();
  131. }
  132.  
  133. --------------------------------------------------------
  134. local shirt=c:FindFirstChild'Shirt'or Instance.new('Shirt',c);
  135. local pants=c:FindFirstChild'Pants'or Instance.new('Pants',c);
  136.  
  137.  
  138. --shirt.ShirtTemplate='rbxassetid://542913615';
  139. pants.PantsTemplate='rbxassetid://335237283';
  140.  
  141.  
  142. --------------------------------------------------------
  143.  
  144. prepareCharacter = function()
  145. local transPoints = {
  146. NumberSequenceKeypoint.new(0,.819,.0375),
  147. NumberSequenceKeypoint.new(.207,.594,.0187),
  148. NumberSequenceKeypoint.new(.4,.55,.031),
  149. NumberSequenceKeypoint.new(.57,.619,.05),
  150. NumberSequenceKeypoint.new(.76,.8,.0375),
  151. NumberSequenceKeypoint.new(1,1,0),
  152. }
  153. local sizePoints = {
  154. NumberSequenceKeypoint.new(0,.687,0),
  155. NumberSequenceKeypoint.new(.111,.875,0),
  156. NumberSequenceKeypoint.new(.327,1.19,0),
  157. NumberSequenceKeypoint.new(.646,1.56,0),
  158. NumberSequenceKeypoint.new(.805,1.37,0),
  159. NumberSequenceKeypoint.new(.905,1.06,0),
  160. NumberSequenceKeypoint.new(.968,.938,0),
  161. NumberSequenceKeypoint.new(.984,1.13,0),
  162. NumberSequenceKeypoint.new(1,1.62,0),
  163. }
  164. local Size = NumberSequence.new(sizePoints)
  165. local Transparency = NumberSequence.new(transPoints)
  166. rayModel = Instance.new("Model",c)
  167. efxBlock = Instance.new("Part",c)
  168. efxBlock.BrickColor = BrickColor.new("Toothpaste")
  169. efxBlock.Material = "Neon"
  170. efxBlock.FormFactor = "Custom"
  171. efxBlock.Transparency = .3
  172. efxBlock.Size = Vector3.new(.3,.3,.3)
  173. local mesh = Instance.new("SpecialMesh",efxBlock)
  174. mesh.MeshType = Enum.MeshType.Sphere
  175. mesh.Scale = Vector3.new(1,1,1)
  176. light = Instance.new("PointLight",c.Head)
  177. light.Range = 30
  178. light.Color = Color3.new(200/255,0,0)
  179. light.Shadows = false
  180. local particles = Instance.new("ParticleEmitter",efxBlock)
  181. particles.Color = ColorSequence.new(Color3.new(255,255,255),Color3.new(0,0,0))
  182. particles.LightEmission = 0
  183. particles.Size = Size
  184. particles.Name = "Fire"
  185. particles.Transparency = Transparency
  186. particles.LockedToPart = true
  187. particles.VelocityInheritance = 5
  188. particles.LockedToPart = true
  189. particles.Rate = 330
  190. particles.Texture = "rbxassetid://56561915"
  191. particles.Lifetime = NumberRange.new(4,4)
  192. particles.RotSpeed = NumberRange.new(200,200)
  193. particles.Speed = NumberRange.new(6,6)
  194. script.Parent = efxBlock
  195. fire = particles
  196. local offset = Vector3.new(-0.11, .23, -0.5)
  197. local weld = Instance.new("Weld",c.Head)
  198. weld.Part0 = c.Head
  199. weld.Part1 = efxBlock
  200. weld.C0 = CFrame.new(offset) * CFrame.Angles(math.rad(-40),math.rad(10),math.rad(40))
  201. efxBlock.Parent = c
  202. local music = Instance.new("Sound",c)
  203. music.SoundId = "rbxassetid://316012176"
  204. music.Looped = true
  205. music.Volume = 1.5
  206. fight = music
  207. local music2 = Instance.new("Sound",c)
  208. music2.SoundId = "rbxassetid://403170171"
  209. music2.Looped = true
  210. music2.Volume = 1.5
  211. sans = music2
  212. pointGyro = Instance.new("BodyGyro",c.HumanoidRootPart)
  213. pointGyro.P = 1e7
  214. pointGyro.D = 1e3
  215. pointGyro.MaxTorque = Vector3.new(0,1e7,0)
  216. animator = c.Humanoid:FindFirstChild("Animator")
  217. if animator then
  218. animator:Destroy()
  219. end
  220. c.Torso.roblox:Destroy()
  221. for i,v in pairs (c.Head:children()) do
  222. if v.ClassName == "Sound" then
  223. v:Destroy()
  224. end
  225. end
  226. for i = 1,#Joints do
  227. Joints[i].C1 = CFrame.new(Vector3.new())
  228. end
  229. human.WalkSpeed = 50
  230. human.JumpPower = 50
  231. end
  232.  
  233. uinps.InputBegan:connect(function(InputObject)
  234. if InputObject.KeyCode == Enum.KeyCode.K and Debounces.isTyping == false then
  235. Debounces.isPassive = not Debounces.isPassive
  236. end
  237. end)
  238.  
  239. setJointCFrames = function(table)
  240. for i = 1,#table do
  241. JointTargets[i] = table[i]
  242. end
  243. AnimationCycles = 0
  244. end
  245.  
  246. setLerp = function(speed)
  247. AnimStat.lerpSpeed = speed
  248. end
  249.  
  250. setTween = function(tween)
  251. AnimStat.lerpTween = tween
  252. end
  253.  
  254. takeDamage = function(position,damage,distance,platformStand)
  255. for i,v in pairs (pls:children()) do
  256. if v.ClassName == "Player" and v:FindFirstChild("Character") then
  257. local torso = v.Character:FindFirstChild("Torso")
  258. if torso and (torso.Position - position).magnitude < distance then
  259. v.Character.Humanoid:TakeDamage(damage)
  260. if platformStand == true then
  261. v.Character.PlatformStand = platformStand
  262. end
  263. end
  264. end
  265. end
  266. end
  267.  
  268. --------------------------------------------------------
  269.  
  270. prepareCharacter()
  271.  
  272. --------------------------------------------------------
  273.  
  274. spawn(function()
  275. local sine = 0
  276. while wait() do
  277. pointGyro.CFrame = CFrame.new(Vector3.new(),(mouse.Hit.p - c.HumanoidRootPart.CFrame.p).unit * 100)
  278. if Debounces.isAttacking == false and Debounces.isMoving == false and Debounces.isBoosting == false then
  279. setLerp(.1)
  280. if Debounces.isPassive == true then
  281. setJointCFrames({
  282. CFrame.new(Vector3.new(0, -0.901 + math.sin(tick() * 1.5)/45, 0)) * CFAngles(Vector3.new(-22.001, 0, 0));
  283. CFrame.new(Vector3.new(-0.001, 1.52 + math.sin(tick() * -1.5)/35, math.sin(tick() * 1.5)/35)) * CFAngles(Vector3.new(-10.861 + math.sin((-tick() + 2) * 1.5) * 5, 13.765, -1.658));
  284. CFrame.new(Vector3.new(-1.5, -0.1 + math.sin(tick() * 1.5)/15, -0.801)) * CFAngles(Vector3.new(44.999, 0, 0));
  285. CFrame.new(Vector3.new(1.7, 0.2 + math.sin(tick() * 1.5)/15, 0.199)) * CFAngles(Vector3.new(-15.001, -15.001, 15));
  286. CFrame.new(Vector3.new(-0.7, -1.8, 0.6)) * CFAngles(Vector3.new(-59.511, 3.84, 0.489));
  287. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, -0.001));
  288. })
  289. else
  290. setJointCFrames({
  291. CFrame.new(Vector3.new(0, 0 + math.sin(tick() * 1.5)/25, 0)) * CFAngles(Vector3.new(0, 0, 0));
  292. CFrame.new(Vector3.new(0, 1.5 + math.sin(tick() * -1.5)/35, math.sin(tick() * 1.5)/35)) * CFAngles(Vector3.new(1.554 + math.sin((-tick() + 2) * 1.5) * 5, -0.001, -0.001));
  293. CFrame.new(Vector3.new(-1.06, -0.03 + math.sin(tick() * 1.5)/25, 0.449)) * CFAngles(Vector3.new(-29.511, 0, 29.51));
  294. CFrame.new(Vector3.new(1.059, -0.031 + math.sin(tick() * 1.5)/25, 0.449)) * CFAngles(Vector3.new(-29.511, -3.842, -29.511));
  295. CFrame.new(Vector3.new(-0.49, -2, -0.05/1.5)) * CFAngles(Vector3.new(0, 8.885, 0));
  296. CFrame.new(Vector3.new(0.49, -2, -0.05/1.5)) * CFAngles(Vector3.new(-0.001, -8.886, 0));
  297. })
  298. end
  299. elseif Debounces.isAttacking == false and Debounces.isMoving == true and Debounces.isBoosting == false then
  300. sine = sine + math.rad(12)
  301. human.WalkSpeed = 30
  302. setLerp(.15)
  303. setJointCFrames({
  304. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, math.sin(sine) * -2.5, 0));
  305. CFrame.new(Vector3.new(0, 1.499, -0.04)) * CFAngles(Vector3.new(-5.676, -0.001 - math.sin(sine) * 3, -0.001));
  306. CFrame.new(Vector3.new(-1.97, 0 + math.sin(sine + .5)/20, 0.1 + math.sin(-sine)/2)/1.3) * CFAngles(Vector3.new(-5 + math.sin(sine) * 23, 0, 0));
  307. CFrame.new(Vector3.new(1.97, 0 - math.sin(sine + .5)/20, 0.1 + math.sin(sine)/2)/1.3) * CFAngles(Vector3.new(-5 + math.sin(-sine) * 23, 0, 0));
  308. CFrame.new(Vector3.new(-0.5, -1.93 - math.cos(sine)/8.7, 0.2 + math.sin(sine)/2)) * CFAngles(Vector3.new(-15 + math.sin(-sine) * 30, 0, 0));
  309. CFrame.new(Vector3.new(0.5, -1.93 + math.cos(sine)/8.7, 0.2 + math.sin(-sine)/2)) * CFAngles(Vector3.new(-15 + math.sin(sine) * 30, 0, 0));
  310. })
  311. end
  312. if Debounces.scalingDamage == true then
  313. takeDamage(c.HumanoidRootPart.Position,Debounces.damageLevel,8,true)
  314. end
  315. end
  316. end)
  317.  
  318. human.Changed:connect(function(prop)
  319. if prop == "MoveDirection" then
  320. if human.MoveDirection.magnitude > .02 then
  321. Debounces.isMoving = true
  322. else
  323. Debounces.isMoving = false
  324. end
  325. end
  326. end)
  327.  
  328. uinps.InputBegan:connect(function(InputObject)
  329. if InputObject.KeyCode == Enum.KeyCode.A and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  330. Debounces.isBoosting = true
  331. Debounces.damageLevel = 10
  332. Debounces.scalingDamage = true
  333. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  334. setLerp(.15)
  335. setJointCFrames({
  336. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, 20));
  337. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-10.372, 28.758, -1.837));
  338. CFrame.new(Vector3.new(-0.7, -0.2, -0.801)) * CFAngles(Vector3.new(45, 0, 45));
  339. CFrame.new(Vector3.new(1.7, 0.2, 0.199)) * CFAngles(Vector3.new(-15.001, -15.001, 45));
  340. CFrame.new(Vector3.new(-0.3, -2, 0.2)) * CFAngles(Vector3.new(-11.283, -17.801, 19.495));
  341. CFrame.new(Vector3.new(0.9, -2, -0.201)) * CFAngles(Vector3.new(15, -15, 29.999));
  342. })
  343. local boostSpeed = 250
  344. local efx = Instance.new("Sound",c.Head)
  345. efx.SoundId = "rbxassetid://200632875"
  346. efx.Pitch = math.random(1100,1300)/1000
  347. efx.Volume = .5
  348. efx:Play()
  349. spawn(function()
  350. wait(5)
  351. efx:Destroy()
  352. end)
  353. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(1,0,0)).p).unit * boostSpeed
  354. vel.P = 1e3
  355. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  356. wait(.15)
  357. vel.P = 1000
  358. vel.MaxForce = Vector3.new(3000,0,3000)
  359. vel.Velocity = Vector3.new()
  360. wait(.3)
  361. setLerp(.3)
  362. setJointCFrames({
  363. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, 13));
  364. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-30.239, 42.47, 11.879));
  365. CFrame.new(Vector3.new(-1.9, -0.2, -0.401)) * CFAngles(Vector3.new(44.999, 0, -45));
  366. CFrame.new(Vector3.new(1.5, 0.4, 0.599)) * CFAngles(Vector3.new(-62.058, -21.088, -15.383));
  367. CFrame.new(Vector3.new(-0.7, -1.8, 0.6)) * CFAngles(Vector3.new(-59.239, -26.158, -14.457));
  368. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(-0.505, -14.478, -18.968));
  369. })
  370. wait(.2)
  371. vel:Destroy()
  372. Debounces.damageLevel = 0
  373. Debounces.scalingDamage = false
  374. Debounces.isBoosting = false
  375. end
  376. end)
  377.  
  378. uinps.InputBegan:connect(function(InputObject)
  379. if InputObject.KeyCode == Enum.KeyCode.D and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  380. Debounces.isBoosting = true
  381. Debounces.damageLevel = 10
  382. Debounces.scalingDamage = true
  383. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  384. setLerp(.15)
  385. setJointCFrames({
  386. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, -15));
  387. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-13.603, -45.662, -6.645));
  388. CFrame.new(Vector3.new(-1.9, 0, -0.201)) * CFAngles(Vector3.new(31.935, -7.436, -60.853));
  389. CFrame.new(Vector3.new(1.9, 0, 0.399)) * CFAngles(Vector3.new(-3.644, -23.448, 59.102));
  390. CFrame.new(Vector3.new(-1.1, -1.8, 0)) * CFAngles(Vector3.new(-3.616, -11.936, -29.566));
  391. CFrame.new(Vector3.new(0.1, -1.6, -0.601)) * CFAngles(Vector3.new(1.943, -7.181, -32.528));
  392. })
  393. local boostSpeed = 250
  394. local efx = Instance.new("Sound",c.Head)
  395. efx.SoundId = "rbxassetid://200632875"
  396. efx.Pitch = math.random(1100,1300)/1000
  397. efx.Volume = .5
  398. efx:Play()
  399. spawn(function()
  400. wait(5)
  401. efx:Destroy()
  402. end)
  403. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(-1,0,0)).p).unit * boostSpeed
  404. vel.P = 1e3
  405. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  406. wait(.15)
  407. vel.P = 1000
  408. vel.MaxForce = Vector3.new(3000,0,3000)
  409. vel.Velocity = Vector3.new()
  410. wait(.3)
  411. setLerp(.3)
  412. setJointCFrames({
  413. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, -13));
  414. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-12.936, -46.206, -2.327));
  415. CFrame.new(Vector3.new(-1.9, 0.2, -0.201)) * CFAngles(Vector3.new(45, 0, -60));
  416. CFrame.new(Vector3.new(1.7, 0, -0.401)) * CFAngles(Vector3.new(14.035, -5.69, 35.342));
  417. CFrame.new(Vector3.new(-0.3, -1.8, 0.6)) * CFAngles(Vector3.new(-55.479, -10.612, 15.729));
  418. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, 14.999));
  419. })
  420. wait(.2)
  421. vel:Destroy()
  422. Debounces.damageLevel = 0
  423. Debounces.scalingDamage = false
  424. Debounces.isBoosting = false
  425. end
  426. end)
  427.  
  428. uinps.InputBegan:connect(function(InputObject)
  429. if InputObject.KeyCode == Enum.KeyCode.W and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  430. Debounces.isBoosting = true
  431. Debounces.damageLevel = 10
  432. Debounces.scalingDamage = true
  433. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  434. setLerp(.15)
  435. setJointCFrames({
  436. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-40.001, 0, 5));
  437. CFrame.new(Vector3.new(-0.001, 1.429, 0.2)) * CFAngles(Vector3.new(25.141, -8.347, 0.878));
  438. CFrame.new(Vector3.new(-1.5, 0, .101)) * CFAngles(Vector3.new(14.999, -0.001, 0));
  439. CFrame.new(Vector3.new(1.7, 0.199, -0.401)) * CFAngles(Vector3.new(28.08, -0.358, 21.087));
  440. CFrame.new(Vector3.new(-0.5, -1.8, 0.6)) * CFAngles(Vector3.new(-29.448, 3.57, -1.5));
  441. CFrame.new(Vector3.new(0.499, -1.6, -0.401)) * CFAngles(Vector3.new(-0.505, -14.478, -3.968));
  442. })
  443. local boostSpeed = 250
  444. local efx = Instance.new("Sound",c.Head)
  445. efx.SoundId = "rbxassetid://200632875"
  446. efx.Pitch = math.random(1100,1300)/1000
  447. efx.Volume = .5
  448. efx:Play()
  449. spawn(function()
  450. wait(5)
  451. efx:Destroy()
  452. end)
  453. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,1)).p).unit * boostSpeed
  454. vel.P = 1e3
  455. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  456. wait(.15)
  457. vel.P = 1000
  458. vel.MaxForce = Vector3.new(3000,0,3000)
  459. vel.Velocity = Vector3.new()
  460. wait(.3)
  461. setLerp(.3)
  462. setJointCFrames({
  463. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 40, -13));
  464. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-12.936, -46.206, -2.327));
  465. CFrame.new(Vector3.new(-1.9, 0.2, -0.201)) * CFAngles(Vector3.new(45, 0, -60));
  466. CFrame.new(Vector3.new(1.7, 0, -0.401)) * CFAngles(Vector3.new(14.035, -5.69, 35.342));
  467. CFrame.new(Vector3.new(-0.3, -1.8, 0.6)) * CFAngles(Vector3.new(-55.479, -10.612, 15.729));
  468. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, 14.999));
  469. })
  470. wait(.2)
  471. vel:Destroy()
  472. Debounces.damageLevel = 0
  473. Debounces.scalingDamage = false
  474. Debounces.isBoosting = false
  475. end
  476. end)
  477.  
  478. uinps.InputBegan:connect(function(InputObject)
  479. if InputObject.KeyCode == Enum.KeyCode.S and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  480. Debounces.isBoosting = true
  481. Debounces.damageLevel = 10
  482. Debounces.scalingDamage = true
  483. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  484. setLerp(.15)
  485. setJointCFrames({
  486. CFrame.new(Vector3.new(0, -.3, 0)) * CFAngles(Vector3.new(15, 0, 0));
  487. CFrame.new(Vector3.new(-0.001, 1.52, -0.03)) * CFAngles(Vector3.new(-5.298, -1.305, -4.093));
  488. CFrame.new(Vector3.new(-1.7, 0, -0.201)) * CFAngles(Vector3.new(12.112, -6.562, -16.939));
  489. CFrame.new(Vector3.new(1.7, 0, -0.201)) * CFAngles(Vector3.new(8.817, 8.378, 20.465));
  490. CFrame.new(Vector3.new(-0.7, -1.8, 0.2)) * CFAngles(Vector3.new(-14.432, 3.06, -2.373));
  491. CFrame.new(Vector3.new(0.5, -1.8, -0.201)) * CFAngles(Vector3.new(-0.505, -14.478, -3.968));
  492. })
  493. local boostSpeed = 150
  494. local boostSpeed = 250
  495. local efx = Instance.new("Sound",c.Head)
  496. efx.SoundId = "rbxassetid://200632875"
  497. efx.Pitch = math.random(1100,1300)/1000
  498. efx.Volume = .5
  499. efx:Play()
  500. spawn(function()
  501. wait(5)
  502. efx:Destroy()
  503. end)
  504. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-1)).p).unit * boostSpeed
  505. vel.P = 1e3
  506. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  507. wait(.15)
  508. vel.P = 1000
  509. vel.MaxForce = Vector3.new(3000,0,3000)
  510. vel.Velocity = Vector3.new()
  511. wait(.3)
  512. setLerp(.3)
  513. setJointCFrames({
  514. CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(4, 0, 0));
  515. CFrame.new(Vector3.new(-0.001, 1.52, -0.03)) * CFAngles(Vector3.new(-20.081, 28.752, 3.598));
  516. CFrame.new(Vector3.new(-1.7, 0.2, -0.601)) * CFAngles(Vector3.new(59.51, -3.841, -14.511));
  517. CFrame.new(Vector3.new(1.7, 0.2, 0.399)) * CFAngles(Vector3.new(-47.597, -13.104, 17.887));
  518. CFrame.new(Vector3.new(-0.7, -1.4, 0.2)) * CFAngles(Vector3.new(-44.477, 3.836, -0.524));
  519. CFrame.new(Vector3.new(0.5, -1.4, -0.601)) * CFAngles(Vector3.new(-15.868, -12.953, -7.631));
  520. })
  521. wait(.2)
  522. vel:Destroy()
  523. Debounces.damageLevel = 0
  524. Debounces.scalingDamage = false
  525. Debounces.isBoosting = false
  526. end
  527. end)
  528.  
  529. uinps.InputBegan:connect(function(InputObject)
  530. if InputObject.KeyCode == Enum.KeyCode.Q and Debounces.isAttacking == false and Debounces.isSprinting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  531. local isLooping = true
  532. uinps.InputEnded:connect(function(InputObject2)
  533. if InputObject2.KeyCode == Enum.KeyCode.Q then
  534. isLooping = false
  535. end
  536. end)
  537. while true do
  538. if isLooping == false then
  539. break
  540. end
  541. Debounces.attackNumber = Debounces.attackNumber + 1
  542. local aimPos = mouse.Hit.p
  543. local head = Instance.new("Part",c)
  544. head.Size = Vector3.new(12,.2,12)
  545. head.CanCollide = false
  546. head.Anchored = true
  547. head.Transparency = 1
  548. for i = 1,2 do
  549. local decal = Instance.new("Decal",head)
  550. decal.Texture = "http://www.roblox.com/asset/?id=345703176"
  551. if i == 1 then
  552. decal.Face = Enum.NormalId.Top
  553. else
  554. decal.Face = Enum.NormalId.Bottom
  555. end
  556. end
  557. if Debounces.attackNumber%2 == 1 then
  558. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(8,8,.5)).p,aimPos)
  559. else
  560. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(-8,8,.5)).p,aimPos)
  561. end
  562. spawn(function()
  563. local timer = 0
  564. while rs.RenderStepped:wait() do
  565. if timer >= 1.55 then
  566. break
  567. end
  568. head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60)))
  569. timer = timer + 1/30/(Debounces.FPS/60)
  570. end
  571. head.CFrame = CFrame.new(head.CFrame.p,aimPos)
  572. local ray = Ray.new(head.CFrame.p,(aimPos - head.CFrame.p).unit * 999)
  573. local hit, pos = workspace:FindPartOnRay(ray,c)
  574. local dis = (head.CFrame.p - pos).magnitude
  575. local rayPart = Instance.new("Part",rayModel)
  576. rayPart.Material = "Neon"
  577. rayPart.FormFactor = "Custom"
  578. rayPart.BrickColor = BrickColor.new(1,0,0)
  579. rayPart.Anchored = true
  580. rayPart.CanCollide = false
  581. rayPart.Size = Vector3.new(21,21,dis + 400)
  582. local rayCFrame = CFrame.new(head.CFrame.p + (aimPos - head.CFrame.p).unit * (dis/2 + 200),head.CFrame.p + (aimPos - head.CFrame.p).unit * dis * 2)
  583. rayPart.CFrame = rayCFrame
  584. head:Destroy()
  585. end)
  586. wait()
  587. local s = Instance.new("Sound",head)
  588. s.Volume = .5
  589. s.SoundId = "rbxassetid://332223043"
  590. s:Play()
  591. wait(.04)
  592. end
  593. end
  594. end)
  595.  
  596. uinps.InputBegan:connect(function(InputObj)
  597. if InputObj.KeyCode == Enum.KeyCode.E and Debounces.isAttacking == false and Debounces.isSprinting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  598. Debounces.isAttacking = true
  599. local aimPos = c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-999)).p
  600. local head = Instance.new("Part",c)
  601. head.Size = Vector3.new(18,.2,18)
  602. head.CanCollide = false
  603. head.Anchored = true
  604. head.CFrame = CFrame.new(c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-9)).p,aimPos)
  605. head.Transparency = 1
  606. for i = 1,2 do
  607. local decal = Instance.new("Decal",head)
  608. decal.Texture = "http://www.roblox.com/asset/?id=345703176"
  609. if i == 1 then
  610. decal.Face = Enum.NormalId.Top
  611. else
  612. decal.Face = Enum.NormalId.Bottom
  613. end
  614. end
  615. setLerp(.1)
  616. setJointCFrames({
  617. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, 0, 0));
  618. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, -0.001, -0.001));
  619. CFrame.new(Vector3.new(-1.7, 0, 0)) * CFAngles(Vector3.new(-12.808, -28.88, -21.502));
  620. CFrame.new(Vector3.new(1.699, 1.2, 0.599)) * CFAngles(Vector3.new(-146.606, 16.571, 13.928));
  621. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-60, 0, -0.001));
  622. CFrame.new(Vector3.new(0.5, -1.4, -0.4)) * CFAngles(Vector3.new(-15.001, -15.001, 0));
  623. })
  624. spawn(function()
  625. local timer = 0
  626. while rs.RenderStepped:wait() do
  627. if timer >= 1.55/.8 then
  628. break
  629. end
  630. head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60)))
  631. timer = timer + 1/30/(Debounces.FPS/60)
  632. end
  633. head.CFrame = CFrame.new(head.CFrame.p,aimPos)
  634. local ray = Ray.new(head.CFrame.p,(aimPos - head.CFrame.p).unit * 999)
  635. local hit, pos = workspace:FindPartOnRay(ray,c)
  636. local dis = (head.CFrame.p - pos).magnitude
  637. local rayPart = Instance.new("Part",rayModel)
  638. rayPart.Material = "Neon"
  639. rayPart.FormFactor = "Custom"
  640. rayPart.Name = "Punch"
  641. rayPart.BrickColor = BrickColor.new(1,0,0)
  642. rayPart.Anchored = true
  643. rayPart.CanCollide = false
  644. rayPart.Size = Vector3.new(56,56,dis + 400)
  645. local rayCFrame = CFrame.new(head.CFrame.p + (aimPos - head.CFrame.p).unit * (dis/2 + 200),head.CFrame.p + (aimPos - head.CFrame.p).unit * dis * 2)
  646. rayPart.CFrame = rayCFrame
  647. head:Destroy()
  648. end)
  649. wait()
  650. local s = Instance.new("Sound",head)
  651. s.Volume = 1
  652. s.SoundId = "rbxassetid://332223043"
  653. s.Pitch = .8
  654. s:Play()
  655. wait(.75)
  656. setLerp(.17)
  657. setJointCFrames({
  658. CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(-20, 15, 0));
  659. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, 14.999, -0.001));
  660. CFrame.new(Vector3.new(-1.7, 0, 0.2)) * CFAngles(Vector3.new(-33.928, -4.374, -38.76));
  661. CFrame.new(Vector3.new(1.499, 0.4, -0.601)) * CFAngles(Vector3.new(74.335, 25.091, -6.155));
  662. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-45, 0, -0.001));
  663. CFrame.new(Vector3.new(0.5, -1.8, -0.4)) * CFAngles(Vector3.new(-15, -15, 0));
  664. })
  665. wait(.5)
  666. Debounces.isAttacking = false
  667. end
  668. end)
  669.  
  670. reflect = function(d,n)
  671. local i, n = -1 * d.unit, n.unit
  672. local dot = n:Dot(i)
  673. return 2*dot*n - i
  674. end
  675.  
  676. makeReflectionBeam = function(pos,look,isCrit)
  677. local ray = Ray.new(pos,look)
  678. local hit,hitpos,norm = workspace:FindPartOnRay(ray,c)
  679. local e = Instance.new("Part",rayModel)
  680. e.Anchored = true
  681. e.CanCollide = false
  682. e.BrickColor = BrickColor.new("Toothpaste")
  683. e.Material = "Neon"
  684. e.FormFactor = "Custom"
  685. e.Size = Vector3.new(6,6,(pos - hitpos).magnitude)
  686. if isCrit == true then
  687. e.Size = Vector3.new(16,16,(pos - hitpos).magnitude)
  688. e.Name = "Punch"
  689. end
  690. e.CFrame = CFrame.new(pos + (hitpos - pos)/2, pos)
  691. local e = Instance.new("Sound",c)
  692. if isCrit == true then
  693. e.Volume = .5
  694. else
  695. e.Volume = .5
  696. e.Pitch = 1.5
  697. end
  698. e.SoundId = "rbxassetid://200632875"
  699. e:Play()
  700. spawn(function()
  701. wait(6)
  702. e:Destroy()
  703. end)
  704. wait(.05)
  705. if hit ~= nil then
  706. newDir = reflect(look.unit,norm,isCrit)
  707. makeReflectionBeam(hitpos,newDir * 999,isCrit)
  708. end
  709. end
  710.  
  711. uinps.InputBegan:connect(function(InputObject)
  712. if InputObject.KeyCode == Enum.KeyCode.Q and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isPassive == true and Debounces.isTyping == false then
  713. local isLooping = true
  714. uinps.InputEnded:connect(function(InputObject2)
  715. if InputObject2.KeyCode == Enum.KeyCode.Q then
  716. isLooping = false
  717. end
  718. end)
  719. while true do
  720. if isLooping == false then
  721. break
  722. end
  723. Debounces.attackNumber = Debounces.attackNumber + 1
  724. local aimPos = mouse.Hit.p
  725. local head = Instance.new("Part",c)
  726. head.Size = Vector3.new(12,.2,12)
  727. head.CanCollide = false
  728. head.Anchored = true
  729. head.Transparency = 1
  730. for i = 1,2 do
  731. local decal = Instance.new("Decal",head)
  732. decal.Texture = "http://www.roblox.com/asset/?id=345703176"
  733. if i == 1 then
  734. decal.Face = Enum.NormalId.Top
  735. else
  736. decal.Face = Enum.NormalId.Bottom
  737. end
  738. end
  739. if Debounces.attackNumber%2 == 1 then
  740. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(8,8,.5)).p,aimPos)
  741. else
  742. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(-8,8,.5)).p,aimPos)
  743. end
  744. spawn(function()
  745. local timer = 0
  746. while rs.RenderStepped:wait() do
  747. if timer >= 1.55 then
  748. break
  749. end
  750. head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60)))
  751. timer = timer + 1/30/(Debounces.FPS/60)
  752. end
  753. head.CFrame = CFrame.new(head.CFrame.p,aimPos)
  754. head:Destroy()
  755. makeReflectionBeam(head.CFrame.p,(head.CFrame.p - aimPos).unit * -999,false)
  756. end)
  757.  
  758. wait()
  759. local s = Instance.new("Sound",head)
  760. s.Volume = 1
  761. s.SoundId = "rbxassetid://332223043"
  762. s.Pitch = 1.02
  763. s:Play()
  764. wait(.2)
  765. end
  766. end
  767. end)
  768.  
  769. uinps.InputBegan:connect(function(InputObj)
  770. if InputObj.KeyCode == Enum.KeyCode.E and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isPassive == true and Debounces.isTyping == false then
  771. Debounces.isAttacking = true
  772. local aimPos = c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-999)).p
  773. local head = Instance.new("Part",c)
  774. head.Size = Vector3.new(18,.2,18)
  775. head.CanCollide = false
  776. head.Anchored = true
  777. head.CFrame = CFrame.new(c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-9)).p,aimPos)
  778. head.Transparency = 1
  779. for i = 1,2 do
  780. local decal = Instance.new("Decal",head)
  781. decal.Texture = "http://www.roblox.com/asset/?id=345703176"
  782. if i == 1 then
  783. decal.Face = Enum.NormalId.Top
  784. else
  785. decal.Face = Enum.NormalId.Bottom
  786. end
  787. end
  788. setLerp(.1)
  789. setJointCFrames({
  790. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, 0, 0));
  791. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, -0.001, -0.001));
  792. CFrame.new(Vector3.new(-1.7, 0, 0)) * CFAngles(Vector3.new(-12.808, -28.88, -21.502));
  793. CFrame.new(Vector3.new(1.699, 1.2, 0.599)) * CFAngles(Vector3.new(-146.606, 16.571, 13.928));
  794. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-60, 0, -0.001));
  795. CFrame.new(Vector3.new(0.5, -1.4, -0.4)) * CFAngles(Vector3.new(-15.001, -15.001, 0));
  796. })
  797. spawn(function()
  798. local timer = 0
  799. while rs.RenderStepped:wait() do
  800. if timer >= 1.55/.8 then
  801. break
  802. end
  803. head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60)))
  804. timer = timer + 1/30/(Debounces.FPS/60)
  805. end
  806. head.CFrame = CFrame.new(head.CFrame.p,aimPos)
  807. head:Destroy()
  808. makeReflectionBeam(head.CFrame.p,(head.CFrame.p - aimPos).unit * -999,true)
  809. end)
  810. wait()
  811. local s = Instance.new("Sound",head)
  812. s.Volume = 1
  813. s.SoundId = "rbxassetid://332223043"
  814. s.Pitch = .8
  815. s:Play()
  816. wait(.75)
  817. setLerp(.17)
  818. setJointCFrames({
  819. CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(-20, 15, 0));
  820. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, 14.999, -0.001));
  821. CFrame.new(Vector3.new(-1.7, 0, 0.2)) * CFAngles(Vector3.new(-33.928, -4.374, -38.76));
  822. CFrame.new(Vector3.new(1.499, 0.4, -0.601)) * CFAngles(Vector3.new(74.335, 25.091, -6.155));
  823. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-45, 0, -0.001));
  824. CFrame.new(Vector3.new(0.5, -1.8, -0.4)) * CFAngles(Vector3.new(-15, -15, 0));
  825. })
  826. wait(.5)
  827. Debounces.isAttacking = false
  828. end
  829. end)
  830.  
  831.  
  832. uinps.InputBegan:connect(function(InputObj)
  833. if InputObj.KeyCode == Enum.KeyCode.Slash then
  834. local finishEvent = nil
  835. Debounces.isTyping = true
  836. finishEvent = uinps.InputBegan:connect(function(InputObj)
  837. if InputObj.KeyCode == Enum.KeyCode.Return or InputObj.UserInputType == Enum.UserInputType.MouseButton1 then
  838. Debounces.isTyping = false
  839. finishEvent:disconnect()
  840. end
  841. end)
  842. end
  843. end)
  844.  
  845. uinps.InputBegan:connect(function(InputObj)
  846. if InputObj.KeyCode == Enum.KeyCode.LeftShift then
  847. Debounces.isSprinting = true
  848. end
  849. end)
  850.  
  851. uinps.InputEnded:connect(function(InputObj)
  852. if InputObj.KeyCode == Enum.KeyCode.LeftShift then
  853. Debounces.isSprinting = false
  854. end
  855. end)
  856.  
  857. rs.RenderStepped:connect(function()
  858. Debounces.FPS = 1/rs.RenderStepped:wait()
  859. local FPSLerp = AnimStat.lerpSpeed/(Debounces.FPS/60)
  860. if Debounces.isPassive == false then
  861. fire.Enabled = false
  862. light.Range = 0
  863. fight:Pause()
  864. sans:Resume()
  865. efxBlock.Transparency = 1
  866. else
  867. fire.Enabled = true
  868. light.Range = 10
  869. fight:Resume()
  870. sans:Pause()
  871. efxBlock.Transparency = 0
  872. end
  873. for i,v in pairs (rayModel:children()) do
  874. if v.Transparency >= 1 then
  875. v:Destroy()
  876. else
  877. v.CanCollide = true
  878. local parts = v:GetTouchingParts()
  879. v.CanCollide = false
  880. for i = 1,#parts do
  881. if parts[i].Parent:FindFirstChild("Humanoid") and parts[i].Parent ~= c and v.Name ~= "Punch" then
  882. parts[i].Parent.Humanoid:TakeDamage(.5/(Debounces.FPS/60))
  883. elseif parts[i].Parent:FindFirstChild("Humanoid") and parts[i].Parent ~= c and v.Name == "Punch" then
  884. parts[i].Parent.Humanoid:TakeDamage(3.1/(Debounces.FPS/60))
  885. end
  886. end
  887. v.Size = v.Size + Vector3.new(1/(Debounces.FPS/60),1/(Debounces.FPS/60),0)
  888. v.Transparency = v.Transparency + .05/(Debounces.FPS/60)
  889. end
  890. end
  891. for i = 1,#Joints do
  892. Joints[i].C0 = Joints[i].C0:lerp(JointTargets[i], FPSLerp)
  893. end
  894. local sineval = math.sin(tick() * 2) * 3
  895. fire.Acceleration = Vector3.new(sineval,1,sineval)
  896. light.Brightness = math.sin(math.cos(tick() * 2) * 1.5)
  897. end)
  898.  
  899. ------ Telekinesis -------
  900.  
  901.  
  902. local isScriptNil = false
  903.  
  904. local Plrs = game:GetService("Players")
  905. local RunService = game:GetService("RunService")
  906. local Content = game:GetService("ContentProvider")
  907. local LP = Plrs.LocalPlayer
  908. local Char = LP.Character
  909. local PlrGui = LP.PlayerGui
  910. local Backpack = LP.Backpack
  911. local Mouse = LP:GetMouse()
  912.  
  913. local Camera = Workspace.CurrentCamera
  914. local LastCamCF = Camera.CoordinateFrame
  915. local AnimJoints = {}
  916. local Cons = {}
  917. local mDown = false
  918. local Multi = false
  919. local Grabbing = false
  920. local Current = {}
  921. local Alpha = 1
  922. local LightNum = 1
  923.  
  924. Current.Part = nil
  925. Current.BP = nil
  926. Current.BA = nil
  927. Current.Mass = nil
  928.  
  929. local LastPart = nil
  930.  
  931. local Head = Char["Head"]
  932. local Torso = Char["Torso"]
  933. local Humanoid = Char["Humanoid"]
  934. local LA = Char["Left Arm"]
  935. local RA = Char["Right Arm"]
  936. local LL = Char["Left Leg"]
  937. local RL = Char["Right Leg"]
  938.  
  939. local LS, RS;
  940.  
  941. local OrigLS = Torso["Left Shoulder"]
  942. local OrigRS = Torso["Right Shoulder"]
  943.  
  944. for _,v in pairs(Char:GetChildren()) do
  945. if v.Name == ModID then
  946. v:Destroy()
  947. end
  948. end
  949.  
  950. for _,v in pairs(PlrGui:GetChildren()) do
  951. if v.Name == "PadsGui" then
  952. v:Destroy()
  953. end
  954. end
  955.  
  956. local ModID = "Pads"
  957. local Objects = {}
  958. local Grav = 196.2
  959.  
  960. local sin=math.sin
  961. local cos=math.cos
  962. local max=math.max
  963. local min=math.min
  964. local atan2=math.atan2
  965. local random=math.random
  966. local tau = 2 * math.pi
  967.  
  968. local BodyObjects = {
  969. ["BodyVelocity"] = true;
  970. ["BodyAngularVelocity"] = true;
  971. ["BodyForce"] = true;
  972. ["BodyThrust"] = true;
  973. ["BodyPosition"] = true;
  974. ["RocketPropulsion"] = true;
  975. }
  976.  
  977. if LP.Name == PlrName and isScriptNil then
  978. script.Parent = nil
  979. end
  980.  
  981. LP.CameraMode = "Classic"
  982.  
  983. local Assets = {
  984. }
  985.  
  986. local LS0, LS1 = OrigLS.C0, OrigLS.C1
  987. local RS0, RS1 = OrigRS.C0, OrigRS.C1
  988.  
  989. for i,v in pairs(Assets) do
  990. local ID = tostring(Assets[i])
  991. Assets[i] = "http://www.roblox.com/asset/?id=" .. ID
  992. Content:Preload("http://www.roblox.com/asset/?id=" .. ID)
  993. end
  994.  
  995. function QuaternionFromCFrame(cf)
  996. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
  997. local trace = m00 + m11 + m22 if trace > 0 then
  998. local s = math.sqrt(1 + trace);
  999. local recip = 0.5/s;
  1000. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
  1001. else
  1002. local i = 0;
  1003. if m11 > m00 then
  1004. i = 1;
  1005. end;
  1006. if m22 > (i == 0 and m00 or m11) then
  1007. i = 2 end if i == 0 then
  1008. local s = math.sqrt(m00-m11-m22+1);
  1009. local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
  1010. elseif i == 1 then
  1011. local s = math.sqrt(m11-m22-m00+1);
  1012. local recip = 0.5/s;
  1013. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
  1014. elseif i == 2 then
  1015. local s = math.sqrt(m22-m00-m11+1);
  1016. local recip = 0.5/s;
  1017. return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
  1018. end;
  1019. end;
  1020. end;
  1021.  
  1022. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1023. local xs, ys, zs = x + x, y + y, z + z;
  1024. local wx, wy, wz = w*xs, w*ys, w*zs;
  1025. local xx = x*xs;
  1026. local xy = x*ys;
  1027. local xz = x*zs;
  1028. local yy = y*ys;
  1029. local yz = y*zs;
  1030. local zz = z*zs;
  1031. 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))
  1032. end;
  1033.  
  1034. function QuaternionSlerp(a, b, t)
  1035. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
  1036. local startInterp, finishInterp;
  1037. if cosTheta >= 0.0001 then
  1038. if (1 - cosTheta) > 0.0001 then
  1039. local theta = math.acos(cosTheta);
  1040. local invSinTheta = 1/math.sin(theta);
  1041. startInterp = math.sin((1-t)*theta)*invSinTheta;
  1042. finishInterp = math.sin(t*theta)*invSinTheta;
  1043. else
  1044. startInterp = 1-t finishInterp = t;
  1045. end;
  1046. else
  1047. if (1+cosTheta) > 0.0001 then
  1048. local theta = math.acos(-cosTheta);
  1049. local invSinTheta = 1/math.sin(theta);
  1050. startInterp = math.sin((t-1)*theta)*invSinTheta;
  1051. finishInterp = math.sin(t*theta)*invSinTheta;
  1052. else startInterp = t-1 finishInterp = t;
  1053. end;
  1054. end;
  1055. 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;
  1056. end;
  1057.  
  1058. function CLerp(a,b,t)
  1059. local qa={QuaternionFromCFrame(a)};
  1060. local qb={QuaternionFromCFrame(b)};
  1061. local ax,ay,az=a.x,a.y,a.z;
  1062. local bx,by,bz=b.x,b.y,b.z;
  1063. local _t=1-t;
  1064. return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
  1065. end
  1066.  
  1067. function GetWeld(weld)
  1068. local obj
  1069. for i, v in pairs(AnimJoints) do
  1070. if v[1] == weld then
  1071. obj = v
  1072. break
  1073. end
  1074. end
  1075. if not obj then
  1076. obj = {weld,NV}
  1077. table.insert(AnimJoints,obj)
  1078. end
  1079. return weld.C0.p, obj[2]
  1080. end
  1081.  
  1082. function SetWeld(weld, i, loops, origpos, origangle, nextpos, nextangle, override, overrideLower, smooth)
  1083. smooth = smooth or 1
  1084. local obj
  1085. for i, v in pairs(AnimJoints) do
  1086. if v[1] == weld then
  1087. obj = v
  1088. break
  1089. end
  1090. end
  1091. if not obj then
  1092. obj = {weld,NV}
  1093. table.insert(AnimJoints,obj)
  1094. end
  1095.  
  1096. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  1097.  
  1098. local tox,toy,toz = 0,0,0
  1099. tox = math.abs(origangle.x - nextangle.x) *perc
  1100. toy = math.abs(origangle.y - nextangle.y) *perc
  1101. toz = math.abs(origangle.z - nextangle.z) *perc
  1102. tox = ((origangle.x > nextangle.x and -tox) or tox)
  1103. toy = ((origangle.y > nextangle.y and -toy) or toy)
  1104. toz = ((origangle.z > nextangle.z and -toz) or toz)
  1105.  
  1106. local tox2,toy2,toz2 = 0,0,0
  1107. tox2 = math.abs(origpos.x - nextpos.x) *perc
  1108. toy2 = math.abs(origpos.y - nextpos.y) *perc
  1109. toz2 = math.abs(origpos.z - nextpos.z) *perc
  1110. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  1111. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  1112. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  1113.  
  1114. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  1115. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  1116. end
  1117.  
  1118. function RotateCamera(x, y)
  1119. 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)
  1120. end
  1121.  
  1122. function GetAngles(cf)
  1123. local lv = cf.lookVector
  1124. return -math.asin(lv.y), math.atan2(lv.x, -lv.z)
  1125. end
  1126.  
  1127. local LastCamCF = Camera.CoordinateFrame
  1128.  
  1129. function Look()
  1130. if AlphaOn == true then
  1131. local x, y = GetAngles(LastCamCF:toObjectSpace(Camera.CoordinateFrame))
  1132. Camera.CoordinateFrame = LastCamCF
  1133. RotateCamera(x * -(Alpha), y * -(Alpha))
  1134. LastCamCF = Camera.CoordinateFrame
  1135. end
  1136. end
  1137.  
  1138. function Cor(Func)
  1139. local Ok, Err = coroutine.resume(coroutine.create(Func))
  1140. if not Ok then
  1141. print(Err)
  1142. end
  1143. end
  1144.  
  1145. function Cor2(Func)
  1146. local Ok, Err = ypcall(Func)
  1147. if not Ok then
  1148. print(Err)
  1149. end
  1150. end
  1151.  
  1152. function MakePads()
  1153. -- 1 - VTelekinesis
  1154. P1 = Instance.new("Model")
  1155. P1.Name = ModID
  1156.  
  1157. -- 2 - RBase
  1158. P2 = Instance.new("Part")
  1159. P2.CFrame = CFrame.new(Vector3.new(21.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  1160. P2.FormFactor = Enum.FormFactor.Custom
  1161. P2.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  1162. P2.Anchored = true
  1163. P2.BrickColor = BrickColor.new("White")
  1164. P2.Friction = 0.30000001192093
  1165. P2.Shape = Enum.PartType.Block
  1166. P2.Name = "RBase"
  1167. P2.Parent = P1
  1168. P2.Transparency = 1
  1169. -- 3 - Mesh
  1170. P3 = Instance.new("CylinderMesh")
  1171. P3.Scale = Vector3.new(1, 0.5, 1)
  1172. P3.Parent = P2
  1173.  
  1174. -- 4 - LBase
  1175. P4 = Instance.new("Part")
  1176. P4.CFrame = CFrame.new(Vector3.new(18.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  1177. P4.FormFactor = Enum.FormFactor.Custom
  1178. P4.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  1179. P4.Anchored = true
  1180. P4.BrickColor = BrickColor.new("White")
  1181. P4.Friction = 0.30000001192093
  1182. P4.Shape = Enum.PartType.Block
  1183. P4.Name = "LBase"
  1184. P4.Parent = P1
  1185. P4.Transparency = 1
  1186. -- 5 - Mesh
  1187. P5 = Instance.new("CylinderMesh")
  1188. P5.Scale = Vector3.new(1, 0.5, 1)
  1189. P5.Parent = P4
  1190.  
  1191. -- 7 - Mesh
  1192. P7 = Instance.new("CylinderMesh")
  1193. P7.Scale = Vector3.new(1, 0.5, 1)
  1194. P7.Parent = P6
  1195.  
  1196.  
  1197.  
  1198. -- 9 - Mesh
  1199. P9 = Instance.new("CylinderMesh")
  1200. P9.Scale = Vector3.new(1, 0.5, 1)
  1201. P9.Parent = P8
  1202.  
  1203.  
  1204.  
  1205. -- 11 - Mesh
  1206. P11 = Instance.new("CylinderMesh")
  1207. P11.Scale = Vector3.new(1, 0.5, 1)
  1208. P11.Parent = P10
  1209.  
  1210.  
  1211. -- 13 - Mesh
  1212. P13 = Instance.new("CylinderMesh")
  1213. P13.Scale = Vector3.new(1, 0.5, 1)
  1214. P13.Parent = P12
  1215.  
  1216.  
  1217. -- 15 - Mesh
  1218. P15 = Instance.new("CylinderMesh")
  1219. P15.Scale = Vector3.new(1, 0.5, 1)
  1220. P15.Parent = P14
  1221.  
  1222. -- 17 - Mesh
  1223. P17 = Instance.new("CylinderMesh")
  1224. P17.Scale = Vector3.new(1, 0.5, 1)
  1225. P17.Parent = P16
  1226.  
  1227. P1.Parent = LP.Character
  1228. P1:MakeJoints()
  1229. return P1
  1230. end
  1231.  
  1232. weldModel = function(model, unanchor, rooty)
  1233. local parts = {}
  1234. local function recurse(object)
  1235. if object:IsA("BasePart") then
  1236. table.insert(parts, object)
  1237. end
  1238. for _,child in pairs(object:GetChildren()) do
  1239. recurse(child)
  1240. end
  1241. end
  1242. recurse(model)
  1243.  
  1244. local rootPart = rooty or parts[1]
  1245. for _, part in pairs(parts) do
  1246. local cframe = rootPart.CFrame:toObjectSpace(part.CFrame)
  1247. local weld = Instance.new("Weld")
  1248. weld.Part0 = rootPart
  1249. weld.Part1 = part
  1250. weld.C0 = cframe
  1251. weld.Parent = rootPart
  1252. end
  1253.  
  1254. if unanchor then
  1255. for _, part in pairs(parts) do
  1256. part.Anchored = false
  1257. part.CanCollide = false
  1258. end
  1259. end
  1260. end
  1261.  
  1262. weldItem = function(rootPart, Item, TheC0, unanchor, ParentItem)
  1263. local cframe = TheC0 or rootPart.CFrame:toObjectSpace(Item.CFrame)
  1264. local weld = Instance.new("Weld")
  1265. weld.Name = "Weld"
  1266. weld.Part0 = rootPart
  1267. weld.Part1 = Item
  1268. weld.C0 = cframe
  1269. weld.Parent = ParentItem and Item or rootPart
  1270.  
  1271. if unanchor then
  1272. Item.Anchored = false
  1273. end
  1274. return weld, cframe
  1275. end
  1276.  
  1277. scaleModel = function(model, scale)
  1278. local parts = {}
  1279. local function recurse(object)
  1280. if object:IsA("BasePart") then
  1281. table.insert(parts, object)
  1282. end
  1283. for _,child in pairs(object:GetChildren()) do
  1284. recurse(child)
  1285. end
  1286. end
  1287. recurse(model)
  1288.  
  1289. local top, bottom, left, right, back, front
  1290. for _, part in pairs(parts) do
  1291. if top == nil or top < part.Position.y then top = part.Position.y end
  1292. if bottom == nil or bottom > part.Position.y then bottom = part.Position.y end
  1293. if left == nil or left > part.Position.x then left = part.Position.x end
  1294. if right == nil or right < part.Position.x then right = part.Position.x end
  1295. if back == nil or back > part.Position.z then back = part.Position.z end
  1296. if front == nil or front < part.Position.z then front = part.Position.z end
  1297. end
  1298.  
  1299. local middle = Vector3.new( left+right, top+bottom, back+front )/2
  1300. local minSize = Vector3.new(0.2, 0.2, 0.2)
  1301.  
  1302. for _, part in pairs(parts) do
  1303. local foo = part.CFrame.p - middle
  1304. local rotation = part.CFrame - part.CFrame.p
  1305. local newSize = part.Size*scale
  1306. part.FormFactor = "Custom"
  1307. part.Size = newSize
  1308. part.CFrame = CFrame.new( middle + foo*scale ) * rotation
  1309.  
  1310. if newSize.x < minSize.x or newSize.y < minSize.y or newSize.z < minSize.z then
  1311. local mesh
  1312. for _, child in pairs(part:GetChildren()) do
  1313. if child:IsA("DataModelMesh") then
  1314. mesh = child
  1315. break
  1316. end
  1317. end
  1318.  
  1319. if mesh == nil then
  1320. mesh = Instance.new("BlockMesh", part)
  1321. end
  1322.  
  1323. local oScale = mesh.Scale
  1324. local newScale = newSize/minSize * oScale
  1325. if 0.2 < newSize.x then newScale = Vector3.new(1 * oScale.x, newScale.y, newScale.z) end
  1326. if 0.2 < newSize.y then newScale = Vector3.new(newScale.x, 1 * oScale.y, newScale.z) end
  1327. if 0.2 < newSize.z then newScale = Vector3.new(newScale.x, newScale.y, 1 * oScale.z) end
  1328.  
  1329. mesh.Scale = newScale
  1330. end
  1331. end
  1332. end
  1333.  
  1334. function getMass(Obj, Total)
  1335. local newTotal = Total
  1336. local returnTotal = 0
  1337.  
  1338. if Obj:IsA("BasePart") then
  1339. newTotal = newTotal + Objects[Obj]
  1340. elseif BodyObjects[Obj.ClassName] then
  1341. Obj:Destroy()
  1342. end
  1343.  
  1344. if Obj:GetChildren() and #Obj:GetChildren() > 0 then
  1345. for _,v in pairs(Obj:GetChildren()) do
  1346. returnTotal = returnTotal + getMass(v, newTotal)
  1347. end
  1348. else
  1349. returnTotal = newTotal
  1350. end
  1351.  
  1352. return returnTotal
  1353. end
  1354.  
  1355. function getTargFromCurrent()
  1356. local Current = Current.Part
  1357. if Current:IsA("BasePart") then
  1358. return Current
  1359. elseif Current:findFirstChild("Torso") then
  1360. return Current.Torso
  1361. else
  1362. for _,v in pairs(Current:GetChildren()) do
  1363. if v:IsA("BasePart") then
  1364. return v
  1365. end
  1366. end
  1367. end
  1368. end
  1369.  
  1370. function Fire(Part, Vec, Inv)
  1371. pcall(function()
  1372. Current.BP:Destroy()
  1373. Current.BP = nil
  1374. end)
  1375. pcall(function()
  1376. Current.BA:Destroy()
  1377. Current.BA = nil
  1378. end)
  1379. pcall(function()
  1380. if Inv then
  1381. Part.Velocity = -((Vec - Torso.Position).unit * Grav * 1.1)
  1382. else
  1383. Part.Velocity = ((Vec - Camera.CoordinateFrame.p).unit * Grav * 1.1)
  1384. end
  1385. Current.Mass = nil
  1386. end)
  1387. Reset()
  1388. end
  1389.  
  1390. function Reset()
  1391. LS.Parent = nil
  1392. RS.Parent = nil
  1393.  
  1394. OrigLS.Parent = Torso
  1395. OrigRS.Parent = Torso
  1396.  
  1397. OrigLS.C0 = LS0
  1398. OrigRS.C0 = RS0
  1399. end
  1400.  
  1401. function Start()
  1402. Cor(function()
  1403. repeat wait(1/30) until LP.Character and LP.Character.Parent == Workspace and LP.Character:findFirstChild("Torso")
  1404. Char = LP.Character
  1405. PlrGui = LP.PlayerGui
  1406. Backpack = LP.Backpack
  1407. Mouse = LP:GetMouse()
  1408.  
  1409. for _,v in pairs(Cons) do
  1410. v:disconnect()
  1411. end
  1412. Cons = {}
  1413.  
  1414. Camera = Workspace.CurrentCamera
  1415. LastCamCF = Camera.CoordinateFrame
  1416. AnimJoints = {}
  1417. mDown = false
  1418. Multi = false
  1419. Grabbing = false
  1420. Current = {}
  1421. Alpha = 1
  1422.  
  1423. Head = Char["Head"]
  1424. Torso = Char["Torso"]
  1425. Humanoid = Char["Humanoid"]
  1426. LA = Char["Left Arm"]
  1427. RA = Char["Right Arm"]
  1428. LL = Char["Left Leg"]
  1429. RL = Char["Right Leg"]
  1430.  
  1431. OrigLS = Torso["Left Shoulder"]
  1432. OrigRS = Torso["Right Shoulder"]
  1433.  
  1434. for _,v in pairs(Char:GetChildren()) do
  1435. if v.Name == ModID then
  1436. v:Destroy()
  1437. end
  1438. end
  1439.  
  1440. for _,v in pairs(PlrGui:GetChildren()) do
  1441. if v.Name == "PadsGui" then
  1442. v:Destroy()
  1443. end
  1444. end
  1445.  
  1446. LS = Instance.new("Weld")
  1447. RS = Instance.new("Weld")
  1448.  
  1449. LS.Name = OrigLS.Name
  1450. LS.Part0 = Torso
  1451. LS.Part1 = LA
  1452. LS.C0 = LS0
  1453. LS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  1454.  
  1455. RS.Name = OrigRS.Name
  1456. RS.Part0 = Torso
  1457. RS.Part1 = RA
  1458. RS.C0 = RS0
  1459. RS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  1460.  
  1461. local Pads = MakePads()
  1462. local LPad = Pads.LBase
  1463. local RPad = Pads.RBase
  1464.  
  1465. weldModel(LPad, true, LPad)
  1466. weldModel(RPad, true, RPad)
  1467.  
  1468. local GripWeldL = Instance.new("Weld")
  1469. GripWeldL.Name = "GripWeldL"
  1470. GripWeldL.Part0 = LA
  1471. GripWeldL.Part1 = LPad
  1472. GripWeldL.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  1473. GripWeldL.Parent = LA
  1474.  
  1475. local GripWeldR = Instance.new("Weld")
  1476. GripWeldR.Name = "GripWeldR"
  1477. GripWeldR.Part0 = RA
  1478. GripWeldR.Part1 = RPad
  1479. GripWeldR.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  1480. GripWeldR.Parent = RA
  1481.  
  1482. local isParts = false
  1483.  
  1484. table.insert(Cons, Mouse.KeyDown:connect(function(Key)
  1485. Key = Key:lower()
  1486. if Key == "z" then
  1487. --Stuff
  1488. elseif Key == "f" then
  1489. local Current = Current.Part
  1490. if Current and Current.Parent ~= nil and not Multi then
  1491. Current:BreakJoints()
  1492. end
  1493. elseif Key == "r" then
  1494. local Targ;
  1495. if Current.Part and Current.Part ~= nil then
  1496. Targ = getTargFromCurrent()
  1497. else
  1498. Targ = LastPart
  1499. end
  1500. if Targ and Targ.Parent ~= nil and not Multi then
  1501. local Ex = Instance.new("Explosion", Workspace)
  1502. Ex.Position = Targ.CFrame.p
  1503. Ex.BlastRadius = 16
  1504. Ex.DestroyJointRadiusPercent = 0.5
  1505. end
  1506. elseif Key == "c" then
  1507. if Current.Part and Current.Part.Parent ~= nil and not Multi then
  1508. local Part = getTargFromCurrent()
  1509. if Part then
  1510. Grabbing = false
  1511. if Mouse.Hit then
  1512. local TargPos = CFrame.new(Camera.CoordinateFrame.p, Mouse.Hit.p) * CFrame.new(0, 0, -1000)
  1513. Fire(Part, TargPos.p)
  1514. else
  1515. Fire(Part, Mouse.Origin.p + Mouse.UnitRay.Direction, true)
  1516. end
  1517. end
  1518. end
  1519. end
  1520. end))
  1521.  
  1522. table.insert(Cons, Mouse.Button1Up:connect(function()
  1523. mDown = false
  1524. if Grabbing == true and Multi == false then
  1525. Grabbing = false
  1526. Reset()
  1527. end
  1528. if Current.Part ~= nil then
  1529. LastPart = getTargFromCurrent()
  1530. Current = {}
  1531. end
  1532. end))
  1533.  
  1534. local function makeLightning(Par, Start, End, Width, Length, RandomScale, ArcScale, Num1)
  1535. local oldParts = {}
  1536. for _,v in pairs(Par:GetChildren()) do
  1537. v.CFrame = CFrame.new(5e5, 5e5, 5e5)
  1538. table.insert(oldParts, v)
  1539. end
  1540. local Distance = (Start-End).Magnitude
  1541. local ArcScale = ArcScale or 1
  1542. local RandomScale = RandomScale or 0
  1543. local Last = Start
  1544. local IterNum = 0
  1545.  
  1546. while Par.Parent do
  1547. IterNum = IterNum + 1
  1548. local New = nil
  1549. if (Last-End).Magnitude < Length then
  1550. New = CFrame.new(End)
  1551. else
  1552. if (End-Last).Magnitude < Length*2 then
  1553. RandomScale = RandomScale*0.5
  1554. ArcScale = ArcScale*0.5
  1555. end
  1556. local Direct = CFrame.new(Last,End)
  1557. New = Direct*CFrame.Angles(math.rad(math.random(-RandomScale/4,RandomScale*ArcScale)),math.rad(math.random(-RandomScale,RandomScale)),math.rad(math.random(-RandomScale,RandomScale)))
  1558. New = New*CFrame.new(0,0,-Length)
  1559. end
  1560. local Trail = nil
  1561. if oldParts[IterNum] then
  1562. Trail = oldParts[IterNum]
  1563. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("Persimmon")) or BrickColor.new("Toothpaste")
  1564. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  1565. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  1566. oldParts[IterNum] = nil
  1567. else
  1568. Trail = Instance.new("Part")
  1569. Trail.Name = "Part"
  1570. Trail.FormFactor = "Custom"
  1571. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  1572. Trail.Transparency = 0
  1573. Trail.Anchored = true
  1574. Trail.CanCollide = false
  1575. Trail.Locked = true
  1576. Trail.BackSurface = "SmoothNoOutlines"
  1577. Trail.BottomSurface = "SmoothNoOutlines"
  1578. Trail.FrontSurface = "SmoothNoOutlines"
  1579. Trail.LeftSurface = "SmoothNoOutlines"
  1580. Trail.RightSurface = "SmoothNoOutlines"
  1581. Trail.TopSurface = "SmoothNoOutlines"
  1582. Trail.Material = "Neon"
  1583. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  1584. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  1585. Trail.Parent = Par
  1586. end
  1587. Last = New.p
  1588. if (Last-End).Magnitude < 1 then
  1589. break
  1590. end
  1591. end
  1592. for _,v in pairs(oldParts) do
  1593. v:Destroy()
  1594. end
  1595. end
  1596.  
  1597. table.insert(Cons, Mouse.Button1Down:connect(function()
  1598. mDown = true
  1599. local Targ = Mouse.Target
  1600. Cor(function()
  1601. if Targ and Objects[Targ] and not Multi then
  1602. Grabbing = true
  1603. Current.Part = Targ
  1604. local Mass = Objects[Targ]
  1605. local ForceNum = 0
  1606. local Hum = nil
  1607.  
  1608. for _,v in pairs(Targ:GetChildren()) do
  1609. if BodyObjects[v.ClassName] then
  1610. v:Destroy()
  1611. end
  1612. end
  1613.  
  1614. for _,v in pairs(Workspace:GetChildren()) do
  1615. if v:findFirstChild("Humanoid") and v:IsAncestorOf(Targ) then
  1616. Hum = v.Humanoid
  1617. Mass = getMass(v, 0)
  1618. Current.Part = v
  1619. break
  1620. end
  1621. end
  1622.  
  1623. Current.Mass = Mass
  1624.  
  1625. if not Hum then
  1626. Targ:BreakJoints()
  1627. end
  1628.  
  1629. ForceNum = Mass * Grav
  1630. Targ.CanCollide = true
  1631. Targ.Anchored = false
  1632.  
  1633. local BP = Instance.new("BodyPosition")
  1634. BP.maxForce = Vector3.new(3 * ForceNum, 3 * ForceNum, 3 * ForceNum)
  1635. BP.Parent = Targ
  1636.  
  1637. local Ang = Instance.new("BodyAngularVelocity")
  1638. Ang.Parent = Targ
  1639.  
  1640. Current.BP = BP
  1641. Current.BA = Ang
  1642.  
  1643. OrigLS.Parent = nil
  1644. OrigRS.Parent = nil
  1645.  
  1646. LS.Parent = Torso
  1647. RS.Parent = Torso
  1648.  
  1649. LS.C0 = LS0
  1650. RS.C0 = RS0
  1651.  
  1652. local DirDot = Mouse.UnitRay.Direction:Dot(Targ.Position - Mouse.Origin.p)
  1653. local BPPos = Vector3.new(0, 0, 0)
  1654. local Vel = Vector3.new(0, 0, 0)
  1655. local Vlev = random() * math.pi
  1656. local RPos = Vector3.new(random() * 2 - 1, cos(Vlev), random() * 2 - 1)
  1657.  
  1658. local Ball = Instance.new("Part")
  1659. Ball.Name = "Ball"
  1660. Ball.FormFactor = "Custom"
  1661. Ball.Color = Color3.new(0, 1, 1)
  1662. Ball.Transparency = 0.3
  1663. Ball.Anchored = true
  1664. Ball.CanCollide = false
  1665. Ball.Locked = true
  1666. Ball.BottomSurface, Ball.TopSurface = "Smooth", "Smooth"
  1667. Ball.Size = Vector3.new(0.5, 0.5, 0.5)
  1668. Ball.CFrame = Torso.CFrame * CFrame.new(0, 1, -3)
  1669. Ball.Parent = Char
  1670.  
  1671. if Targ.Name == "MyPartV" then
  1672. Targ.Name = "MyPartF"
  1673. end
  1674.  
  1675. local LightMod = Instance.new("Model", Char)
  1676.  
  1677. local Mesh = Instance.new("SpecialMesh")
  1678. Mesh.MeshType = "Sphere"
  1679. Mesh.Parent = Ball
  1680.  
  1681. local Size = 0.5
  1682. local Rise = true
  1683.  
  1684. while Grabbing and BP and Ang and Targ.Parent ~= nil do
  1685. local BPPos = Mouse.Origin.p + Mouse.UnitRay.Direction * DirDot
  1686. Ang.angularvelocity = Vel
  1687. BP.position = BPPos + RPos
  1688. 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)))
  1689. 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)))
  1690. Vlev = (Vlev + 0.05) % tau
  1691.  
  1692. if Hum then
  1693. Hum.Sit = true
  1694. end
  1695.  
  1696. if LA.Parent ~= nil and RA.Parent ~= nil then
  1697. local LPos = (LA.CFrame * CFrame.new(0, -1, 0)).p
  1698. local RPos = (RA.CFrame * CFrame.new(0, -1, 0)).p
  1699. if Rise == true then
  1700. if Size < 0.6 then
  1701. Size = Size + 0.05
  1702. else
  1703. Size = Size + 0.1
  1704. end
  1705. if Size >= 2.2 then
  1706. Rise = false
  1707. end
  1708. else
  1709. if Size > 2.1 then
  1710. Size = Size - 0.05
  1711. else
  1712. Size = Size - 0.1
  1713. end
  1714. if Size <= 0.5 then
  1715. Rise = true
  1716. end
  1717. end
  1718. Ball.Size = Vector3.new(Size, Size, Size)
  1719. Ball.CFrame = CFrame.new(LPos:Lerp(RPos, 0.5), Targ.Position) * CFrame.new(0, 0, -2.2)
  1720. LightNum = LightNum + 1
  1721. makeLightning(LightMod, Ball.Position, Targ.Position, 0.2, 4, 50, 1, LightNum)
  1722. elseif Ball.Parent ~= nil then
  1723. Ball:Destroy()
  1724. end
  1725.  
  1726. if LS and LS.Parent == Torso then
  1727. 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))
  1728. end
  1729. if RS and RS.Parent == Torso then
  1730. 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))
  1731. end
  1732. RunService.Heartbeat:wait()
  1733. end
  1734.  
  1735. coroutine.resume(coroutine.create(function()
  1736. for i = 0.5, 1, 0.1 do
  1737. for i2,v in pairs(LightMod:GetChildren()) do
  1738. --v.Light.Range = 6-(i*5)
  1739. v.Transparency = i
  1740. end
  1741. wait(1/30)
  1742. end
  1743. LightMod:Destroy()
  1744. end))
  1745.  
  1746. if BP and BP.Parent ~= nil then
  1747. BP:Destroy()
  1748. end
  1749.  
  1750. if Ang and Ang.Parent ~= nil then
  1751. Ang:Destroy()
  1752. end
  1753.  
  1754. pcall(function() Ball:Destroy() end)
  1755. end
  1756. end)
  1757. end))
  1758. end)
  1759. end
  1760.  
  1761. function Add(Obj)
  1762. if Obj:IsA("BasePart") and not Objects[Obj] and not (Obj.Name == "Base" and Obj.ClassName == "Part") then
  1763. Objects[Obj] = Obj:GetMass()
  1764. Obj.Changed:connect(function(P)
  1765. if P:lower() == "size" and Objects[Obj] and Obj.Parent ~= nil then
  1766. Objects[Obj] = Obj:GetMass()
  1767. end
  1768. end)
  1769. end
  1770. end
  1771.  
  1772. function Rem(Obj)
  1773. if Objects[Obj] then
  1774. Objects[Obj] = nil
  1775. end
  1776. end
  1777.  
  1778. function Recursion(Obj)
  1779. ypcall(function()
  1780. Add(Obj)
  1781. if #Obj:GetChildren() > 0 then
  1782. for _,v in pairs(Obj:GetChildren()) do
  1783. Recursion(v)
  1784. end
  1785. end
  1786. end)
  1787. end
  1788.  
  1789. Workspace.DescendantAdded:connect(function(Obj)
  1790. Add(Obj)
  1791. end)
  1792.  
  1793. Workspace.DescendantRemoving:connect(function(Obj)
  1794. Rem(Obj)
  1795. end)
  1796.  
  1797. for _,v in pairs(Workspace:GetChildren()) do
  1798. Recursion(v)
  1799. end
  1800.  
  1801. Start()
  1802.  
  1803. if LP.Name == PlrName then
  1804. LP.CharacterAdded:connect(Start)
  1805. end
  1806.  
  1807. local verlet = {}
  1808. verlet.step_time = 1 / 50
  1809. verlet.gravity = Vector3.new(0, -10, 0)
  1810.  
  1811. local char = game.Players.LocalPlayer.Character
  1812. local torso = char:WaitForChild("Torso")
  1813. local parts = {}
  1814. local render = game:GetService("RunService").RenderStepped
  1815.  
  1816. wait(2)
  1817.  
  1818. local point = {}
  1819. local link = {}
  1820. local rope = {}
  1821.  
  1822. local function ccw(A,B,C)
  1823. return (C.y-A.y) * (B.x-A.x) > (B.y-A.y) * (C.x-A.x)
  1824. end
  1825.  
  1826. local function intersect(A,B,C,D)
  1827. return ccw(A,C,D) ~= ccw(B,C,D) and ccw(A,B,C) ~= ccw(A,B,D)
  1828. end
  1829.  
  1830. local function vec2(v)
  1831. return Vector2.new(v.x, v.z)
  1832. end
  1833.  
  1834. function point:step()
  1835. if not self.fixed then
  1836. local derivative = (self.position - self.last_position) * 0.95
  1837. self.last_position = self.position
  1838. self.position = self.position + derivative + (self.velocity * verlet.step_time ^ 2)
  1839. --[[local torsoP = torso.CFrame * CFrame.new(-1, 0, 0.5)
  1840. local torsoE = torso.CFrame * CFrame.new(1, 0, 0.5)
  1841. local pointE = self.position + torso.CFrame.lookVector * 100
  1842. local doIntersect = intersect(vec2(torsoP.p), vec2(torsoE.p), vec2(self.position), vec2(pointE))
  1843. if not doIntersect then
  1844. self.postition = self.position - torso.CFrame.lookVector * 10
  1845. end]]
  1846. end
  1847. end
  1848.  
  1849. function link:step()
  1850. for i = 1, 1 do
  1851. local distance = self.point1.position - self.point2.position
  1852. local magnitude = distance.magnitude
  1853. local differance = (self.length - magnitude) / magnitude
  1854. local translation = ((self.point1.fixed or self.point2.fixed) and 1 or 0.6) * distance * differance
  1855. if not self.point1.fixed then
  1856. self.point1.position = self.point1.position + translation
  1857. end
  1858. if not self.point2.fixed then
  1859. self.point2.position = self.point2.position - translation
  1860. end
  1861. end
  1862. end
  1863.  
  1864. function verlet.new(class, a, b, c)
  1865. if class == "Point" then
  1866. local new = {}
  1867. setmetatable(new, {__index = point})
  1868. new.class = class
  1869. new.position = a or Vector3.new()
  1870. new.last_position = new.position
  1871. new.velocity = verlet.gravity
  1872. new.fixed = false
  1873. return new
  1874. elseif class == "Link" then
  1875. local new = {}
  1876. setmetatable(new, {__index = link})
  1877. new.class = class
  1878. new.point1 = a
  1879. new.point2 = b
  1880. new.length = c or (a.position - b.position).magnitude
  1881. return new
  1882. elseif class == "Rope" then
  1883. local new = {}
  1884. setmetatable(new, {__index = link})
  1885. new.class = class
  1886. new.start_point = a
  1887. new.finish_point = b
  1888. new.points = {}
  1889. new.links = {}
  1890. local inc = (b - a) / 10
  1891. for i = 0, 10 do
  1892. table.insert(new.points, verlet.new("Point", a + (i * inc)))
  1893. end
  1894. for i = 2, #new.points do
  1895. table.insert(new.links, verlet.new("Link", new.points[i - 1], new.points[i]))
  1896. end
  1897. return new
  1898. end
  1899. end
  1900.  
  1901. local tris = {}
  1902. local triParts = {}
  1903.  
  1904. local function GetDiscoColor(hue)
  1905. local section = hue % 1 * 3
  1906. local secondary = 0.5 * math.pi * (section % 1)
  1907. if section < 1 then
  1908. return Color3.new(0, 0, 0)
  1909. elseif section < 2 then
  1910. return Color3.new(0, 0, 0)
  1911. else
  1912. return Color3.new(0, 0, 0)
  1913. end
  1914. end
  1915.  
  1916. local function setupPart(part)
  1917. part.Anchored = true
  1918. part.FormFactor = 3
  1919. part.CanCollide = false
  1920. part.TopSurface = 10
  1921. part.BottomSurface = 10
  1922. part.LeftSurface = 10
  1923. part.RightSurface = 10
  1924. part.FrontSurface = 10
  1925. part.BackSurface = 10
  1926. part.Material = "Neon"
  1927. local m = Instance.new("SpecialMesh", part)
  1928. m.MeshType = "Wedge"
  1929. m.Scale = Vector3.new(0.2, 1, 1)
  1930. return part
  1931. end
  1932.  
  1933. local function CFrameFromTopBack(at, top, back)
  1934. local right = top:Cross(back)
  1935. 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)
  1936. end
  1937.  
  1938. function verlet.draw(object, id)
  1939. if object.class == "Point" then
  1940. local part = parts[id]
  1941. part.BrickColor = BrickColor.new(255, 0, 0)
  1942. part.Transparency = 0
  1943. part.formFactor = 3
  1944. part.Anchored = true
  1945. part.CanCollide = false
  1946. part.TopSurface = 0
  1947. part.BottomSurface = 0
  1948. part.Size = Vector3.new(0.35, 0.35, 0.35)
  1949. part.Material = "Neon"
  1950. part.CFrame = CFrame.new(object.position)
  1951. part.Parent = torso
  1952. return part
  1953. elseif object.class == "Link" then
  1954. local part = parts[id]
  1955. local dist = (object.point1.position - object.point2.position).magnitude
  1956. part.Size = Vector3.new(0.2, 0.2, dist)
  1957. part.CFrame = CFrame.new(object.point1.position, object.point2.position) * CFrame.new(0, 0, dist * -0.5)
  1958. part.Parent = torso
  1959. return part
  1960. end
  1961. end
  1962.  
  1963. function verlet.clear()
  1964. for _, v in pairs(workspace:GetChildren()) do
  1965. if v.Name == "Part" then
  1966. v:Destroy()
  1967. end
  1968. end
  1969. end
  1970.  
  1971. local points = {}
  1972. local links = {}
  1973.  
  1974. for x = 0, 2 do
  1975. points[x] = {}
  1976. for y = 0, 3 do
  1977. points[x][y] = verlet.new("Point", torso.Position + Vector3.new(x * 0.8 - 2, 2 - y * 0.8, 5 + y * 0.4))
  1978. points[x][y].fixed = y == 0
  1979. end
  1980. end
  1981.  
  1982. for x = 1, 2 do
  1983. for y = 0, 3 do
  1984. links[#links + 1] = verlet.new("Link", points[x][y], points[x - 1][y], 1 + y * 0.08)
  1985. end
  1986. end
  1987.  
  1988. for x = 0, 2 do
  1989. for y = 1, 3 do
  1990. links[#links + 1] = verlet.new("Link", points[x][y], points[x][y - 1], 1.2 + y * 0.03)
  1991. end
  1992. end
  1993.  
  1994. render:connect(function()
  1995. for x = 0, 2 do
  1996. for y = 0, 3 do
  1997. if y == 0 then
  1998. points[x][y].position = (torso.CFrame * CFrame.new(x * 1 - 1, 1, 0.5)).p
  1999. else
  2000. points[x][y]:step()
  2001. end
  2002. end
  2003. end
  2004. for i = 1, #links do
  2005. links[i]:step()
  2006. end
  2007. for i = 1, #tris do
  2008. triParts[#triParts + 1] = tris[i].p1
  2009. triParts[#triParts + 1] = tris[i].p2
  2010. end
  2011. tris = {}
  2012. end)
  2013.  
  2014.  
  2015. ------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement