The wiki said I needed it in a script but I made it in a local script because the surface gui will not work to find the player then... I just need help figuring out what to do.
plr = game.Players.LocalPlayer
pass = 170156697
script.Parent.MouseButton1Click:connect(function()
if Game:GetService("GamePassService"):PlayerHasPass(plr, pass) then
if script.Parent.BackgroundColor3 == Color3.new(0,80/255,0) then
for i,v in pairs(game.ReplicatedStorage.Sporks:GetChildren()) do
if v:IsA("BasePart") then
clone = v:Clone()
clone.Parent = Workspace
end
end
script.Parent.BackgroundColor3 = Color3.new(225/255,0,0)
wait(10)
script.Parent.BackgroundColor3 = Color3.new(0,80/255,0)
end
end
end)

2 comments
Suggestion: comparing the background color to a constant is probably a bad idea. Some people are mistrustful of float comparison to begin with, but mostly this is just a brittle solution. Use a de-bounce like variable instead.
Ok