Problem with spinning system

I’m making a spinning system and it works fine but theres one issue, the gui. Pretty much when you spin it shows numbers and then when its done it will show what you got and then you can close the gui that says what you got but then you spin again and then you get the power but then it doesn’t show the gui again, heres an example:
https://gyazo.com/f0a3c67c4deb13faeb534c2f96f22f14

And this is my code:

script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr)
local char = plr.Character
local root = char.HumanoidRootPart
local hum = char.Humanoid
local plrgui = plr.PlayerGui
local screen = plrgui.LuckSpinGUI.SpinButton
local p = game.Lighting.PowerScripts
local val = screen.LuckScript.Object
local prize = plrgui.PrizeScreenGUI.CongratsText.PrizeText
local text = plrgui.PrizeScreenGUI.CongratsText

for i = 1,40,1 do
	local r = math.random(1,11)
	val.Value = r
	script.Parent.Parent.Text = r
	wait(0.01)
end


if val.Value == 1 then
	p.AwakenScript:Clone().Parent = char
	text.Visible = true
	prize.Text = "Full Cowling!"
end
if val.Value == 2 then
	p.FirstDarkScript:Clone().Parent = char
	text.Visible = true
	prize.Text = "Darkness!"
end
if val.Value == 3 then
	p.GodSpeed:Clone().Parent = char
	text.Visible = true
	prize.Text = "GodSpeed!"
end
if val.Value == 4 then
	p.PainPull:Clone().Parent = char
	text.Visible = true
	prize.Text = "Pain's Pull!"
end
if val.Value == 5 then
	p.PunchSlam:Clone().Parent = char
	text.Visible = true
	prize.Text = "Super Strength!"
end
if val.Value == 6 then
	p.SharinganActivScript:Clone().Parent = char
	text.Visible = true
	prize.Text = "Sharingan"
end
if val.Value == 7 then
	p.Sixfold:Clone().Parent = char
	text.Visible = true
	prize.Text = "Sixfold!"
end
if val.Value == 8 then
	p.SpiritBombScript:Clone().Parent = char
	text.Visible = true
	prize.Text = "Spirit Bomb!"
end
if val.Value == 9 then
	p.TitanShift:Clone().Parent = char
	text.Visible = true
	prize.Text = "Titan Shifting!"
end
if val.Value == 10 then
	p.mountscript:Clone().Parent = char
	text.Visible = true
	prize.Text = "Ice Powers!"
end
if val.Value == 11 then
	p.GojoScripts.CollapsingBlue:Clone().Parent = char
	p.GojoScripts.HollowPurpleAc:Clone().Parent = char
	p.GojoScripts.ReversalRedAc:Clone().Parent = char
	text.Visible = true
	prize.Text = "Gojo!"
end

end)
If anyone could help I would be really helpful and I hope you have a great day! ;D

Is there more code? I assume you have the code wrapped in some sort of loop, or event, to make it continue to work? Could you show this part?

For one thing, at the start of the event or loop, you’d want to set the text back to “Spin” on your button, with this:

script.Parent.Parent.Text = "Spin"