Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

Does anybody have a script where if you have a certain amount of energy it gives you a tool?

Asked by 4 months ago
Edited 4 months ago

so I have multiple hammers and I want it to be like if you have a certain amount of energy the archivable becomes true for the fire hammer and the rusted hammer archivable becomes false. Here is the script raid6n gave me.

local plr = game.players.localplayer 
local tool = script.parent 
local power = plr.leaderstats.power 
if tool.Parent == plr.Backpack then 
    power += 500 
end
0
code pls raid6n 2309 — 4mo
0
this isnt a script request site. we help, not give. please make an attempt before coming here zadobyte 692 — 4mo

2 answers

Log in to vote
1
Answered by
raid6n 2309 Moderation Voter Community Moderator
4 months ago
Edited 4 months ago
local plr = game.Players.LocalPlayer 
local tool = script.parent 
local Energy = plr.leaderstats.Energy 
if Energy =< 500 then
tool.Parent = game.Starterpack 
end
Ad
Log in to vote
0
Answered by 4 months ago

similar to what raid said

local plr = game.Players.LocalPlayer
local rustHammar = --whatever it is
local fireHammar = script.Parent
local Energy = plr.leaderstats.Energy

while true do
        if Energy =< 500 then
        tool.Parent = plr.Backpack
        rustHammar.Archivable = true
        break
    end
end

Answer this question