So basically, earlier I went to devforum for help on making a 2x money gamepass. That worked for the most part, but only one thing was amiss. Everything sells for double now. I think its an easy fix, im just new to scripting and don’t know how to do it. And @2112Jay made this for me! Thanks!
local MarketPlaceService = game:GetService(“MarketplaceService”)
local doublePass, gamepassID = false, 107510236
function Spawned(player)
local HasGamepass = false
local success, message = pcall(function()
HasGamepass = MarketPlaceService:UserOwnsGamePassAsync(player.userId, gamepassID)
end)
task.wait(1)
if not success then
warn("Checking Gamepass "..tostring(message))
return
else
doublePass = true
end
script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
local leaderstats = player:WaitForChild(“leaderstats”)
local money = leaderstats:FindFirstChild(“Money”)
local Sap = leaderstats:FindFirstChild(“Sap”)
if Sap.Value > 0 then
local pay = Sap.Value
if doublePass then pay *= 2
end
money.Value += pay
Sap.Value = 0
end
end
You said it works, only problem is it’s charging double. I thought when you touched something it gave you x2 money as in a x2 money gamepass. So the problem is the *=2 Change that to /=2 as this must be being used to buy something, with a 1/2 off game pass. No matter what name you’re calling it, in this case it’s taking 1/2 off the price not giving x2.
Sap is something that you added from some other place. No explanation was given. I’m still not sure how you’re using this script. To me, Sap sounds like something that happen from a hit.