Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Synapse Decompiler
- -- Purchase Here: https://brack4712.xyz/synapse/purchase/
- debounce = false
- local mps = game:GetService("MarketplaceService")
- local id = game.ReplicatedStorage.id.Value
- function playSound(tp)
- local snds = {
- click = 421058925,
- ooer = 138090596,
- success = 642969239
- }
- if snds[tp] then
- do
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://" .. tostring(snds[tp])
- sound.Ended:Connect(function()
- sound:Destroy()
- end)
- sound.Parent = script
- sound:Play()
- end
- end
- end
- script.Parent.MouseButton1Down:connect(function()
- if not debounce then
- debounce = true
- local you = 0
- for i, v in pairs(game.Workspace.DestroyableObjects:GetChildren()) do
- if v.Name == "Printer" and v.Head.Owner.Value == game.Players.LocalPlayer.Name then
- you = you + 1
- end
- end
- for i, v in pairs(game.Workspace.CurrentCamera:GetChildren()) do
- if v.Name == "Printer" and v.Head.Owner.Value == game.Players.LocalPlayer.Name then
- you = you + 1
- end
- end
- for i, v in pairs(game.ReplicatedStorage.Printers:GetChildren()) do
- if v.Name == "Printer" and v.Head.Owner.Value == game.Players.LocalPlayer.Name then
- you = you + 1
- end
- end
- if game.Players.LocalPlayer.leaderstats.Tokens.Value >= tonumber(script.Parent.Text:sub(2)) then
- if mps:PlayerOwnsAsset(game.Players.LocalPlayer, id) and you < 5 then
- game.ReplicatedStorage.CreatePrinter:InvokeServer("Bronze", game.Players.LocalPlayer.Name, tonumber(script.Parent.Text:sub(2)))
- elseif you < 2 then
- game.ReplicatedStorage.CreatePrinter:InvokeServer("Bronze", game.Players.LocalPlayer.Name, tonumber(script.Parent.Text:sub(2)))
- else
- _G.Purchase(id)
- end
- else
- playSound("ooer")
- end
- wait(1)
- debounce = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement