Advertisement
chrisssss

Roblox Leaderboard Script

Dec 22nd, 2019
1,515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.65 KB | None | 0 0
  1. --[[hail subfare but dummiez more
  2.  
  3. You can set your settings for the leaderboard here. Simply leave this 'HighScore' Model in the Workspace,
  4. and do not touch the Config unless you know what you're doing!
  5.  
  6. ]]
  7.  
  8. ----------------------------------------------------------------------------------------------------------------------------
  9.  
  10. -- Edit stuff here
  11.  
  12. DATA_STORE      = "Tradslots" --< Name of the Data store values will be saved in
  13.  
  14. SCORE_UPDATE    = 30 --< How often you want the leaderboards to update in seconds (no less than 30)
  15.  
  16. PLAYER_UPDATE   = 30 --< How often you want the player's current stat to save in seconds (no less than 30)
  17.  
  18. PLAYER_SAVE     = "leaderstats" --< Do not change unless you are using something that is not leaderstats
  19.  
  20. NAME_OF_STAT    = "Credits" --< Name of the stat you want to save (HAS to be inside 'leaderstats' or whatever PLAYER_SAVE is)
  21.  
  22. -- When you're done make sure to uncheck the 'Disabled' behaviour on this script under Properties!
  23.  
  24. ----------------------------------------------------------------------------------------------------------------------------
  25.  
  26. -- Stuff (do not edit below)
  27.  
  28. local configModel = script.Parent.Config
  29. local scoreBlock = script.Parent.ScoreBlock
  30.  
  31. local uS = configModel.UploadScore
  32. local rS = configModel.RemoteScore
  33. local lSU = configModel.LocalScoreUpdate
  34.  
  35. uS.Refresh.Value = SCORE_UPDATE
  36. rS.Score.Value = NAME_OF_STAT
  37. rS.Original.Value = PLAYER_SAVE
  38. rS.DataStore.Value = DATA_STORE
  39. lSU.Refresh.Value = PLAYER_UPDATE
  40.  
  41. uS.Parent = game.ServerScriptService
  42. uS.Disabled = false
  43.  
  44. rS.Parent = game.Workspace
  45. rS.Disabled = false
  46.  
  47. lSU.Parent = game.StarterGui
  48. lSU.Disabled = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement