Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- steps:1 insert a screen gui in starter gui dont rename it or it wont work
- 2: insert a textbutton in screen gui and place it where u want and rename it 2 Roll
- 3:insert a local script in in Roll Roll is in screen gui and Dont rename it or it wont work
- then copy and paste this script if it doesnt work look at the tutrial link: https://www.youtube.com/watch?v=E7FKdaL1S04&t=1s
- Whats the tutrial here and see how to do it : https://www.youtube.com/watch?v=E7FKdaL1S04&t=1s
- Script:
- local rarityFonts = {
- Common = Enum.Font.SourceSans,
- Uncommon = Enum.Font.SourceSansBold,
- Rare = Enum.Font.Gotham,
- Epic = Enum.Font.ArialBold,
- Legendary = Enum.Font.Fantasy,
- Mythical = Enum.Font.Bodoni,
- Exotic = Enum.Font.Antique,
- Divine = Enum.Font.Cartoon,
- UltraRare = Enum.Font.FredokaOne,
- SuperRare = Enum.Font.Highway,
- MegaRare = Enum.Font.Oswald,
- HyperRare = Enum.Font.LuckiestGuy,
- InsaneRare = Enum.Font.Creepster,
- CrazyRare = Enum.Font.AmaticSC,
- Unique = Enum.Font.Nunito,
- Special = Enum.Font.Roboto,
- Elite = Enum.Font.DenkOne,
- Supreme = Enum.Font.Garamond,
- Ultimate = Enum.Font.PermanentMarker,
- Masterpiece = Enum.Font.Garamond,
- }
- local rarityColors = {
- Common = Color3.fromRGB(255, 255, 255),
- Uncommon = Color3.fromRGB(0, 255, 0),
- Rare = Color3.fromRGB(0, 0, 255),
- Epic = Color3.fromRGB(255, 0, 255),
- Legendary = Color3.fromRGB(255, 215, 0),
- Mythical = Color3.fromRGB(128, 0, 128),
- Exotic = Color3.fromRGB(255, 165, 0),
- Divine = Color3.fromRGB(255, 255, 0),
- UltraRare = Color3.fromRGB(0, 128, 128),
- SuperRare = Color3.fromRGB(255, 69, 0),
- MegaRare = Color3.fromRGB(139, 0, 139),
- HyperRare = Color3.fromRGB(255, 140, 0),
- InsaneRare = Color3.fromRGB(75, 0, 130),
- CrazyRare = Color3.fromRGB(255, 20, 147),
- Unique = Color3.fromRGB(186, 85, 211),
- Special = Color3.fromRGB(148, 0, 211),
- Elite = Color3.fromRGB(30, 144, 255),
- Supreme = Color3.fromRGB(255, 99, 71),
- Ultimate = Color3.fromRGB(60, 179, 113),
- Masterpiece = Color3.fromRGB(255, 69, 0),
- }
- local rollButton = script.Parent -- Assuming the script is a child of the Roll button
- local skipButton
- local equipButton
- local isRolling = false
- local currentRarityGui = nil
- local rarityLabel = Instance.new("TextLabel")
- rarityLabel.BackgroundTransparency = 1
- rarityLabel.Size = UDim2.new(0, 200, 0, 50)
- rarityLabel.TextSize = 30
- rarityLabel.Position = UDim2.new(0.5, -100, 0.5, -25)
- rarityLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- rarityLabel.Parent = game:GetService("Players").LocalPlayer.PlayerGui.ScreenGui
- local function playTransitionSound()
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://9119713951" -- Replace YOUR_SOUND_ID with the ID of your sound
- sound.Volume = 0.5
- sound.Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
- sound:Play()
- sound.Ended:Connect(function()
- sound:Destroy()
- end)
- end
- local rarities = {
- "Common",
- "Uncommon",
- "Rare",
- "Epic",
- "Legendary",
- "Mythical",
- "Exotic",
- "Divine",
- "UltraRare",
- "SuperRare",
- "MegaRare",
- "HyperRare",
- "InsaneRare",
- "CrazyRare",
- "Unique",
- "Special",
- "Elite",
- "Supreme",
- "Ultimate",
- "Masterpiece",
- }
- local function showRarity()
- if isRolling then return end
- isRolling = true
- rollButton.Text = "Rolling..."
- rollButton.Active = false
- for _ = 1, 10 do -- Adjust the number of transitions as needed
- local randomIndex = math.random(1, #rarities)
- local rarity = rarities[randomIndex]
- rarityLabel.Text = rarity
- rarityLabel.Font = rarityFonts[rarity]
- rarityLabel.TextStrokeTransparency = 0
- rarityLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
- rarityLabel.TextColor3 = rarityColors[rarity]
- playTransitionSound() -- Play the transition sound
- wait(0.3) -- Adjust the speed of transition as needed
- end
- skipButton = Instance.new("TextButton")
- skipButton.Parent = rarityLabel.Parent
- skipButton.Size = UDim2.new(0, 80, 0, 30)
- skipButton.Position = UDim2.new(0.5, -40, 0.6, 0)
- skipButton.AnchorPoint = Vector2.new(0.5, 0)
- skipButton.Text = "Skip"
- skipButton.BackgroundTransparency = 0.75
- skipButton.BackgroundColor3 = Color3.new(0, 0, 0)
- skipButton.TextColor3 = Color3.new(1, 1, 1)
- skipButton.MouseButton1Click:Connect(function()
- rarityLabel.Text = ""
- if currentRarityGui then
- skipButton:Destroy()
- equipButton:Destroy()
- isRolling = false
- rollButton.Text = "Roll"
- rollButton.Active = true
- end
- end)
- equipButton = Instance.new("TextButton")
- equipButton.Parent = rarityLabel.Parent
- equipButton.Size = UDim2.new(0, 80, 0, 30)
- equipButton.Position = UDim2.new(0.5, 40, 0.6, 0)
- equipButton.AnchorPoint = Vector2.new(0.5, 0)
- equipButton.Text = "Equip"
- equipButton.BackgroundTransparency = 0.75
- equipButton.BackgroundColor3 = Color3.new(0, 0, 0)
- equipButton.TextColor3 = Color3.new(1, 1, 1)
- equipButton.MouseButton1Click:Connect(function()
- print("Equip")
- isRolling = false
- if currentRarityGui then
- currentRarityGui:Destroy()
- end
- currentRarityGui = Instance.new("BillboardGui")
- currentRarityGui.Parent = game.Players.LocalPlayer.Character.Head
- currentRarityGui.Size = UDim2.new(0, 100, 0, 40)
- currentRarityGui.AlwaysOnTop = true
- currentRarityGui.StudsOffset = Vector3.new(0, 2, 0) -- Adjust the offset to move the Gui above the head
- local textLabel = Instance.new("TextLabel")
- textLabel.Parent = currentRarityGui
- textLabel.Size = UDim2.new(1, 0, 1, 0)
- textLabel.BackgroundTransparency = 1
- textLabel.Text = rarityLabel.Text
- textLabel.Font = rarityFonts[rarityLabel.Text]
- textLabel.TextColor3 = rarityColors[rarityLabel.Text]
- textLabel.TextStrokeTransparency = 0
- textLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
- textLabel.TextSize = 20
- skipButton:Destroy()
- equipButton:Destroy()
- rollButton.Text = "Roll"
- rollButton.Active = true
- end)
- end
- rollButton.MouseButton1Click:Connect(function()
- showRarity()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement