Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local main = require(game:GetService("ServerScriptService").Main)
  3. local msg = require(game:GetService("ServerScriptService").Message)
  4.  
  5. while true do
  6. wait(1)
  7. local success, err = pcall(function()
  8. for _,player in pairs(Players:GetPlayers()) do
  9. local GPStat = main:QueryStat(player,"GoldPoints",0)
  10. local DIAR = main:QueryStat(player,"DaysInARow",0)
  11. local Day = main:QueryStat(player,"Day",0)
  12. if GPStat and DIAR and Day then
  13. if os.difftime(os.time(),Day) >= (60*60)*0.025 then
  14. if os.difftime(os.time(),Day) >= (60*60)*0.050 then
  15. main:SetStat(player, "DaysInARow", 0)
  16. end
  17. main:SetStat(player, "Day", os.time())
  18. main:AddStat(player, "DaysInARow", 1)
  19.  
  20. if main:QueryStat(player,"DaysInARow") >= 1 then
  21. msg:Announce(player,"Awarded 100 Gold Points for your first daily login. Check back tomorrow for 300 Gold Points.")
  22. main:AddStat(player, "GoldPoints", 100, true)
  23.  
  24. elseif main:QueryStat(player,"DaysInARow") >= 2 then
  25. msg:Announce(player,"Awarded 300 Gold Points for your second daily login. Check back tomorrow for 500 Gold Points.")
  26. main:AddStat(player, "GoldPoints", 300, true)
  27.  
  28. elseif main:QueryStat(player,"DaysInARow") >= 3 then
  29. msg:Announce(player,"Awarded 500 Gold Points for your third daily login. Check back tomorrow for 700 Gold Points and 100,000 Multiplier.")
  30. main:AddStat(player, "GoldPoints", 500, true)
  31.  
  32. elseif main:QueryStat(player,"DaysInARow") >= 4 then
  33. msg:Announce(player,"Awarded 700 Gold Points and 100,000 multiplier for your fourth daily login. Check back tomorrow for 1000 Gold Points.")
  34. main:AddStat(player, "GoldPoints", 700, true)
  35. main:AddStat(player, "Multiplier", 100000*main:QueryStat(player,"Omega"), true)
  36.  
  37. elseif main:QueryStat(player,"DaysInARow") >= 5 then
  38. msg:Announce(player,"Awarded 1000 Gold Points for your fifth daily login. Check back tomorrow for 5000 Gold Points.")
  39. main:AddStat(player, "GoldPoints", 1000, true)
  40.  
  41. elseif main:QueryStat(player,"DaysInARow") >= 6 then
  42. msg:Announce(player,"Awarded 5000 Gold Points for your sixth daily login. Check back tomorrow for 7000 Gold Points and 75 Omega Multiplier.")
  43. main:AddStat(player, "GoldPoints", 5000, true)
  44.  
  45. elseif main:QueryStat(player,"DaysInARow") >= 7 then
  46. msg:Announce(player,"Awarded 7000 Gold Points and 75 omega for your seventh daily login. Check back tomorrow for 100 Gold Points.")
  47. main:AddStat(player, "Omega", 75, true)
  48. main:AddStat(player, "GoldPoints", 7000, true)
  49. main:SetStat(player, "DaysInARow", 0)
  50.  
  51. end
  52. else
  53. local Main = player.PlayerGui:FindFirstChild("MainGui")
  54. if Main then
  55. local NextDaily = Main:FindFirstChild("NextDaily")
  56. if NextDaily then
  57. local Total = (60*60)*0.025
  58. local Diff = os.difftime(os.time(),Day)
  59. Total = Total - Diff
  60. local Hour = math.floor(Total/60/60)
  61. local Min = math.floor(Total/60-Hour*60)
  62. local Sec = Total-(Hour*60*60)-(Min*60)
  63. if Min < 10 then
  64. Min = "0"..Min
  65. end
  66. if Sec < 10 then
  67. Sec = "0"..Sec
  68. end
  69. NextDaily.Text = "Daily Reward in: "..Hour..":"..Min..":"..Sec
  70. end
  71. end
  72. end
  73. else print("DailyRewards: Error while collecting data from Main") end
  74. end
  75. end)
  76. if not success then
  77. warn(err)
  78. end
  79. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement