local Req = plr.RequiredStrength.Value
local level = plr.leaderstats.Level.Value
local RequiredStrength = Req * 1.75
if RequiredStrength <= plr.leaderstats.Strength.Value and level == 1 then
print("OKOK OK OOK")
plr.PlayerGui.ScreenGui.Progress_Bar.Bar:TweenSize(UDim2.new(1.001, 0,1, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 1, false)
end
So this script keeps getting the strength value and multiply it by 1.75 i want the script to get only one value
You’re telling it to get the strength value and multiply by 1.75, so it always will. What “one value” do you want it to get? I don’t understand what the issue is.
I want it to get a one strength value and multiply it by 1.75 instead of getting a new strength value everytime i click
Is that the full script? I don’t see anything about clicking.
game.ReplicatedStorage.try.OnServerEvent:Connect(function(plr)
plr.leaderstats.Strength.Value += plr.Multiplier.Value
--plr.PlayerGui.ScreenGui.Progress_Bar.Bar:TweenPosition(UDim2.new(0, plr.leaderstats.Strength.Value/10 * 98))
plr.RequiredStrength.Value = plr.leaderstats.Strength.Value * 1.25
local Req = plr.RequiredStrength.Value
local level = plr.leaderstats.Level.Value
local RequiredStrength = Req * 1.75
local t = {}
table.insert(t, RequiredStrength)
print(table.unpack(t, 1))
if tonumber(table.unpack(t, 1)) <= plr.leaderstats.Strength.Value and level == 1 then
print("OKOK OK OOK")
plr.PlayerGui.ScreenGui.Progress_Bar.Bar:TweenSize(UDim2.new(1.001, 0,1, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 1, false)
end
end)
game.ReplicatedStorage.Rebirth.OnServerEvent:Connect(function(player, text, btn)
local Amount = player.Amount.Value
btn.MouseButton1Click:Connect(function()
player.Amount.Value = player.Amount.Value * 1.25
if player.leaderstats.Strength.Value >= Amount then
--text = player.leaderstats.Rebirths.Value + (1).."Rebirth for: "..Amount
player.Multiplier.Value *= 1.5
player.leaderstats.Strength.Value = 0
player.leaderstats.Rebirths.Value += 1
text.Text = player.leaderstats.Rebirths.Value + 1 .." Rebirth(s) for: "..Amount * 2
btn.Text = "Success!"
wait(0.5)
btn.Text = "Rebirth"
else
btn.Text = "Not enough strength :Face_Palm:"
wait(0.5)
btn.Text = "Rebirth"
return "not enough"
end
end)
while true do
wait(0.1)
text.Text = player.leaderstats.Rebirths.Value + 1 .." Rebirth(s) for: "..Amount * 2
end
end)```
local t = {}
table.insert(t, RequiredStrength)
print(table.unpack(t, 1))
if tonumber(table.unpack(t, 1))
What’s with this bit? Why are you using tables for this?
plr.leaderstats.Strength.Value += plr.Multiplier.Value
Other than this line here, I don’t see any place where you are updating the strength value in leaderstats. Is that a problem? Have you done any basic debugging to see what all of the individual variables are with prints or the debugger?
I fixed it im struggling to get the current tool name in player inventory