So here is the script I made and instead of doing line 1, 2 and 3 again can I look for the word Is in the value name and make that value false? If you can then can you help me on understanding to do it? I'm looking for a shortcut because soon I will add way more than 4 perks and would help a lot.
local TheName = -- Player's username
while true do
wait()
if game.Players:FindFirstChild(TheName).PerkValues.DoubleJumpGlideIs.Value == true then
game.Players:FindFirstChild(TheName).PerkValues.MoreHealthIs.Value = false -- line 1
game.Players:FindFirstChild(TheName).PerkValues.DoubledMoneyIs.Value = false -- line 2
game.Players:FindFirstChild(TheName).PerkValues.DoubledDamageIs.Value = false -- line 3
print("All other perks Unequipped")
else
print("Hi")
wait(5)
end
end

1 comment
would this work if the name is "DoubleMoneyIs"?