Okay so I am making a game like Hello Neighbor. It's called Hello Friend! I made a gamepass that allows you to permanently without pressing shift. The only problem is that the gamepass isn't working correctly and there are already ALOT of people who bought it. I've been trying to fix this forever but I can't seem to fix it. Can someone please help?
Here is the script. It is ran as a localscript under starterplayer.startercharacterscripts:
local mouse = game.Players.LocalPlayer:GetMouse()
local running = false
character = script.Parent
mouse.KeyDown:connect(key) -- Run function
key = string.lower(key)
if string.byte(key) == 48 then
running = true
local keyConnection = mouse.KeyUp:connect(function (key)
if string.byte(key) == 48 then
running = false
end
end)
character.Humanoid.WalkSpeed = 32
repeat wait () until running == false
keyConnection:disconnect()
character.Humanoid.WalkSpeed = 20
end

1 comment
He has another script that does so. Anyways, his script works now