Skip to content

Instantly share code, notes, and snippets.

@OfficialKuroLite
Created February 4, 2025 07:57
Show Gist options
  • Save OfficialKuroLite/3fbe6cc1ea086e4109db02b76f7bfbf0 to your computer and use it in GitHub Desktop.
Save OfficialKuroLite/3fbe6cc1ea086e4109db02b76f7bfbf0 to your computer and use it in GitHub Desktop.
-- //Switching Image Script \\--
-- // NOTE πŸ“ : Ready me if you too lazy to watch the tutorial πŸ˜‘ \\--
-- Select " StarterGui" and add a " ScreenGui " βœ…
-- Rename the " ScreenGui " into " Event " βœ…
-- Add 5 " Imagelabel" βœ…
-- Rename " Imagelabel" into " Image1 " " Image2" . . . " Image5 " βœ…
-- Set up like in the vid and put the image id in or you can use your own id βœ…
-- Now add a " Local Script" inside the " Event " ScreenGui βœ…
-- Paste this Local Script in βœ…
--// Made by Kuro Lite 😎\\--
-- [ πŸ”₯Like and Subscribe πŸ”₯] --
local screenGui = script.Parent
local images = {
screenGui:FindFirstChild("Image1"),
screenGui:FindFirstChild("Image2"),
screenGui:FindFirstChild("Image3"),
screenGui:FindFirstChild("Image4"),
screenGui:FindFirstChild("Image5")
}
for i, img in ipairs(images) do
if not img then
warn("Missing ImageLabel: Image" .. i)
return
end
end
while true do
for _, img in ipairs(images) do
img.Visible = false
end
local randomIndex = math.random(1, #images)
images[randomIndex].Visible = true
task.wait(0.05)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment