I have no idea how to make this, can someone help me and explain this to me
local MPS = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local GamePassId = 10211208 -- your gamepass id here
local RespawnTime = 13
local Reward = 10
local Collected = false
function Touch(object)
if object.Parent:FindFirstChild("Humanoid") then
if Players:GetPlayerFromCharacter(object.Parent) then
local Player = Players:GetPlayerFromCharacter(object.Parent)
local leaderstats = Player:FindFirstChild("leaderstats")
local Coins = leaderstats:FindFirstChild("Coins")
if leaderstats ~= nil and Coins ~= nil then
if not Collected then
Collected = true
if not MPS:UserOwnsGamePassAsync(Player.UserId, GamePassId) then
Coins.Value += Reward
else
Coins.Value += Reward *2
end
script.Parent.Transparency = 1
script.Parent.CanCollide = false
wait(RespawnTime)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
Collected = false
end
end
end
end
end
script.Parent.Touched:connect(Touch)

9 comments
Do you mean like when you pick up a coin it give you a double when event?
yes
i can do it
wait 1 hour
i still have something to do
ok, thanks!
no problem :D
There you are :D, Sorry if its not working! Comment on it if its not working!!!
Use :Connect instead of :connect, as it is deprecated