#Can you make a script where a guy could press shift and walk slowly like in cs 2?
1 messages · Page 1 of 1 (latest)
This channel is not to get people to write scripts for you
Also, this is literally just a generic shift to sprint script except make the "sprint" walkspeed lower than 16
local ContextActionService = game:GetService("ContextActionService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local DEFAULT_WALK_SPEED = 16 -- Set to whatever the original is
local TARGET_WALK_SPEED = 6 -- Set to however fast you want the player to walk when pressing LeftShift
local isWalking = false
ContextActionService:BindAction("SHIFT_TO_WALK", function(_, inputState: Enum.UserInputState, _)
if inputState == Enum.UserInputState.Begin then
if isWalking then
-- Reset to normal
hum.WalkSpeed = DEFAULT_WALK_SPEED
isWalking = false
else
-- Toggle on walking
hum.WalkSpeed = TARGET_WALK_SPEED
isWalking = true
end
end
end, false, Enum.KeyCode.LeftShift)
Place in StarterCharacterScripts
lol. those who gpt
Nope. Made straight from the brain.
Dumbass
Can only AI use ContextActionService? 🤡
"If you're good at something, I dont understand, you must be cheating" 🤡 🤡 🤡
get better at scripting lil bro - then maybe you'll understand it.
honestly a compliment, so thanks!
again, thanks for the compliment