Randomized Prize GUI

Hello!
I’m interested in scripting a random daily prize gui, however I’m not sure how to create it. I’d like it to be similar to Assassin when you unbox a new knife.

Here’s an example: Unboxing *NEW* Autumn Saber EXOTIC (Roblox Assassin) - YouTube (Skip to 2:14)
image
I’d like it to give it like the wheel effect and it will slowly stop spinning and land on a random prize that they can claim. How can I create the spinning effect and award the proper prize?

Thank you!

Check this out

Oh thank you! I wasn’t sure how to work it so my search didn’t really do much.

You could just have a table with all possible results and choose a random one based on a function.

-- constants

local Prizes = { -- prizes table
     "Sword",
     "Gun",
     "Bow",
     "Pickaxe",
}

-- variables

local MathRandom = math.random
local Event = Instance.new("RemoteEvent")
Event.Name = "PrizeEvent"
Event.Parent = game.ReplicatedStorage

-- functions

local function GetRandomReward()
    for _,prize in pairs(Prizes) do
       local r_Prize = MathRandom(1, #prize)
       print(r_Prize)
   end
end

-- events

Event.OnServerEvent:Connect(function()
    GetRandomReward()
end)

Tween the frame, have a frame with multiple labels, tween the frame so it looks like its slowing down.