local player = game.Players.LocalPlayer
local ID = 827000227--put your game pass id here
script.Parent.MouseButton1Click:Connect(function()
MS:PromptGamePassPurchase(player,ID)
end)
MS.PromptGamePassPurchaseFinished:Connect(function(plr, id, purchased)
if id == ID then
if purchased == true then
local event = game.ReplicatedStorage.BuyTimeRemoteEvent0
local LocalPlayer = game:GetService("Players").LocalPlayer
event:FireServer()
end
end
end)``` (local script) ^^^
```local event = game.ReplicatedStorage.BuyTimeRemoteEvent0
event.OnServerEvent:Connect(function(plr)
game.Players:FindFirstChild(plr.Name).leaderstats.Time.Value = game.Players:FindFirstChild(plr.Name).leaderstats.Time.Value + 100
end)``` (Server script) ^^^
#why does it go up 200 and not 100
11 messages · Page 1 of 1 (latest)
mildly unrelated but you can just do game.Players:FindFirstChild(plr.Name).leaderstats.Time.Value += 100 instead of game.Players:FindFirstChild(plr.Name).leaderstats.Time.Value = game.Players:FindFirstChild(plr.Name).leaderstats.Time.Value + 100
I did that but it didnt work so I changed it back
it wasnt a fix just a tip i guess
for the fix idk i never used gamepasses before
☁️
bruh
SOMEONE HELP MMEEE
plssssssssssss