Advertisement
firebudgy

Untitled

Feb 19th, 2018
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Script0 = Instance.new("Script")
  20. Script0.Name = "Money Leaderboard"
  21. Script0.Parent = Model0
  22. table.insert(cors,sandbox(Script0,function()
  23. print("Cash Leaderboard Loaded")
  24.  
  25.  
  26. function onPlayerEntered(newPlayer)
  27.  
  28. local stats = Instance.new("IntValue")
  29. stats.Name = "leaderstats"
  30.  
  31. local cash = Instance.new("IntValue")
  32. cash.Name = "Tickets" --name of currency (e.g. cash, money, resources, bucks, etc.)
  33. cash.Value = 1000 --starting money.
  34.  
  35. cash.Parent = stats
  36. stats.Parent = newPlayer
  37. end
  38.  
  39.  
  40.  
  41. game.Players.ChildAdded:connect(onPlayerEntered)
  42.  
  43.  
  44. --Script Made by Chibichuba8
  45. end))
  46. for i,v in pairs(mas:GetChildren()) do
  47. v.Parent = workspace
  48. pcall(function() v:MakeJoints() end)
  49. end
  50. mas:Destroy()
  51. for i,v in pairs(cors) do
  52. spawn(function()
  53. pcall(v)
  54. end)
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement