johny220
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 4584 |
|
|
| 11 Aug 2015 03:20 PM |
cost = script.Parent level = cost.Parent.Level button = script.Parent.Parent.Parent ChaChing = game.Players.LocalPlayer.leaderstats.Cash Clickspeed = game.Players.LocalPlayer.Backpack.ClickSpeed
if level.Value == 1 then cost.Value = 50 Clickspeed.Value = 1 if level.Value == 2 then cost.Value = 125 Clickspeed.Value = 0.8 if level.Value == 3 then cost.Value = 300 Clickspeed.Value = 0.7 if level.Value == 4 then cost.Value = 800 Clickspeed.Value = 0.6 if level.Value == 5 then cost.Value = 2000 Clickspeed.Value = 0.5 if level.Value == 6 then cost.Value = 3200 Clickspeed.Value = 0.3 if level.Value == 7 then cost.Value = 5000 Clickspeed.Value = 0.2 if level.Value == 8 then cost.Value = 11500 Clickspeed.Value = 0.12 if level.Value == 9 then cost.Value = 25000 Clickspeed.Value = 0.1 if level.Value == 10 then cost.Value = 50000 Clickspeed.Value = 0.07 if level.Value == 11 then cost.Value = 100000 Clickspeed.Value = 0.03 if level.Value == 12 then cost.Value = 250000 Clickspeed.Value = 0.01 if level.Value == 13 then Clickspeed.Value = 0 script.Parent.Parent.Text = "MAX" script.Parent.Parent.TextColor3 = Color3.new(255, 39, 39) script.Parent.Parent.TextStrokeColor3 = Color3.new(170, 10, 10) end end end end end end end end end end end end end
if ChaChing.Value >= cost.Value then script.Parent.MouseButton1Down:connect(function() script.Parent.Sound:Play() level = level + 1 end) end
--------------------------------------------------------------
the last few lines are probably where I messed up. I dunno what I did wrong. I checked the parents and all that, and there are no blue or red squiggly's anywhere |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2015 03:23 PM |
| Now is this in a local script?? |
|
|
| Report Abuse |
|
|
johny220
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 4584 |
|
|
| 11 Aug 2015 03:25 PM |
| dangit lol. totally forgot |
|
|
| Report Abuse |
|
|
johny220
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 4584 |
|
| |
|
|
| 11 Aug 2015 03:31 PM |
| You got a click detector as well??? |
|
|
| Report Abuse |
|
|
johny220
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 4584 |
|
|
| 11 Aug 2015 03:34 PM |
| you don't need those for GUI's. It's an imagebutton |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2015 03:35 PM |
| I'm no expert on GUIs lol. I'm still a noob in scripting |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 11 Aug 2015 03:36 PM |
for christ sakes. LEARN HOW TO USE LOOPS. AND ELSEIFS God dammit
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
johny220
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 4584 |
|
|
| 11 Aug 2015 03:39 PM |
| what do I need loops for lol |
|
|
| Report Abuse |
|
|
johny220
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 4584 |
|
|
| 11 Aug 2015 03:39 PM |
cost = script.Parent level = cost.Parent.Level button = script.Parent.Parent.Parent ChaChing = game.Players.LocalPlayer.leaderstats.Cash Clickspeed = game.Players.LocalPlayer.Backpack.ClickSpeed
if level.Value == 1 then cost.Value = 50 Clickspeed.Value = 1 elseif level.Value == 2 then cost.Value = 125 Clickspeed.Value = 0.8 elseif level.Value == 3 then cost.Value = 300 Clickspeed.Value = 0.7 elseif level.Value == 4 then cost.Value = 800 Clickspeed.Value = 0.6 elseif level.Value == 5 then cost.Value = 2000 Clickspeed.Value = 0.5 elseif level.Value == 6 then cost.Value = 3200 Clickspeed.Value = 0.3 elseif level.Value == 7 then cost.Value = 5000 Clickspeed.Value = 0.2 elseif level.Value == 8 then cost.Value = 11500 Clickspeed.Value = 0.12 elseif level.Value == 9 then cost.Value = 25000 Clickspeed.Value = 0.1 elseif level.Value == 10 then cost.Value = 50000 Clickspeed.Value = 0.07 elseif level.Value == 11 then cost.Value = 100000 Clickspeed.Value = 0.03 elseif level.Value == 12 then cost.Value = 250000 Clickspeed.Value = 0.01 elseif level.Value == 13 then Clickspeed.Value = 0 script.Parent.Parent.Text = "MAX" script.Parent.Parent.TextColor3 = Color3.new(255, 39, 39) script.Parent.Parent.TextStrokeColor3 = Color3.new(170, 10, 10) end
if ChaChing.Value >= cost.Value then script.Parent.MouseButton1Down:connect(function() script.Parent.Sound:Play() level.Value = level.Value + 1 end) end
ok more organized sorry it was 2 am when i made dat |
|
|
| Report Abuse |
|
|
Dman2436
|
  |
| Joined: 26 May 2012 |
| Total Posts: 1039 |
|
| |
|
|
| 11 Aug 2015 03:41 PM |
Ewww, use tables.
Women are like fine wine, I can't get their tops off |
|
|
| Report Abuse |
|
|
johny220
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 4584 |
|
|
| 11 Aug 2015 03:46 PM |
| bruh i just said it's an imagebutton |
|
|
| Report Abuse |
|
|