Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Roblox Gear 2 Script
- ServerScriptService Script:
- game.Players.PlayerAdded:Connect(function(player)
- local GEARS = Instance.new("Folder")
- GEARS.Name = "GearsFolder"
- GEARS.Parent = player
- ---creats a folder in the player called gears
- local Gear2 = Instance.new("BoolValue")
- Gear2.Value = false
- Gear2.Parent = GEARS
- Gear2.Name = "Gear2"
- -- creats a true or false within the folder called gear 2
- local Gear3 = Instance.new("BoolValue")
- Gear3.Value = false
- Gear3.Parent = GEARS
- Gear3.Name = "Gear3"
- --creats gear 3 true or false in folder
- local Gear4 = Instance.new("BoolValue")
- Gear4.Value = false
- Gear4.Parent = GEARS
- Gear4.Name = "Gear4"
- --creats gear 4 true or false in folder
- print("Made Gears")
- end)
- Activate Gear 2 script:
- local UIS = game:GetService("UserInputService")
- local gear2 = game.Workspace["Gear 2"]
- debounce = false
- local player = game.Players.LocalPlayer
- ---gets required variebals
- UIS.InputBegan:Connect(function(input, IsTyping)
- local Gear2 = game.Players.LocalPlayer:FindFirstChild("GearsFolder").Gear2 -- activates UIS
- if IsTyping then-- checks if typing, if is typing then it wont run
- return "Typing"
- elseif input.KeyCode == Enum.KeyCode.G and Gear2.Value == false then
- while wait(1) do
- Gear2.Value = true --value, speed and dmg values
- local humanoid = player.Character:WaitForChild("Humanoid")
- humanoid:TakeDamage(0.45)
- humanoid.WalkSpeed = 25
- if Gear2.Value == true and gear2.Playing == false then ---- functions outside of a loop, idk how it works it just does
- gear2:Play()
- gear2.Looped = true
- gear2.PlaybackSpeed = 1.1
- end
- if Gear2.Value == true and humanoid.Health <= 0 then
- Gear2.Value = false
- gear2:Stop()
- break
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement