#Help maybe script
1 messages · Page 1 of 1 (latest)
show me the script
** You are now Level 4! **
alr\
This gives u gamepass
`local button = script.Parent
local Players = game:GetService("Players")
local MarketplaceService = game:GetService("MarketplaceService")
local player = Players.LocalPlayer
local gamePassId = 1345252996 -- YOUR game pass ID
button.MouseButton1Click:Connect(function()
MarketplaceService:PromptGamePassPurchase(player, gamePassId)
end)`
This is meant to give 2x cash when u step on button to collect cash
`local part = script.Parent
part.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if not player then return end
local leaderstats = player:FindFirstChild("leaderstats")
if not leaderstats then return end
local cash = leaderstats:FindFirstChild("Cash")
if not cash then return end
-- Optional: Only give once per touch
if part:GetAttribute("Cooldown_"..player.UserId) then return end
part:SetAttribute("Cooldown_"..player.UserId, true)
task.delay(1, function()
part:SetAttribute("Cooldown_"..player.UserId, nil)
end)
-- Multiplier logic
local multiplier = 1
if player:FindFirstChild("DoubleCash") and player.DoubleCash.Value then
multiplier = 2
end
-- Give Cash
local amount = 10 * multiplier -- change 10 to your dropper's value
cash.Value += amount
end)
`
did you put htis in a local script
This is my local script code in StarterGUI
U can join game and see if u want
I’m not very good at studio so
local cooldowns = {}
part.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if not player then return end
local leaderstats = player:FindFirstChild("leaderstats")
if not leaderstats then return end
local cash = leaderstats:FindFirstChild("Cash")
if not cash then return end
if cooldowns[player.UserId] then return end
cooldowns[player.UserId] = true
task.delay(1, function()
cooldowns[player.UserId] = nil
end)
local multiplier = 1
local doubleCash = player:FindFirstChild("DoubleCash")
if doubleCash and doubleCash:IsA("BoolValue") and doubleCash.Value then
multiplier = 2
end
local amount = 10 * multiplier
cash.Value += amount
end)
try this your second script
that you sended
Ok
Nope
Also how can I add a GUI that shows ur cash on screen (ik i add something into StarterGUI but that’s it)
i can help
add me
my user