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)
You have this line:
script.Parent.MouseButton1Click:connect(onClick)
onClick is never defined as a function. Try changing
function isAuthenticated(player)
to
function onClick(player)
Closed as Not Constructive by evaera
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?