I need help with this.
Thanks.
LocalScript
local Player = game:GetService("Players").LocalPlayer
local RS = game:GetService("ReplicatedStorage")
local StarterPlayer = game:GetService("StarterPlayer")
local Morph1 = RS.Morphs.Sushi
local Morph2 = RS.Morphs.Burger
local Morph3 = RS.Morphs.Ramen
local Morph4 = RS.Morphs.Pizza
local Button = script.Parent
local MorphPotion = Player.Backpack:WaitForChild("MorphPotion")
local Status = false
Button.MouseButton1Up:Connect(function()
if Status == false then
Status = true
MorphPotion:Destroy()
local TheNumber = 0
local NewNumber = math.random(1,4)
TheNumber = NewNumber
if TheNumber == 1 then
local newMorph1 = Morph1:Clone()
newMorph1.Parent = StarterPlayer
newMorph1.Name = "StarterCharacter"
Button.Text = "20"
wait(1)
Button.Text = "19"
wait(1)
Button.Text = "18"
wait(1)
Button.Text = "17"
wait(1)
Button.Text = "16"
wait(1)
Button.Text = "15"
wait(1)
Button.Text = "14"
wait(1)
Button.Text = "13"
wait(1)
Button.Text = "12"
wait(1)
Button.Text = "11"
wait(1)
Button.Text = "10"
wait(1)
Button.Text = "9"
wait(1)
Button.Text = "8"
wait(1)
Button.Text = "7"
wait(1)
Button.Text = "6"
wait(1)
Button.Text = "5"
wait(1)
Button.Text = "4"
wait(1)
Button.Text = "3"
wait(1)
Button.Text = "2"
wait(1)
Button.Text = "1"
wait(1)
Button.Text = "0"
newMorph1:Destroy()
Button.Visible = false
Button.Text = "Drink"
Status = false
elseif TheNumber == 2 then
local newMorph2 = Morph2:Clone()
newMorph2.Parent = StarterPlayer
newMorph2.Name = "StarterCharacter"
Button.Text = "20"
wait(1)
Button.Text = "19"
wait(1)
Button.Text = "18"
wait(1)
Button.Text = "17"
wait(1)
Button.Text = "16"
wait(1)
Button.Text = "15"
wait(1)
Button.Text = "14"
wait(1)
Button.Text = "13"
wait(1)
Button.Text = "12"
wait(1)
Button.Text = "11"
wait(1)
Button.Text = "10"
wait(1)
Button.Text = "9"
wait(1)
Button.Text = "8"
wait(1)
Button.Text = "7"
wait(1)
Button.Text = "6"
wait(1)
Button.Text = "5"
wait(1)
Button.Text = "4"
wait(1)
Button.Text = "3"
wait(1)
Button.Text = "2"
wait(1)
Button.Text = "1"
wait(1)
Button.Text = "0"
newMorph2:Destroy()
Button.Visible = false
Button.Text = "Drink"
Status = false
elseif TheNumber == 3 then
local newMorph3 = Morph3:Clone()
newMorph3.Parent = StarterPlayer
newMorph3.Name = "StarterCharacter"
Button.Text = "20"
wait(1)
Button.Text = "19"
wait(1)
Button.Text = "18"
wait(1)
Button.Text = "17"
wait(1)
Button.Text = "16"
wait(1)
Button.Text = "15"
wait(1)
Button.Text = "14"
wait(1)
Button.Text = "13"
wait(1)
Button.Text = "12"
wait(1)
Button.Text = "11"
wait(1)
Button.Text = "10"
wait(1)
Button.Text = "9"
wait(1)
Button.Text = "8"
wait(1)
Button.Text = "7"
wait(1)
Button.Text = "6"
wait(1)
Button.Text = "5"
wait(1)
Button.Text = "4"
wait(1)
Button.Text = "3"
wait(1)
Button.Text = "2"
wait(1)
Button.Text = "1"
wait(1)
Button.Text = "0"
newMorph3:Destroy()
Button.Visible = false
Button.Text = "Drink"
Status = false
elseif TheNumber == 4 then
local newMorph4 = Morph4:Clone()
newMorph4.Parent = StarterPlayer
newMorph4.Name = "StarterCharacter"
Button.Text = "20"
wait(1)
Button.Text = "19"
wait(1)
Button.Text = "18"
wait(1)
Button.Text = "17"
wait(1)
Button.Text = "16"
wait(1)
Button.Text = "15"
wait(1)
Button.Text = "14"
wait(1)
Button.Text = "13"
wait(1)
Button.Text = "12"
wait(1)
Button.Text = "11"
wait(1)
Button.Text = "10"
wait(1)
Button.Text = "9"
wait(1)
Button.Text = "8"
wait(1)
Button.Text = "7"
wait(1)
Button.Text = "6"
wait(1)
Button.Text = "5"
wait(1)
Button.Text = "4"
wait(1)
Button.Text = "3"
wait(1)
Button.Text = "2"
wait(1)
Button.Text = "1"
wait(1)
Button.Text = "0"
newMorph4:Destroy()
Button.Visible = false
Button.Text = "Drink"
Status = false
elseif TheNumber == 0 then
print("Error or nothing...")
end
elseif Status == true then
print("Wait...")
end
end)