Making the player buy a dev product every 60 seconds, or else they cant walk

I need a prompt to appear every 60 seconds, and like the title says, if they decline they cant walk.
I tried using a server script and a local script and both but can’t figure this one out, I dont have much experience with dev products.

Have you created Dev Products?
I’m on mobile so I give you only an example:

local DevP1 = 0 (Id here)
local MS = game:GetService("MarketplaceService") 

game.Players.PlayerAdded:connect(function(player)
game.Workspace:WaitForChild(player.Name).WalkSpeed = 0
MS:PromtProductPurchase(player,DevP1)
while wait(60) do 
game.Workspace:WaitForChild(player.Name).WalkSpeed = 0
MS:PromtProductPurchase(player,Dev1) 
end)

MS.ProcessReceipt:connect(function(plr,Dev)
if Dev == DevP1 then 
game.Workspace:WaitForChild(player.Name).WalkSpeed = 15
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end)

A friendly reminder that I’m on mobile, so I can’t check if it’s right.

1 Like

Hackers could just, Change theirs Humanoid.WalkSpeed, Anchoring wont really work well when the network owner is the client

Did you got the question right?
He asked, how he could achieve that with the WalkSpeed, nothing with hackers.
Hackers can easily bypass everything.
But thanks for pointing that out.

Yes, also I would prob transfer the ownership to the server when the player’s suppose to be froze