Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
1,486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. -- Synapse Decompiler
  2. -- Purchase Here: https://brack4712.xyz/synapse/purchase/
  3. debounce = false
  4. local mps = game:GetService("MarketplaceService")
  5. local id = game.ReplicatedStorage.id.Value
  6. function playSound(tp)
  7. local snds = {
  8. click = 421058925,
  9. ooer = 138090596,
  10. success = 642969239
  11. }
  12. if snds[tp] then
  13. do
  14. local sound = Instance.new("Sound")
  15. sound.SoundId = "rbxassetid://" .. tostring(snds[tp])
  16. sound.Ended:Connect(function()
  17. sound:Destroy()
  18. end)
  19. sound.Parent = script
  20. sound:Play()
  21. end
  22. end
  23. end
  24. script.Parent.MouseButton1Down:connect(function()
  25. if not debounce then
  26. debounce = true
  27. local you = 0
  28. for i, v in pairs(game.Workspace.DestroyableObjects:GetChildren()) do
  29. if v.Name == "Printer" and v.Head.Owner.Value == game.Players.LocalPlayer.Name then
  30. you = you + 1
  31. end
  32. end
  33. for i, v in pairs(game.Workspace.CurrentCamera:GetChildren()) do
  34. if v.Name == "Printer" and v.Head.Owner.Value == game.Players.LocalPlayer.Name then
  35. you = you + 1
  36. end
  37. end
  38. for i, v in pairs(game.ReplicatedStorage.Printers:GetChildren()) do
  39. if v.Name == "Printer" and v.Head.Owner.Value == game.Players.LocalPlayer.Name then
  40. you = you + 1
  41. end
  42. end
  43. if game.Players.LocalPlayer.leaderstats.Tokens.Value >= tonumber(script.Parent.Text:sub(2)) then
  44. if mps:PlayerOwnsAsset(game.Players.LocalPlayer, id) and you < 5 then
  45. game.ReplicatedStorage.CreatePrinter:InvokeServer("Bronze", game.Players.LocalPlayer.Name, tonumber(script.Parent.Text:sub(2)))
  46. elseif you < 2 then
  47. game.ReplicatedStorage.CreatePrinter:InvokeServer("Bronze", game.Players.LocalPlayer.Name, tonumber(script.Parent.Text:sub(2)))
  48. else
  49. _G.Purchase(id)
  50. end
  51. else
  52. playSound("ooer")
  53. end
  54. wait(1)
  55. debounce = false
  56. end
  57. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement