Advertisement
KingAesthetic

Luau Example 1

Jan 18th, 2025 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.18 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local UserInputService = game:GetService("UserInputService")
  3. local TweenService = game:GetService("TweenService")
  4. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  5. local player = Players.LocalPlayer
  6. local playerGui = player:WaitForChild("PlayerGui")
  7.  
  8.  
  9. -- In-GameUIs GUI
  10. local screenGUI = playerGui:WaitForChild("In-GameUIs", 5)
  11. if not screenGUI then
  12.     warn("In-GameUIs ScreenGui not found within 5 seconds")
  13.     return
  14. end
  15. local mainFrame = screenGUI:WaitForChild("Main", 5)
  16. if not mainFrame then
  17.     warn("Main Frame not found within 5 seconds")
  18.     return
  19. end
  20. local inGame = mainFrame:WaitForChild("InGame", 5)
  21. if not inGame then
  22.     warn("InGame Frame not found within 5 seconds")
  23.     return
  24. end
  25.  
  26. -- UI Elements with error handling
  27. local currentLevel = inGame:WaitForChild("CurrentLevel", 5)
  28. if not currentLevel then
  29.     warn("CurrentLevel TextLabel not found within 5 seconds")
  30.     return
  31. end
  32.  
  33. local currentWord = inGame:WaitForChild("CurrentWord", 5)
  34. if not currentWord then
  35.     warn("CurrentWord TextLabel not found within 5 seconds")
  36.     return
  37. end
  38.  
  39. local wordsLeft = inGame:WaitForChild("WordsLeft", 5)
  40. if not wordsLeft then
  41.     warn("WordsLeft TextLabel not found within 5 seconds")
  42.     return
  43. end
  44.  
  45. local timerText = inGame:WaitForChild("Timer", 5)
  46. if not timerText then
  47.     warn("Timer TextLabel not found within 5 seconds")
  48.     return
  49. end
  50.  
  51. local timeElapsedText = inGame:WaitForChild("TimeElapsed", 5)
  52. if not timeElapsedText then
  53.     warn("TimerElapsed TextLabel not found within 5 seconds")
  54.     return
  55. end
  56.  
  57. local pointText = inGame:WaitForChild("Point", 5)
  58. if not pointText then
  59.     warn("Point TextLabel not found within 5 seconds")
  60.     return
  61. end
  62.  
  63. local multiplierText = pointText:WaitForChild("Multiplier", 5)
  64. if not multiplierText then
  65.     warn("Multiplier TextLabel not found within 5 seconds")
  66.     return
  67. end
  68.  
  69. local gameOverText = inGame:WaitForChild("GameOverText", 5)
  70. if not gameOverText then
  71.     warn("GameOverText TextLabel not found within 5 seconds")
  72.     return
  73. end
  74.  
  75. -- TextBox for typing words
  76. local TextBox = mainFrame:WaitForChild("EnterWord", 5)
  77. if not TextBox then
  78.     warn("Enter Word TextLabel not found within 5 seconds")
  79.     return
  80. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement