Egg_Person0

Script for leesdas

Oct 23rd, 2021
772
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. game. Players. PlayerAdded: Connect (function (player)
  3.     local leaderstats = Instance.new ("Folder",player)
  4.     leaderstats. Name = "leaderstats"
  5.     local leaderstatsvars = Instance.new("Folder", player)
  6.     leaderstatsvars.Name = "LeaderStatsVariables"
  7.     --Clicks
  8.     local Clicks = Instance.new ("NumberValue", leaderstats)
  9.     Clicks.Name = "Clicks"
  10.  
  11.     --Multiplier
  12.     local Multi = Instance.new ("NumberValue", leaderstats)
  13.     Multi.Name = "Multi"
  14.     Multi.Value = 1
  15.     local onSwitch = Instance.new("BoolValue",leaderstatsvars)
  16.     onSwitch.Value = false
  17.     onSwitch.Name = "onSwitch"
  18.     --The Income
  19.     local ClicksPerSecond = Instance.new ("NumberValue",player.LeaderStatsVariables)
  20.     ClicksPerSecond.Name = "ClicksPerSecond"
  21.     local IncompleetIncome = Instance.new ("NumberValue",player.LeaderStatsVariables)
  22.     IncompleetIncome.Name = "Incompleet Income"
  23.     IncompleetIncome.Value = Multi.Value + ClicksPerSecond.Value
  24.     local TotalIncome = Instance.new ("NumberValue",player.LeaderStatsVariables)
  25.     TotalIncome.Name = "TotalIncome"
  26.     TotalIncome.Value = IncompleetIncome.Value + Clicks.Value
  27.  
  28.     --TotalIncome
  29.     local Income = Instance.new ("NumberValue", leaderstats)
  30.     Income.Name = "Income"
  31.     Income.Value = TotalIncome.Value
  32.     --Clicks per Second
  33.     local CPS = Instance.new ("NumberValue", leaderstats)
  34.     CPS.Name = "CPS"
  35.     CPS.Value = IncompleetIncome.Value
  36.  
  37.  
  38.     --Income Per Second
  39.     while wait(1) do
  40.         if leaderstatsvars.onSwitch.Value == true then
  41.             IncompleetIncome.Value = Multi.Value + ClicksPerSecond.Value
  42.             TotalIncome.Value = IncompleetIncome.Value + Clicks.Value
  43.             Income.Value = TotalIncome.Value
  44.             Clicks.Value += IncompleetIncome.Value
  45.             if Clicks. Value > 300 then
  46.                 break
  47.             end
  48.         end
  49.     end
  50. end)
  51. --CPS onclick
  52. workspace.CPSButton.ClickDetector.MouseClick: Connect (function (player)
  53.     local ClicksPerSecond =player.LeaderStatsVariables["ClicksPerSecond"]
  54.     ClicksPerSecond. Value += 1
  55.     player.LeaderStatsVariables.onSwitch.Value = true
  56. end)
  57. --Clicks onclick
  58. workspace.ClicksButton.ClickDetector.MouseClick: Connect (function (player)
  59.     local IncompleetIncome = player.LeaderStatsVariables["Incompleet Income"]
  60.     player.leaderstats.Clicks.Value += 1 + (IncompleetIncome. Value / 100)
  61. end)
  62. --Multi onclick
  63. workspace.MultiButton.ClickDetector.MouseClick:Connect (function (player)
  64.     local Multi =player.leaderstats["Multi"]
  65.     Multi.Value += 1
  66. end)
  67. --Color Switch onclick
  68. workspace.ClickRandomColor.ClickDetector.MouseClick:Connect (function (player)
  69.     workspace.ClickRandomColor.BrickColor = BrickColor.Random()
  70.     workspace.ClickRandomColor.Transparency = workspace.ClickRandomColor.Transparency + 0.01
  71.     player.LeaderStatsVariables.onSwitch.Value = false
  72. end)
RAW Paste Data