This is a script, but i dont know how to use 2 of the same letters for Enum.For example i want to make a spritning script that when i press W twice it starts to run.
game:GetService("UserInputService").InputBegan:connect(function(input,gameprocesed) if input.KeyCode == Enum.KeyCode.Z then for i = 1,16 do wait() game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed + 1.5 end end end)
game:GetService("UserInputService").InputEnded:connect(function(input,gameprocesed) if input.KeyCode == Enum.KeyCode.Z then for i = 1,16 do wait() game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed - 1.5 end end end)
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Died:connect(function() game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 script.Disabled = true end)

2 comments
What is gpe in your code? I'm not working on this right now but I was going to make a way for the player to choose what buttons he wanted for what abilities and I didn't know how to store a Key without HardCoding it into the path.
GPE stands for GameProcessedEvent. It is a boolean that determines whether or not the input was delivered without using any of the core client features, such as chat. If it is not associated with chatting, GPE is false.