Help making a better weight

Hello, i am trying to make a new weight that is better than starter one but i dont really know how i could do that because of my script wich makes all lifting tools give + 8 * Rebirths and i dont know how to make another tool that is better. If you could help that would be awesome!

Great, you already have a tool. Can you please reply me with the code you have so I can look into it and see what can be done so I can suggest what to change to make a better tool?

Sure thing! do you want the Remotes Script in SSS or the ModuleScript in the tool or the LocalScript in the tool? Btw with better than the starter i mean gives more strength

1 Like

Can you post all of them? I’m going to see which script has the script that tells you the strength of the tools.

Sure thing ill do that!

ModuleScript
local module = {}
local replicatedStorage = game:GetService(“ReplicatedStorage”)

function module.Lift()

replicatedStorage.Remotes.Lift:FireServer()

end
return module

LocalScript
local module = require(script.Parent:WaitForChild(“ModuleScript”))

local player = game.Players.LocalPlayer

local mouse = player:GetMouse()

script.Parent.Activated:Connect(function()

module.Lift()

end)

Remotes Script
local replicatedStorage = game:GetService(“ReplicatedStorage”)
local remoteData = game:GetService(“ServerStorage”):WaitForChild(“RemoteData”)
local starterRebirthAmount = 5000

local cooldown = 1

replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player)

if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end
 
local debounce = remoteData[player.Name].Debounce

if not debounce.Value then
debounce.Value = true

player.leaderstats.Strength.Value = player.leaderstats.Strength.Value + 8 * (player.leaderstats.Rebirths.Value + 1)

wait(cooldown)

debounce.Value = false

end

end)
replicatedStorage.Remotes.Rebirth.OnServerInvoke = function(player)

if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end

local rebirths = player.leaderstats.Rebirths


if player.leaderstats.Strength.Value >=(math.floor((starterRebirthAmount + (rebirths.Value) * math.sqrt(5000000)))) then
	
	rebirths.Value = rebirths.Value + 1
	
	player.leaderstats.Strength.Value = 0
	
	player:LoadCharacter()
	
	return true
	else return "NotEnoughStrength"
	
end

end

Ok, so is the localscript in the tool? if it is, add local Strength = 80 to the Localscript. The script should look like this. change the number to the amount of strength you want the tool to give.

local module = require(script.Parent:WaitForChild(“ModuleScript”))

local Strength = 80

local player = game.Players.LocalPlayer

local mouse = player:GetMouse()

script.Parent.Activated:Connect(function()

module.Lift(Strength)

end)

Ok, now in the Module script, you can add the strength in the first argument in function module.Lift(), (In the parenthesis)
so like this,

local module = {}
local replicatedStorage = game:GetService(“ReplicatedStorage”)

function module.Lift(Strength)

replicatedStorage.Remotes.Lift:FireServer(Strength)

end
return module

Now if I’m correct, you can add the Strength argument to
replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player)
In this part of the script,
player.leaderstats.Strength.Value = player.leaderstats.Strength.Value + 8 * (player.leaderstats.Rebirths.Value + 1)
, you can replace the 8 with the Strength. So like this,

local replicatedStorage = game:GetService(“ReplicatedStorage”)
local remoteData = game:GetService(“ServerStorage”):WaitForChild(“RemoteData”)
local starterRebirthAmount = 5000

local cooldown = 1

replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player, Strength)

if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end

local debounce = remoteData[player.Name].Debounce

if not debounce.Value then
debounce.Value = true

player.leaderstats.Strength.Value = player.leaderstats.Strength.Value + Strength * (player.leaderstats.Rebirths.Value + 1)

wait(cooldown)

debounce.Value = false

end

end)
replicatedStorage.Remotes.Rebirth.OnServerInvoke = function(player)

if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end

local rebirths = player.leaderstats.Rebirths


if player.leaderstats.Strength.Value >=(math.floor((starterRebirthAmount + (rebirths.Value) * math.sqrt(5000000)))) then
	
	rebirths.Value = rebirths.Value + 1
	
	player.leaderstats.Strength.Value = 0
	
	player:LoadCharacter()
	
	return true
	else return "NotEnoughStrength"
	
end

end

Tell me if this works or not.

Yay my fourth reply

This does not work. In script analysis it says unknown global ‘Strength’

i need to have a starter tool and a better tool than starter so saying instead of ‘8’ then ‘Strength’ or any other number is not gonna work

I am sorry but it does work i just didnt see that line that u added ‘Strength’