script 1 :
local uis = game:GetService("UserInputService")
local event = game.ReplicatedStorage.RemoteEvent
uis.InputBegan:Connect(function(input, typing)
if input.KeyCode == Enum.KeyCode.LeftControl then
event:FireServer(0)
end
end)
uis.InputEnded:Connect(function(input, typing)
if input.KeyCode == Enum.KeyCode.LeftControl then
event:FireServer(1)
end
end)
uis.InputEnded:Connect(function(input, typing)
if input.KeyCode == Enum.KeyCode.Q then
event:FireServer(2)
(cooldown)
end
end)
script 2:
local event = game.ReplicatedStorage.RemoteEvent
event.OnServerEvent:Connect(function(player, sprint)
if sprint == 0 then
player.Character.Humanoid.WalkSpeed = 36
else if sprint == 1 then
player.Character.Humanoid.WalkSpeed = 16
else if sprint == 2 then
player.Character.Humanoid.WalkSpeed = 100 wait(0.3)player.Character.Humanoid.WalkSpeed = 16
end
end
end
end)