How to make an RNG game in ROBLOX STUDIO (Script Giveaway)

preview_player
Показать описание
-----------Hello I am Machine, an RBX dev

I hope you like my tutorial about making an RNG game
the script is right now in the comments so you will find it there

also the melody is called Ending Theme - Super Mario World

Have an nice day
Рекомендации по теме
Комментарии
Автор




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")
= 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 =

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 =
sound:Play()

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]
= 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"
= 0.75
skipButton.BackgroundColor3 = Color3.new(0, 0, 0)
skipButton.TextColor3 = Color3.new(1, 1, 1)

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"
= 0.75
equipButton.BackgroundColor3 = Color3.new(0, 0, 0)
equipButton.TextColor3 = Color3.new(1, 1, 1)

print("Equip")
isRolling = false
if currentRarityGui then
currentRarityGui:Destroy()
end
currentRarityGui = Instance.new("BillboardGui")
currentRarityGui.Parent =
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)
= 1
textLabel.Text = rarityLabel.Text
textLabel.Font =
textLabel.TextColor3 =
= 0
textLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
textLabel.TextSize = 20

skipButton:Destroy()
equipButton:Destroy()
rollButton.Text = "Roll"
rollButton.Active = true
end)
end


showRarity()
end)

Zyn_Blox
Автор

Omg Thank you now i can surprise my brother >;3

RbLx_Ch
Автор

Thanks I might post about my RNG game on TikTok so if I do I will be sure to credit you (subscribed btw)

milopeace
Автор

I have tried a lot but still can’t. But with this video I can make my own game now :D thanks a lot!

FriesTPOT
Автор

this is the beast tutorial I've ever watched.

MoonBPCdoes_tricks
Автор

Tysm man i really appreciate you. I couldnt make my first rng game without this video.

kryzugd
Автор

aint no way this worked bruh wth💀💀 also liked and subbed

MGMattGZ
Автор

thank u so much! it was my dream to make a rng game u made my dream come true!

mgkallen
Автор

IT WORKED TYSM DUDE YOU JUST SAVED MY PRECIOUS TIME XD

JadeGeneral
Автор

Thank you so much! This really helped me out :)

CrimsonCape
Автор

Thank you finally could make a rng game

Justgivememydolla-gq
Автор

thank you for this ideal script for my game in roblox!

redecry
Автор

this is good but i dont like where the rolling area is and it should equip those auras but this is still a W ngl especially since idk how 2 script

ShereenMohammed-osoy
Автор

Thank you! Im making a simulator with little parts of every game for example, leaderboards, clicking for coins then buying pets, rng system and im gonna combine many more features, if you could make a video on how to add a leaderboard for the people who got the highest rank with this rolling system :D

JAYEMSFR
Автор

im ur 101 subsrcibber bc i just subbed

Mxroc
Автор

OMG DUDE TYSM but the only probem idk how to remove the LABEL

mbladegameryt
Автор

DONT FORGET TO MAKE A LOCAL SCRIPT INSTEAD OF A SCRIPT

Zyn_Blox
Автор

Hi i just have a question can you make a tuto for the inventory ?

robinthepgm
Автор

hey was wondering can you make a tutorial of how to make like a rng block game as a example you roll things so you could create something as like tycoon rng

prife
Автор

yo how do you move the text that shows what your rolling along with the skip and equip button?

Draw-blox.
join shbcf.ru