Ok. I tried to make a script where there's a math.random that gives you a certain value if you get a certain number.
local Backpack = game.Players.LocalPlayer:WaitForChild("Backpack")
local playerquirk = Backpack:WaitForChild("Quirk")
local quirk = math.random(1,10)
if playerquirk.Value == "None" then
game.Players.LocalPlayer.PlayerGui.GiveQuirk.PageOne.Quirk.TextButton.MouseButton1Down:Connect(function()
if quirk == 1 then
playerquirk.Value = "WarpGate"
elseif quirk == 2 then
playerquirk.Value = "Invisibility"
elseif quirk == 3 then
playerquirk.Value = "Invisibility"
elseif quirk == 4 then
playerquirk.Value = "HHHC"
elseif quirk == 4 then
playerquirk.Value = "Erasure"
elseif quirk == 5 then
playerquirk.Value = "Invisibility"
elseif quirk == 6 then
playerquirk.Value = "WarpGate"
elseif quirk == 7 then
playerquirk.Value = "HHHC"
elseif quirk == 8 then
playerquirk.Value = "Erasure"
elseif quirk == 9 then
playerquirk.Value = "Invisibility"
elseif quirk == 10 then
playerquirk.Value = "WarpGate"
end
script.Parent.Visible = false
script.Parent.Parent.Text = playerquirk.Value
wait(1.5)
game.Players.LocalPlayer.PlayerGui.GiveQuirk.PageOne.Visible = false
game.Players.LocalPlayer.PlayerGui.GiveQuirk.PageTwo.Visible = false
game.Players.LocalPlayer.Character.Humanoid.Health = 0
end)
end
NOT WORKING THOUGH! Help?

2 comments
all numbers after these 2 lines are 100% random
I just need to make it appear once.