Advertisement
refrop

MultiJump

Jun 29th, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. math.randomseed(tick())
  2. UIS = game:GetService("UserInputService")
  3. RS = game:GetService("RunService").RenderStepped
  4. Plr = game.Players.LocalPlayer
  5. Char = Plr.Character or Plr.CharacterAdded:wait()
  6. CD = false
  7. Max = 16
  8. Current = 0
  9. ReloadTime = 9.5
  10. S2 = 0
  11. Char = workspace:WaitForChild(Plr.Name)
  12.  
  13. function ConvertCode(keycode)
  14. local code = tostring(keycode)
  15. local pattern = "Enum.KeyCode%p%a"
  16. local anchor = "%p%a+"
  17. local finalkey = ""
  18. for t in code:gmatch(anchor) do
  19. for fc in t:gmatch("%a+") do
  20. finalkey = fc
  21. end
  22. end
  23. return finalkey:lower()
  24. end
  25.  
  26. function Expand(Part)
  27. local savedFrame = Part.CFrame
  28. for i = 1, 100 do
  29. Part.Transparency = Part.Transparency + 0.5/100
  30. if Part.Transparency >= 1 then
  31. Part:Destroy()
  32. return
  33. end
  34. Part.Size = Part.Size+Vector3.new(.1,0,.1)
  35. Part.CFrame = savedFrame
  36. RS:wait()
  37. end
  38. Part:Destroy()
  39. end
  40.  
  41. LastJumpTime = os.time()
  42. UIS.InputBegan:connect(function(In,GPE)
  43. if CD == true then return end
  44. local Code = ConvertCode(In.KeyCode)
  45. if os.difftime(os.time()-LastJumpTime) >= 1.25 then
  46. Current = 0
  47. end
  48. LastJumpTime = os.time()
  49. if Code == "space" and not GPE and Char.Humanoid.Jump == true then
  50. if S2 >= 1 then
  51. if Current < Max then
  52. Current = Current+1
  53. CD = true
  54. S2 = 0
  55. local Effect = Instance.new("Part",Char.Torso)
  56. Effect.BrickColor = BrickColor.new("Industrial white")
  57. Effect.Transparency = 0.2
  58. Effect.Material = "SmoothPlastic"
  59. Effect.CanCollide = true
  60. Effect.Anchored = true
  61. Effect.FormFactor = "Custom"
  62. Effect.Size = Vector3.new(3,0.4,3)
  63. Effect.CFrame = Char.Torso.CFrame-Vector3.new(0,1,0)
  64. local EM = "http://www.roblox.com/asset/?id=1095708"
  65. local Sfx = Instance.new("Sound",Effect)
  66. Sfx.SoundId = "http://www.roblox.com/Asset?ID=213188220"
  67. Sfx:Play()
  68. wait(.1)
  69. local Expande = coroutine.wrap(Expand)
  70. Expande(Effect)
  71. Effect.CanCollide = false
  72. CD = false
  73. else
  74. CD = true
  75. wait(ReloadTime)
  76. Current = 0
  77. CD = false
  78. end
  79. else
  80. S2=1
  81. end
  82. end
  83. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement