Code:
local function SetUpRarity()
ChosenRarity, RarityChance = ChooseRarity()
ChosenReward = RarityRewards[ChosenRarity][math.random(1,#RarityRewards[ChosenRarity])] -- RarityRewards[ChooseRarity()] indexs the tables of rewards for the rarity. [math.random(1,#RarityRewards[ChooseRarity()])] chooses a random reward from the table
ClaimPad.Color = RarityColors[ChosenRarity]
InfoLabel.Text = ChosenRarity .. " (" .. RarityChance .. "%) - " .. abbreviateNum(ChosenReward)
local AppropriateGradient = game:GetService("ReplicatedStorage"):WaitForChild("Gradients"):FindFirstChild(ChosenRarity):Clone()
AppropriateGradient.Parent = InfoLabel
local ChosenPos = Vector3.new(math.random(-252,252),0.125,math.random(-252,252))
script.Parent:PivotTo(CFrame.new(ChosenPos))
end
When the model is teleported in a random location it is turned 90 degrees