local passId = 252508600 function onClick(player) return game:GetService("GamePassService"):PlayerHasPass(player, passId) end while true do function onClick() if click then script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 16 script.Parent.Text = "ON" click = false else script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 36 script.Parent.Text = "OFF" click = true end end click = false script.Parent.MouseButton1Click:connect(onClick)
A moderator just closed your thread, why make a new one?
Try this out:
local passId = 252508600 click = false local player = script.Parent.Parent.Parent.Parent local gp = game:GetService("GamePassService") function onClick() if click == false and gp:PlayerHasPass(player, passId) then script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 36 script.Parent.Text = "ON" click = true elseif click == true and gp:PlayerHasPass(player, passId) then script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 16 script.Parent.Text = "ON" click = false end end script.Parent.MouseButton1Click:connect(onClick)