Hey guys!
I apologize in advance for a LONG POST
The following script should decrease/increase the value of Gold from 1K, 10K or 100K to 1K, 10K or 100K. Confused? Here's what I mean: Value is 1000 - Increases to 10K when "+" button is pressed Value is 100K - Decreases to 10K when "-" button is clicked But the script does not change the value when the value is 10K. To explain it further: When I click the + button, it stays at 10K. Same applies to the - button.
This script INCREASES the value The problem in this code is when the text is NOT green.
Frame = script.Parent.Parent --[[ NOTES: AMOUNTS GOLD: 1K, 10K, 100K POINTS: 5, 10, 15 --]] script.Parent.MouseButton1Click:connect(function() if Frame.Amt.Value >= 100000 and Frame.Type.Value == "Gold" then script.Parent.Parent.Amt.Value = 100000 script.Parent.Text = "Maximum amount is 100K Gold" wait(0.5) script.Parent.Text = "+" elseif script.Parent.Parent.Amt.Value == 10000 and Frame.Type == "Gold" then Frame.Amt.Value = 100000 elseif Frame.Amt.Value == 1000 and Frame.Type.Value == "Gold" then Frame.Amt.Value = 10000 --[[elseif Frame.Amt.Value >= 15 and Frame.Type.Value == "Points" then script.Parent.Text = "Maximum amount is 15 Points" wait(0.5) script.Parent.Text = "+" Frame.Amt.Value = 15 elseif Frame.Amt.Value == 10 and Frame.Type.Value == "Points" then Frame.Amt.Value = 15 elseif Frame.Amt.Value == 5 and Frame.Type.Value == "Points" then Frame.Amt.Value = 10]] end end)
This script DECREASES the value The problem lies where the text is NOT green
Frame = script.Parent.Parent --[[ NOTES: AMOUNTS GOLD: 1K, 10K, 100K POINTS: 5, 10, 15 --]] script.Parent.MouseButton1Click:connect(function() if Frame.Amt.Value <= 1000 and Frame.Type.Value == "Gold" then script.Parent.Parent.Amt.Value = 1000 script.Parent.Text = "Minimum amount is 1000 Gold" wait(0.5) script.Parent.Text = "-" elseif script.Parent.Parent.Amt.Value == 10000 and Frame.Type == "Gold" then Frame.Amt.Value = 1000 elseif Frame.Amt.Value == 100000 and Frame.Type.Value == "Gold" then Frame.Amt.Value = 10000 --[[elseif Frame.Amt.Value <= 5 and Frame.Type.Value == "Points" then script.Parent.Text = "Minimum amount is 5 Points" wait(0.5) script.Parent.Text = "-" Frame.Amt.Value = 5 elseif Frame.Amt.Value == 10 and Frame.Type.Value == "Points" then Frame.Amt.Value = 5 elseif Frame.Amt.Value == 15 and Frame.Type.Value == "Points" then Frame.Amt.Value = 10]] end end)
Frame = script.Parent.Parent --[[ NOTES: AMOUNTS GOLD: 1K, 10K, 100K POINTS: 5, 10,15 --]] script.Parent.MouseButton1Click:connect(function() if Frame.Amt.Value <= 1000 and Frame.Type.Value == "Gold" then script.Parent.Parent.Amt.Value = 1000 script.Parent.Text = "Minimum amount is 1000 Gold" wait(0.5) script.Parent.Text = "-" elseif script.Parent.Parent.Amt.Value == 10000 and Frame.Type == "Gold" then Frame.Amt.Value = 1000 elseif Frame.Amt.Value == 100000 and Frame.Type.Value == "Gold" then Frame.Amt.Value = 10000 --[[elseif Frame.Amt.Value <= 5 and Frame.Type.Value == "Points" then script.Parent.Text = "Minimum amount is 5 Points" wait(0.5) script.Parent.Text = "-" Frame.Amt.Value = 5 elseif Frame.Amt.Value == 10 and Frame.Type.Value == "Points" then Frame.Amt.Value = 5 elseif Frame.Amt.Value == 15 and Frame.Type.Value == "Points" then Frame.Amt.Value = 10]] end end)