Scripting Helpers is winding down operations and is now read-only. More info→
Ad
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 years ago
Edited 4 years 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.

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

2 answers

Log in to vote
1
Answered by
raid6n 2196 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago
1local plr = game.Players.LocalPlayer
2local tool = script.parent
3local Energy = plr.leaderstats.Energy
4if Energy =< 500 then
5tool.Parent = game.Starterpack
6end
Ad
Log in to vote
0
Answered by
emervise 123
4 years ago

similar to what raid said

01local plr = game.Players.LocalPlayer
02local rustHammar = --whatever it is
03local fireHammar = script.Parent
04local Energy = plr.leaderstats.Energy
05 
06while true do
07        if Energy =< 500 then
08        tool.Parent = plr.Backpack
09        rustHammar.Archivable = true
10        break
11    end
12end

Answer this question