Advertisement
OnFireRobloxScriptin

Roblox Random Tip/Hint Gui

May 23rd, 2023 (edited)
1,036
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.42 KB | None | 0 0
  1. Non Added String Version: (No "Tip: "or "Hint: "in front of the tip/hint)
  2.  
  3. --//Variables
  4. local textlabel = script.Parent --Sets a variable for the textlabel
  5. local tips = { --Creates a list of tips
  6.     "Make sure you Subscribe to OnFireRobloxScripting - YT", --For every tip you add, MAKE SURE THAT:
  7.     "I love cheeseburgers", --The tip is between the quotation marks
  8.     "Did you know that [Insert fun fact here]", --There is a comma outside of the quotation marks
  9. }
  10.  
  11. --//Loop
  12. while task.wait(10) do --Every 10 seconds do what is in the loop (10 in the brackets means 10 seconds)
  13.     textlabel.Text = tips[math.random(1, #tips)] --Set the textlabel's text to a random tip from the tip list
  14. end
  15.  
  16. Added String Version: (Adds a "Tip: "or "Hint: "in front of the tip/hint)
  17.  
  18. --//Variables
  19. local textlabel = script.Parent --Sets a variable for the textlabel
  20. local tips = { --Creates a list of tips
  21.     "Make sure you Subscribe to OnFireRobloxScripting - YT", --For every tip you add, MAKE SURE THAT:
  22.     "I love cheeseburgers", --The tip is between the quotation marks
  23.     "Did you know that [Insert fun fact here]", --There is a comma outside of the quotation marks
  24. }
  25.  
  26. --//Loop
  27. while task.wait(10) do --Every 10 seconds do what is in the loop (10 in the brackets means 10 seconds)
  28.     textlabel.Text = "Tip: "tips[math.random(1, #tips)] --Set the textlabel's text to a random tip from the tip list. Change "Tip: " to "Hint: " if you want it to say Hint:
  29. end
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement