Advertisement
Guest User

Roblox Gear 2

a guest
Apr 1st, 2022
1,354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. Roblox Gear 2 Script
  2.  
  3. ServerScriptService Script:
  4.  
  5. game.Players.PlayerAdded:Connect(function(player)
  6. local GEARS = Instance.new("Folder")
  7. GEARS.Name = "GearsFolder"
  8. GEARS.Parent = player
  9. ---creats a folder in the player called gears
  10. local Gear2 = Instance.new("BoolValue")
  11. Gear2.Value = false
  12. Gear2.Parent = GEARS
  13. Gear2.Name = "Gear2"
  14. -- creats a true or false within the folder called gear 2
  15. local Gear3 = Instance.new("BoolValue")
  16. Gear3.Value = false
  17. Gear3.Parent = GEARS
  18. Gear3.Name = "Gear3"
  19. --creats gear 3 true or false in folder
  20. local Gear4 = Instance.new("BoolValue")
  21. Gear4.Value = false
  22. Gear4.Parent = GEARS
  23. Gear4.Name = "Gear4"
  24. --creats gear 4 true or false in folder
  25. print("Made Gears")
  26. end)
  27.  
  28. Activate Gear 2 script:
  29.  
  30. local UIS = game:GetService("UserInputService")
  31. local gear2 = game.Workspace["Gear 2"]
  32. debounce = false
  33. local player = game.Players.LocalPlayer
  34. ---gets required variebals
  35. UIS.InputBegan:Connect(function(input, IsTyping)
  36. local Gear2 = game.Players.LocalPlayer:FindFirstChild("GearsFolder").Gear2 -- activates UIS
  37. if IsTyping then-- checks if typing, if is typing then it wont run
  38. return "Typing"
  39.  
  40. elseif input.KeyCode == Enum.KeyCode.G and Gear2.Value == false then
  41. while wait(1) do
  42. Gear2.Value = true --value, speed and dmg values
  43. local humanoid = player.Character:WaitForChild("Humanoid")
  44.  
  45.  
  46. humanoid:TakeDamage(0.45)
  47. humanoid.WalkSpeed = 25
  48. if Gear2.Value == true and gear2.Playing == false then ---- functions outside of a loop, idk how it works it just does
  49. gear2:Play()
  50. gear2.Looped = true
  51. gear2.PlaybackSpeed = 1.1
  52.  
  53. end
  54. if Gear2.Value == true and humanoid.Health <= 0 then
  55. Gear2.Value = false
  56. gear2:Stop()
  57. break
  58. end
  59. end
  60. end
  61. end)
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement