So I have a script that Goulestem helped me edit and it adds speed when you join my game if you have a certain Gamepass. It works but it constantly adds the amount I want it to, it doesnt just add it once it keeps going. Like if I want it to add one it will add 1 the whole time you are alive. I only want it to add once everytime you join for the whole game not always adding more. my script:
local gps = game:GetService("GamePassService");
local id = script:WaitForChild("GamePassID");
local Speed = script:WaitForChild("WalkSpeedAmount");
game.Players.PlayerAdded:connect(function(Player)
Player:WaitForDataReady()
if gps:PlayerHasPass(Player , id.Value) then
coroutine.resume(coroutine.create(function()
while wait() do
repeat wait() until Player.Character~=nil
local hum = Player.Character.Humanoid
hum.WalkSpeed = hum.WalkSpeed + Speed.Value
end
end))
end
end)
Inside this script is a GamePassID value which represents the ID, and the WalkSpeed which represent the amount of speed I want to add. Please help me if you can. THANKS!

2 comments
One more problem, when I die it goes away I want them to have it the whole game, how can I do that?
To keep the speed, even when you respawn, you're going to have to add the speed in a CharacterAdded event. I'll edit one in right now(;