Roblox GUI Maker logoRoblox GUI Maker
Unofficial third-party tool · Not affiliated with Roblox Corporation

Simulator HUD Roblox GUI Template with Clicks / Rebirths / Pets

A simulator-style HUD with click counter, rebirth badge, pet count, and currency tracker. Designed with a bright and readable aesthetic optimized for mobile devices. Perfect for clicker simulators, pet collection games, tycoon-style experiences, and any Roblox game that tracks incremental progress with satisfying visual feedback.

HUDFree
Simulator HUD Roblox GUI template — Clicks / Rebirths / Pets, bright hud layout, screenshot 1
Simulator HUD Roblox GUI template — screenshot 1 of 1, showing clicks / rebirths / pets on a bright hud layout for mobile.
Open in Web EditorJoin Studio plugin waitlist

Live preview

Simulator HUD

1920×1080
Zoom100%
Desktop (FHD)
ScreenGui
Frame
Frame
⚡ Clicks: 1,234
Frame
Rebirth: 5
Frame
Pets: 12
A simulator-style HUD with click counter, rebirth badge, pet count, and currency tracker. Designed with a bright and readable aesthetic optimized for mobile devices. Perfect for clicker simulators, pet collection games, tycoon-style experiences, and any Roblox game that tracks incremental progress with satisfying visual feedback.

Includes real, production-ready Luau logic — not a static mockup.

What's inside

How to use this template

The Simulator HUD template shows click counters, rebirth badges, pet counts, and currency for simulator games. Paste the client Luau into StarterGui and the HUD appears, with the click counter top-left, rebirth badge top-right, and pet strip along the bottom. The click counter updates optimistically on each tap - the local count increments immediately, and a RemoteEvent syncs to the server. The rebirth badge shows the current tier and pulses when the player can afford the next rebirth. The pet strip uses a horizontal ScrollingFrame with UIGridLayout. The layout uses Scale-based sizing, so it works on phone and desktop. To customize, change the counter colors and pet slot count. Wire the click and rebirth events to your own server logic. Test in Studio by clicking rapidly and confirming the counter updates without lag.

Add it to your game in 3 steps

  1. 1

    Copy the Luau

    Open the template in the web editor and click Export. Choose LocalScript to copy the full client Luau to your clipboard.

  2. 2

    Paste into StarterGui

    In Roblox Studio, right-click StarterGui in the Explorer, insert a LocalScript, and paste the copied Luau. Rename it to match the template.

  3. 3

    Press Play to verify

    Click Play in Studio. The GUI should appear exactly as designed. Tweak any Size or Position values in the script if you want to adjust the layout.

simulator-hud.lua
lua
1--[[
2 Simulator HUD - Client LocalScript
3 A bright simulator HUD with click counter, rebirth badge, pet count, and currency.
4 Optimized for mobile layout with touch-friendly interactions.
5 Place in: StarterPlayer > StarterPlayerScripts
6--]]
7
8local Players = game:GetService("Players")
9local TweenService = game:GetService("TweenService")
10local UserInputService = game:GetService("UserInputService")
11local RunService = game:GetService("RunService")
12local ReplicatedStorage = game:GetService("ReplicatedStorage")
13
14local player = Players.LocalPlayer
15local playerGui = player:WaitForChild("PlayerGui")
16
17-- ============================================================
18-- REMOTE EVENTS
19-- ============================================================
20local remotes = ReplicatedStorage:WaitForChild("Simulator_HUD_Remotes")
21local updateCurrencyEvent = remotes:WaitForChild("UpdateCurrency")
22local updateClicksEvent = remotes:WaitForChild("UpdateClicks")
23local updateRebirthsEvent = remotes:WaitForChild("UpdateRebirths")
24local updatePetsEvent = remotes:WaitForChild("UpdatePets")
25local updateMultiplierEvent = remotes:WaitForChild("UpdateMultiplier")
26local clickEvent = remotes:WaitForChild("Click")
27local showNotificationEvent = remotes:WaitForChild("ShowNotification")
28local showFloatingTextEvent = remotes:WaitForChild("ShowFloatingText")
29local updateLeaderboardEvent = remotes:WaitForChild("UpdateLeaderboard")
30local openMenuEvent = remotes:WaitForChild("OpenMenu")
31
32-- ============================================================
33-- CONFIGURATION
34-- ============================================================
35local CONFIG = {
36 -- Colors - bright and cheerful simulator palette
37 PRIMARY = Color3.fromRGB(255, 200, 50),
38 PRIMARY_LIGHT = Color3.fromRGB(255, 230, 120),
39 SUCCESS = Color3.fromRGB(50, 220, 100),
40 INFO = Color3.fromRGB(50, 170, 255),
41 WARNING = Color3.fromRGB(255, 150, 50),
42 DANGER = Color3.fromRGB(255, 80, 80),
43 COIN_GOLD = Color3.fromRGB(255, 215, 0),
44 REBIRTH_PURPLE = Color3.fromRGB(180, 100, 255),
45 PET_BLUE = Color3.fromRGB(80, 180, 255),
46 BG_WHITE = Color3.fromRGB(255, 255, 255),
47 BG_LIGHT = Color3.fromRGB(245, 248, 250),
48 BG_CARD = Color3.fromRGB(255, 255, 255),
49 TEXT_DARK = Color3.fromRGB(50, 55, 60),
50 TEXT_GRAY = Color3.fromRGB(130, 140, 150),
51 SHADOW = Color3.fromRGB(200, 210, 220),
52
53 -- Animation
54 TWEEN_BOUNCE = TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out),
55 TWEEN_FAST = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
56 TWEEN_NORMAL = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
57 TWEEN_SLOW = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
58 FLOAT_DURATION = 1.2,
59 NOTIFICATION_DURATION = 3,
60
61 -- Mobile layout sizes
62 TOP_BAR_HEIGHT = 55,
63 CLICK_BUTTON_SIZE = 140,
64 MENU_BUTTON_SIZE = 50,
65 STAT_CARD_WIDTH = 100,
66 STAT_CARD_HEIGHT = 50,
67 NOTIFICATION_MAX = 4,
68}
69
70-- ============================================================
71-- STATE
72-- ============================================================
73local state = {
74 currency = 0,
75 currencyDisplay = "0",
76 clicks = 0,
77 clicksDisplay = "0",
78 rebirths = 0,
79 pets = 0,
80 petCapacity = 100,
81 multiplier = 1.0,
82 progressPercent = 0,
83 leaderboardData = {},
84 notifications = {},
85 floatingTexts = {},
86}
87
88-- ============================================================
89-- HELPER FUNCTIONS
90-- ============================================================
91
92local function createInstance(className, props)
93 local instance = Instance.new(className)
94 for key, value in pairs(props) do
95 instance[key] = value
96 end
97 return instance
98end
99
100local function createCorner(parent, radius)
101 local corner = Instance.new("UICorner")
102 corner.CornerRadius = UDim.new(0, radius or 8)
103 corner.Parent = parent
104 return corner
105end
106
107local function createStroke(parent, color, thickness)
108 local stroke = Instance.new("UIStroke")
109 stroke.Color = color or CONFIG.SHADOW
110 stroke.Thickness = thickness or 1
111 stroke.Parent = parent
112 return stroke
113end
114
115local function createGradient(parent, color1, color2, rotation)
116 local gradient = Instance.new("UIGradient")
117 gradient.Color = ColorSequence.new({
118 ColorSequenceKeypoint.new(0, color1 or Color3.new(1, 1, 1)),
119 ColorSequenceKeypoint.new(1, color2 or Color3.new(0.8, 0.8, 0.8)),
120 })
121 gradient.Rotation = rotation or 0
122 gradient.Parent = parent
123 return gradient
124end
125
126local function createShadow(parent)
127 local shadow = Instance.new("ImageLabel")
128 shadow.Name = "Shadow"
129 shadow.Size = UDim2.new(1, 8, 1, 8)
130 shadow.Position = UDim2.fromOffset(-4, -4)
131 shadow.BackgroundTransparency = 1
132 shadow.Image = "rbxassetid://131296291" -- shadow asset
133 shadow.ImageColor3 = CONFIG.SHADOW
134 shadow.ImageTransparency = 0.7
135 shadow.ScaleType = Enum.ScaleType.Slice
136 shadow.SliceCenter = Rect.new(10, 10, 118, 118)
137 shadow.ZIndex = parent.ZIndex - 1
138 shadow.Parent = parent
139 return shadow
140end
141
142-- Format large numbers with suffixes (1.5K, 2.3M, etc.)
143local function formatNumber(num)
144 if num >= 1e15 then
145 return string.format("%.1fQa", num / 1e15)
146 elseif num >= 1e12 then
147 return string.format("%.1fT", num / 1e12)
148 elseif num >= 1e9 then
149 return string.format("%.1fB", num / 1e9)
150 elseif num >= 1e6 then
151 return string.format("%.1fM", num / 1e6)
152 elseif num >= 1e3 then
153 return string.format("%.1fK", num / 1e3)
154 else
155 return tostring(math.floor(num))
156 end
157end
158
159-- Format with commas
160local function formatCommas(num)
161 local formatted = tostring(math.floor(num))
162 local k
163 while true do
164 formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", "%1,%2")
165 if k == 0 then break end
166 end
167 return formatted
168end
169
170-- ============================================================
171-- UI CONSTRUCTION
172-- ============================================================
173
174local screenGui = createInstance("ScreenGui", {
175 Name = "Simulator_HUD",
176 ResetOnSpawn = false,
177 ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
178 Parent = playerGui,
179})
180
181-- --------------------------------------------------------
182-- TOP BAR (Currency Display)
183-- --------------------------------------------------------
184local topBar = createInstance("Frame", {
185 Name = "TopBar",
186 Size = UDim2.new(1, 0, 0, CONFIG.TOP_BAR_HEIGHT),
187 Position = UDim2.fromOffset(0, 0),
188 BackgroundColor3 = CONFIG.BG_CARD,
189 BackgroundTransparency = 0.1,
190 BorderSizePixel = 0,
191 ZIndex = 5,
192 Parent = screenGui,
193})
194createCorner(topBar, 0)
195
196local topBarGradient = createGradient(topBar, CONFIG.BG_CARD, CONFIG.BG_LIGHT, 90)
197
198-- Currency icon (circle placeholder)
199local currencyIcon = createInstance("Frame", {
200 Name = "CurrencyIcon",
201 Size = UDim2.fromOffset(36, 36),
202 Position = UDim2.fromOffset(12, 10),
203 BackgroundColor3 = CONFIG.COIN_GOLD,
204 BorderSizePixel = 0,
205 ZIndex = 6,
206 Parent = topBar,
207})
208createCorner(currencyIcon, 18)
209
210local currencyIconInner = createInstance("Frame", {
211 Name = "Inner",
212 Size = UDim2.fromOffset(24, 24),
213 Position = UDim2.fromScale(0.5, 0.5),
214 AnchorPoint = Vector2.new(0.5, 0.5),
215 BackgroundColor3 = CONFIG.PRIMARY_LIGHT,
216 BorderSizePixel = 0,
217 ZIndex = 7,
218 Parent = currencyIcon,
219})
220createCorner(currencyIconInner, 12)
221
222-- Currency value
223local currencyValue = createInstance("TextLabel", {
224 Name = "CurrencyValue",
225 Size = UDim2.new(0, 150, 0, 28),
226 Position = UDim2.fromOffset(56, 6),
227 BackgroundTransparency = 1,
228 Text = "0",
229 TextColor3 = CONFIG.TEXT_DARK,
230 TextSize = 24,
231 Font = Enum.Font.GothamBlack,
232 TextXAlignment = Enum.TextXAlignment.Left,
233 ZIndex = 6,
234 Parent = topBar,
235})
236
237-- Currency label
238local currencyLabel = createInstance("TextLabel", {
239 Name = "CurrencyLabel",
240 Size = UDim2.new(0, 80, 0, 16),
241 Position = UDim2.fromOffset(56, 34),
242 BackgroundTransparency = 1,
243 Text = "COINS",
244 TextColor3 = CONFIG.TEXT_GRAY,
245 TextSize = 10,
246 Font = Enum.Font.GothamBold,
247 TextXAlignment = Enum.TextXAlignment.Left,
248 ZIndex = 6,
249 Parent = topBar,
250})
251
252-- --------------------------------------------------------
253-- CLICK BUTTON (Main interaction)
254-- --------------------------------------------------------
255local clickButtonContainer = createInstance("Frame", {
256 Name = "ClickButtonContainer",
257 Size = UDim2.fromOffset(CONFIG.CLICK_BUTTON_SIZE + 40, CONFIG.CLICK_BUTTON_SIZE + 50),
258 Position = UDim2.new(0.5, 0, 1, -180),
259 AnchorPoint = Vector2.new(0.5, 1),
260 BackgroundTransparency = 1,
261 ZIndex = 5,
262 Parent = screenGui,
263})
264
265local clickButton = createInstance("TextButton", {
266 Name = "ClickButton",
267 Size = UDim2.fromOffset(CONFIG.CLICK_BUTTON_SIZE, CONFIG.CLICK_BUTTON_SIZE),
268 Position = UDim2.fromScale(0.5, 0),
269 AnchorPoint = Vector2.new(0.5, 0),
270 BackgroundColor3 = CONFIG.PRIMARY,
271 Text = "TAP!",
272 TextColor3 = CONFIG.TEXT_DARK,
273 TextSize = 22,
274 Font = Enum.Font.GothamBlack,
275 BorderSizePixel = 0,
276 ZIndex = 6,
277 Parent = clickButtonContainer,
278})
279createCorner(clickButton, CONFIG.CLICK_BUTTON_SIZE / 2)
280
281local clickButtonGradient = createGradient(clickButton, CONFIG.PRIMARY_LIGHT, CONFIG.PRIMARY, 90)
282
283-- Button pulse ring (animated)
284local clickPulse = createInstance("Frame", {
285 Name = "ClickPulse",
286 Size = UDim2.fromOffset(CONFIG.CLICK_BUTTON_SIZE, CONFIG.CLICK_BUTTON_SIZE),
287 Position = UDim2.fromScale(0.5, 0),
288 AnchorPoint = Vector2.new(0.5, 0),
289 BackgroundColor3 = CONFIG.PRIMARY,
290 BackgroundTransparency = 0.5,
291 BorderSizePixel = 0,
292 ZIndex = 5,
293 Parent = clickButtonContainer,
294})
295createCorner(clickPulse, CONFIG.CLICK_BUTTON_SIZE / 2)
296
297local clickHint = createInstance("TextLabel", {
298 Name = "ClickHint",
299 Size = UDim2.new(1, 0, 0, 20),
300 Position = UDim2.fromOffset(0, CONFIG.CLICK_BUTTON_SIZE + 8),
301 BackgroundTransparency = 1,
302 Text = "TAP TO EARN!",
303 TextColor3 = CONFIG.TEXT_GRAY,
304 TextSize = 13,
305 Font = Enum.Font.GothamBold,
306 TextXAlignment = Enum.TextXAlignment.Center,
307 ZIndex = 5,
308 Parent = clickButtonContainer,
309})
310
311-- --------------------------------------------------------
312-- STATS CONTAINER (Top Right)
313-- --------------------------------------------------------
314local statsContainer = createInstance("Frame", {
315 Name = "StatsContainer",
316 Size = UDim2.fromOffset(110, 170),
317 Position = UDim2.new(1, -12, 0, 65),
318 AnchorPoint = Vector2.new(1, 0),
319 BackgroundTransparency = 1,
320 ZIndex = 5,
321 Parent = screenGui,
322})
323
324local statsLayout = createInstance("UIListLayout", {
325 SortOrder = Enum.SortOrder.LayoutOrder,
326 VerticalAlignment = Enum.VerticalAlignment.Top,
327 HorizontalAlignment = Enum.HorizontalAlignment.Right,
328 Padding = UDim.new(0, 6),
329 Parent = statsContainer,
330})
331
332-- Click Counter Card
333local clickCounter = createInstance("Frame", {
334 Name = "ClickCounter",
335 Size = UDim2.fromOffset(100, 50),
336 BackgroundColor3 = CONFIG.BG_CARD,
337 BackgroundTransparency = 0.1,
338 BorderSizePixel = 0,
339 LayoutOrder = 1,
340 ZIndex = 5,
341 Parent = statsContainer,
342})
343createCorner(clickCounter, 10)
344createStroke(clickCounter, CONFIG.SHADOW, 1)
345
346local clicksLabel = createInstance("TextLabel", {
347 Name = "ClicksLabel",
348 Size = UDim2.new(1, 0, 0, 14),
349 Position = UDim2.fromOffset(0, 4),
350 BackgroundTransparency = 1,
351 Text = "CLICKS",
352 TextColor3 = CONFIG.TEXT_GRAY,
353 TextSize = 9,
354 Font = Enum.Font.GothamBold,
355 ZIndex = 6,
356 Parent = clickCounter,
357})
358
359local clicksValue = createInstance("TextLabel", {
360 Name = "ClicksValue",
361 Size = UDim2.new(1, 0, 0, 28),
362 Position = UDim2.fromOffset(0, 18),
363 BackgroundTransparency = 1,
364 Text = "0",
365 TextColor3 = CONFIG.TEXT_DARK,
366 TextSize = 20,
367 Font = Enum.Font.GothamBlack,
368 ZIndex = 6,
369 Parent = clickCounter,
370})
371
372-- Rebirth Badge Card
373local rebirthBadge = createInstance("Frame", {
374 Name = "RebirthBadge",
375 Size = UDim2.fromOffset(100, 50),
376 BackgroundColor3 = CONFIG.REBIRTH_PURPLE,
377 BackgroundTransparency = 0.9,
378 BorderSizePixel = 0,
379 LayoutOrder = 2,
380 ZIndex = 5,
381 Parent = statsContainer,
382})
383createCorner(rebirthBadge, 10)
384createStroke(rebirthBadge, CONFIG.REBIRTH_PURPLE, 1)
385
386local rebirthLabel = createInstance("TextLabel", {
387 Name = "RebirthLabel",
388 Size = UDim2.new(1, 0, 0, 14),
389 Position = UDim2.fromOffset(0, 4),
390 BackgroundTransparency = 1,
391 Text = "REBIRTHS",
392 TextColor3 = CONFIG.REBIRTH_PURPLE,
393 TextSize = 9,
394 Font = Enum.Font.GothamBold,
395 ZIndex = 6,
396 Parent = rebirthBadge,
397})
398
399local rebirthValue = createInstance("TextLabel", {
400 Name = "RebirthValue",
401 Size = UDim2.new(1, 0, 0, 28),
402 Position = UDim2.fromOffset(0, 18),
403 BackgroundTransparency = 1,
404 Text = "0",
405 TextColor3 = CONFIG.REBIRTH_PURPLE,
406 TextSize = 20,
407 Font = Enum.Font.GothamBlack,
408 ZIndex = 6,
409 Parent = rebirthBadge,
410})
411
412-- Pet Counter Card
413local petCounter = createInstance("Frame", {
414 Name = "PetCounter",
415 Size = UDim2.fromOffset(100, 50),
416 BackgroundColor3 = CONFIG.PET_BLUE,
417 BackgroundTransparency = 0.9,
418 BorderSizePixel = 0,
419 LayoutOrder = 3,
420 ZIndex = 5,
421 Parent = statsContainer,
422})
423createCorner(petCounter, 10)
424createStroke(petCounter, CONFIG.PET_BLUE, 1)
425
426local petsLabel = createInstance("TextLabel", {
427 Name = "PetsLabel",
428 Size = UDim2.new(1, 0, 0, 14),
429 Position = UDim2.fromOffset(0, 4),
430 BackgroundTransparency = 1,
431 Text = "PETS",
432 TextColor3 = CONFIG.PET_BLUE,
433 TextSize = 9,
434 Font = Enum.Font.GothamBold,
435 ZIndex = 6,
436 Parent = petCounter,
437})
438
439local petsValue = createInstance("TextLabel", {
440 Name = "PetsValue",
441 Size = UDim2.new(1, 0, 0, 28),
442 Position = UDim2.fromOffset(0, 18),
443 BackgroundTransparency = 1,
444 Text = "0/100",
445 TextColor3 = CONFIG.PET_BLUE,
446 TextSize = 16,
447 Font = Enum.Font.GothamBlack,
448 ZIndex = 6,
449 Parent = petCounter,
450})
451
452-- --------------------------------------------------------
453-- MULTIPLIER BADGE (Top Left)
454-- --------------------------------------------------------
455local multiplierContainer = createInstance("Frame", {
456 Name = "MultiplierContainer",
457 Size = UDim2.fromOffset(70, 50),
458 Position = UDim2.fromOffset(12, 65),
459 BackgroundColor3 = CONFIG.SUCCESS,
460 BackgroundTransparency = 0.9,
461 BorderSizePixel = 0,
462 ZIndex = 5,
463 Parent = screenGui,
464})
465createCorner(multiplierContainer, 10)
466createStroke(multiplierContainer, CONFIG.SUCCESS, 1)
467
468local multiplierText = createInstance("TextLabel", {
469 Name = "MultiplierText",
470 Size = UDim2.new(1, 0, 0, 26),
471 Position = UDim2.fromOffset(0, 2),
472 BackgroundTransparency = 1,
473 Text = "1.0x",
474 TextColor3 = CONFIG.SUCCESS,
475 TextSize = 22,
476 Font = Enum.Font.GothamBlack,
477 ZIndex = 6,
478 Parent = multiplierContainer,
479})
480
481local multiplierLabel = createInstance("TextLabel", {
482 Name = "MultiplierLabel",
483 Size = UDim2.new(1, 0, 0, 14),
484 Position = UDim2.fromOffset(0, 28),
485 BackgroundTransparency = 1,
486 Text = "BOOST",
487 TextColor3 = CONFIG.SUCCESS,
488 TextSize = 9,
489 Font = Enum.Font.GothamBold,
490 ZIndex = 6,
491 Parent = multiplierContainer,
492})
493
494-- --------------------------------------------------------
495-- FLOATING TEXT CONTAINER
496-- --------------------------------------------------------
497local floatingTextContainer = createInstance("Frame", {
498 Name = "FloatingTextContainer",
499 Size = UDim2.fromScale(1, 1),
500 BackgroundTransparency = 1,
501 ZIndex = 15,
502 Parent = screenGui,
503 ClipsDescendants = false,
504})
505
506-- --------------------------------------------------------
507-- PROGRESS BAR (Below top bar)
508-- --------------------------------------------------------
509local progressBarContainer = createInstance("Frame", {
510 Name = "ProgressBarContainer",
511 Size = UDim2.new(1, -24, 0, 36),
512 Position = UDim2.fromOffset(12, CONFIG.TOP_BAR_HEIGHT + 4),
513 BackgroundTransparency = 1,
514 ZIndex = 5,
515 Parent = screenGui,
516})
517
518local progressBarBg = createInstance("Frame", {
519 Name = "ProgressBarBg",
520 Size = UDim2.new(1, 0, 0, 12),
521 Position = UDim2.fromOffset(0, 18),
522 BackgroundColor3 = CONFIG.BG_LIGHT,
523 BorderSizePixel = 0,
524 ZIndex = 5,
525 Parent = progressBarContainer,
526})
527createCorner(progressBarBg, 6)
528
529local progressBarFill = createInstance("Frame", {
530 Name = "ProgressBarFill",
531 Size = UDim2.fromScale(0, 1),
532 BackgroundColor3 = CONFIG.REBIRTH_PURPLE,
533 BorderSizePixel = 0,
534 ZIndex = 6,
535 Parent = progressBarBg,
536})
537createCorner(progressBarFill, 6)
538createGradient(progressBarFill, CONFIG.REBIRTH_PURPLE, CONFIG.INFO, 0)
539
540local progressLabel = createInstance("TextLabel", {
541 Name = "ProgressLabel",
542 Size = UDim2.new(1, 0, 0, 16),
543 Position = UDim2.fromOffset(0, 0),
544 BackgroundTransparency = 1,
545 Text = "Next Rebirth: 0%",
546 TextColor3 = CONFIG.TEXT_GRAY,
547 TextSize = 10,
548 Font = Enum.Font.GothamBold,
549 TextXAlignment = Enum.TextXAlignment.Left,
550 ZIndex = 5,
551 Parent = progressBarContainer,
552})
553
554-- --------------------------------------------------------
555-- NOTIFICATION CONTAINER
556-- --------------------------------------------------------
557local notificationContainer = createInstance("Frame", {
558 Name = "NotificationContainer",
559 Size = UDim2.new(1, 0, 0, 200),
560 Position = UDim2.fromOffset(0, CONFIG.TOP_BAR_HEIGHT + 56),
561 BackgroundTransparency = 1,
562 ZIndex = 20,
563 Parent = screenGui,
564})
565
566local notificationLayout = createInstance("UIListLayout", {
567 SortOrder = Enum.SortOrder.LayoutOrder,
568 VerticalAlignment = Enum.VerticalAlignment.Top,
569 HorizontalAlignment = Enum.HorizontalAlignment.Center,
570 Padding = UDim.new(0, 6),
571 Parent = notificationContainer,
572})
573
574-- --------------------------------------------------------
575-- MENU BUTTONS (Bottom Left)
576-- --------------------------------------------------------
577local menuButtons = createInstance("Frame", {
578 Name = "MenuButtons",
579 Size = UDim2.fromOffset(56, 230),
580 Position = UDim2.fromOffset(8, 1),
581 AnchorPoint = Vector2.new(0, 1),
582 BackgroundTransparency = 1,
583 ZIndex = 5,
584 Parent = screenGui,
585})
586
587local menuLayout = createInstance("UIListLayout", {
588 SortOrder = Enum.SortOrder.LayoutOrder,
589 VerticalAlignment = Enum.VerticalAlignment.Bottom,
590 HorizontalAlignment = Enum.HorizontalAlignment.Center,
591 Padding = UDim.new(0, 8),
592 Parent = menuButtons,
593})
594
595local menuButtonConfigs = {
596 { name = "InventoryButton", icon = "INV", label = "Inv", color = CONFIG.TEXT_DARK },
597 { name = "ShopButton", icon = "SHOP", label = "Shop", color = CONFIG.COIN_GOLD },
598 { name = "PetsButton", icon = "PETS", label = "Pets", color = CONFIG.PET_BLUE },
599 { name = "SettingsButton", icon = "SET", label = "Set", color = CONFIG.TEXT_GRAY },
600}
601
602for i, cfg in ipairs(menuButtonConfigs) do
603 local btn = createInstance("TextButton", {
604 Name = cfg.name,
605 Size = UDim2.fromOffset(CONFIG.MENU_BUTTON_SIZE, CONFIG.MENU_BUTTON_SIZE),
606 BackgroundColor3 = CONFIG.BG_CARD,
607 Text = cfg.icon,
608 TextColor3 = cfg.color,
609 TextSize = 10,
610 Font = Enum.Font.GothamBlack,
611 BorderSizePixel = 0,
612 LayoutOrder = i,
613 ZIndex = 6,
614 Parent = menuButtons,
615 })
616 createCorner(btn, 14)
617 createStroke(btn, CONFIG.SHADOW, 1)
618
619 -- Add icon circle background
620 local iconBg = createInstance("Frame", {
621 Name = "IconBg",
622 Size = UDim2.fromOffset(30, 30),
623 Position = UDim2.fromScale(0.5, 0.35),
624 AnchorPoint = Vector2.new(0.5, 0.5),
625 BackgroundColor3 = cfg.color,
626 BackgroundTransparency = 0.85,
627 BorderSizePixel = 0,
628 ZIndex = 5,
629 Parent = btn,
630 })
631 createCorner(iconBg, 15)
632end
633
634-- ============================================================
635-- UPDATE FUNCTIONS
636-- ============================================================
637
638local function updateCurrency(amount)
639 state.currency = amount
640 state.currencyDisplay = formatNumber(amount)
641
642 -- Bounce animation
643 currencyValue.Text = state.currencyDisplay
644 local bounceUp = TweenService:Create(currencyValue, CONFIG.TWEEN_BOUNCE, {
645 TextSize = 28,
646 })
647 local bounceDown = TweenService:Create(currencyValue, CONFIG.TWEEN_FAST, {
648 TextSize = 24,
649 })
650 bounceUp:Play()
651 bounceUp.Completed:Connect(function()
652 bounceDown:Play()
653 end)
654
655 -- Flash icon
656 TweenService:Create(currencyIcon, CONFIG.TWEEN_FAST, {
657 Size = UDim2.fromOffset(40, 40),
658 Position = UDim2.fromOffset(10, 8),
659 }):Play()
660 task.delay(0.1, function()
661 TweenService:Create(currencyIcon, CONFIG.TWEEN_FAST, {
662 Size = UDim2.fromOffset(36, 36),
663 Position = UDim2.fromOffset(12, 10),
664 }):Play()
665 end)
666end
667
668local function updateClicks(amount)
669 state.clicks = amount
670 state.clicksDisplay = formatCommas(amount)
671 clicksValue.Text = state.clicksDisplay
672
673 -- Pop animation
674 local popUp = TweenService:Create(clicksValue, TweenInfo.new(0.1), { TextSize = 24 })
675 local popDown = TweenService:Create(clicksValue, CONFIG.TWEEN_FAST, { TextSize = 20 })
676 popUp:Play()
677 popUp.Completed:Connect(function() popDown:Play() end)
678end
679
680local function updateRebirths(amount)
681 state.rebirths = amount
682 rebirthValue.Text = tostring(amount)
683
684 -- Celebration animation
685 TweenService:Create(rebirthBadge, CONFIG.TWEEN_BOUNCE, {
686 BackgroundTransparency = 0.5,
687 }):Play()
688 task.delay(0.3, function()
689 TweenService:Create(rebirthBadge, CONFIG.TWEEN_SLOW, {
690 BackgroundTransparency = 0.9,
691 }):Play()
692 end)
693end
694
695local function updatePets(equipped, capacity)
696 state.pets = equipped
697 state.petCapacity = capacity
698 petsValue.Text = string.format("%d/%d", equipped, capacity)
699
700 -- Flash if near capacity
701 local ratio = equipped / capacity
702 if ratio >= 0.9 then
703 TweenService:Create(petsValue, TweenInfo.new(0.3, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 3, true), {
704 TextColor3 = CONFIG.DANGER,
705 }):Play()
706 else
707 petsValue.TextColor3 = CONFIG.PET_BLUE
708 end
709end
710
711local function updateMultiplier(value)
712 state.multiplier = value
713 multiplierText.Text = string.format("%.1fx", value)
714
715 -- Scale animation
716 local scaleUp = TweenService:Create(multiplierContainer, CONFIG.TWEEN_BOUNCE, {
717 Size = UDim2.fromOffset(76, 54),
718 })
719 local scaleDown = TweenService:Create(multiplierContainer, CONFIG.TWEEN_FAST, {
720 Size = UDim2.fromOffset(70, 50),
721 })
722 scaleUp:Play()
723 scaleUp.Completed:Connect(function() scaleDown:Play() end)
724end
725
726local function updateProgress(percent)
727 state.progressPercent = percent
728 progressLabel.Text = string.format("Next Rebirth: %d%%", math.floor(percent * 100))
729 TweenService:Create(progressBarFill, CONFIG.TWEEN_NORMAL, {
730 Size = UDim2.fromScale(percent, 1),
731 }):Play()
732end
733
734-- ============================================================
735-- FLOATING TEXT SYSTEM
736-- ============================================================
737
738local floatingTextId = 0
739
740local function spawnFloatingText(text, position, color)
741 floatingTextId += 1
742 local id = floatingTextId
743
744 local label = createInstance("TextLabel", {
745 Name = "FloatingText_" .. id,
746 Size = UDim2.fromOffset(120, 30),
747 Position = UDim2.fromOffset(position.X - 60, position.Y - 15),
748 BackgroundTransparency = 1,
749 Text = text,
750 TextColor3 = color or CONFIG.COIN_GOLD,
751 TextSize = 20,
752 Font = Enum.Font.GothamBlack,
753 TextStrokeTransparency = 0.5,
754 TextStrokeColor3 = Color3.new(0, 0, 0),
755 ZIndex = 15,
756 Parent = floatingTextContainer,
757 })
758
759 -- Animate upward and fade
760 local riseUp = TweenService:Create(label, TweenInfo.new(CONFIG.FLOAT_DURATION, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
761 Position = UDim2.fromOffset(position.X - 60, position.Y - 80),
762 TextTransparency = 1,
763 TextStrokeTransparency = 1,
764 })
765 riseUp:Play()
766
767 riseUp.Completed:Connect(function()
768 if label and label.Parent then
769 label:Destroy()
770 end
771 end)
772
773 -- Also spawn smaller "+1" clicks
774 if text:find("+") then
775 local miniLabel = createInstance("TextLabel", {
776 Name = "MiniFloat_" .. id,
777 Size = UDim2.fromOffset(60, 20),
778 Position = UDim2.fromOffset(position.X + 20, position.Y),
779 BackgroundTransparency = 1,
780 Text = "+1",
781 TextColor3 = CONFIG.TEXT_DARK,
782 TextSize = 14,
783 Font = Enum.Font.GothamBold,
784 ZIndex = 15,
785 Parent = floatingTextContainer,
786 })
787
788 local miniRise = TweenService:Create(miniLabel, TweenInfo.new(0.8, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
789 Position = UDim2.fromOffset(position.X + 30 + math.random(-20, 20), position.Y - 60),
790 TextTransparency = 1,
791 })
792 miniRise:Play()
793 miniRise.Completed:Connect(function()
794 if miniLabel and miniLabel.Parent then
795 miniLabel:Destroy()
796 end
797 end)
798 end
799end
800
801-- ============================================================
802-- NOTIFICATION SYSTEM
803-- ============================================================
804
805local notificationId = 0
806
807local function showNotification(message, notifType)
808 notificationId += 1
809 local id = notificationId
810
811 local color = CONFIG.INFO
812 if notifType == "success" then
813 color = CONFIG.SUCCESS
814 elseif notifType == "warning" then
815 color = CONFIG.WARNING
816 elseif notifType == "error" then
817 color = CONFIG.DANGER
818 elseif notifType == "rebirth" then
819 color = CONFIG.REBIRTH_PURPLE
820 end
821
822 local notif = createInstance("Frame", {
823 Name = "Notification_" .. id,
824 Size = UDim2.new(0, 280, 0, 44),
825 BackgroundColor3 = CONFIG.BG_CARD,
826 BackgroundTransparency = 0.05,
827 BorderSizePixel = 0,
828 LayoutOrder = -id,
829 ZIndex = 20,
830 Parent = notificationContainer,
831 })
832 createCorner(notif, 10)
833 createStroke(notif, color, 2)
834
835 local icon = createInstance("Frame", {
836 Name = "Icon",
837 Size = UDim2.fromOffset(8, 8),
838 Position = UDim2.fromOffset(12, 18),
839 BackgroundColor3 = color,
840 BorderSizePixel = 0,
841 ZIndex = 21,
842 Parent = notif,
843 })
844 createCorner(icon, 4)
845
846 local textLabel = createInstance("TextLabel", {
847 Name = "Text",
848 Size = UDim2.new(1, -36, 1, 0),
849 Position = UDim2.fromOffset(28, 0),
850 BackgroundTransparency = 1,
851 Text = message,
852 TextColor3 = CONFIG.TEXT_DARK,
853 TextSize = 13,
854 Font = Enum.Font.GothamBold,
855 TextWrapped = true,
856 TextXAlignment = Enum.TextXAlignment.Left,
857 ZIndex = 21,
858 Parent = notif,
859 })
860
861 -- Entry animation
862 notif.BackgroundTransparency = 1
863 textLabel.TextTransparency = 1
864 icon.BackgroundTransparency = 1
865 TweenService:Create(notif, CONFIG.TWEEN_FAST, { BackgroundTransparency = 0.05 }):Play()
866 TweenService:Create(textLabel, CONFIG.TWEEN_FAST, { TextTransparency = 0 }):Play()
867 TweenService:Create(icon, CONFIG.TWEEN_FAST, { BackgroundTransparency = 0 }):Play()
868
869 -- Exit after duration
870 task.delay(CONFIG.NOTIFICATION_DURATION, function()
871 local exit = TweenService:Create(notif, CONFIG.TWEEN_NORMAL, {
872 BackgroundTransparency = 1,
873 Size = UDim2.new(0, 260, 0, 44),
874 })
875 local textExit = TweenService:Create(textLabel, CONFIG.TWEEN_NORMAL, { TextTransparency = 1 })
876 local iconExit = TweenService:Create(icon, CONFIG.TWEEN_NORMAL, { BackgroundTransparency = 1 })
877 exit:Play()
878 textExit:Play()
879 iconExit:Play()
880 exit.Completed:Wait()
881 if notif and notif.Parent then
882 notif:Destroy()
883 end
884 end)
885end
886
887-- ============================================================
888-- CLICK BUTTON INTERACTION
889-- ============================================================
890
891local function animateClickButton()
892 -- Button press animation
893 TweenService:Create(clickButton, CONFIG.TWEEN_FAST, {
894 Size = UDim2.fromOffset(CONFIG.CLICK_BUTTON_SIZE - 10, CONFIG.CLICK_BUTTON_SIZE - 10),
895 }):Play()
896 task.delay(0.1, function()
897 TweenService:Create(clickButton, CONFIG.TWEEN_BOUNCE, {
898 Size = UDim2.fromOffset(CONFIG.CLICK_BUTTON_SIZE, CONFIG.CLICK_BUTTON_SIZE),
899 }):Play()
900 end)
901
902 -- Pulse ring animation
903 clickPulse.Size = UDim2.fromOffset(CONFIG.CLICK_BUTTON_SIZE, CONFIG.CLICK_BUTTON_SIZE)
904 clickPulse.BackgroundTransparency = 0.3
905 TweenService:Create(clickPulse, TweenInfo.new(0.6, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
906 Size = UDim2.fromOffset(CONFIG.CLICK_BUTTON_SIZE + 40, CONFIG.CLICK_BUTTON_SIZE + 40),
907 Position = UDim2.new(0.5, -(CONFIG.CLICK_BUTTON_SIZE + 40) / 2, 0, -20),
908 BackgroundTransparency = 1,
909 }):Play()
910end
911
912local function onClickButtonActivated()
913 -- Send click to server
914 clickEvent:FireServer()
915
916 -- Local visual feedback
917 animateClickButton()
918
919 -- Spawn floating text at random position near button
920 local offsetX = math.random(-40, 40)
921 local offsetY = math.random(-30, 10)
922 local screenPos = Vector2.new(
923 clickButton.AbsolutePosition.X + clickButton.AbsoluteSize.X / 2 + offsetX,
924 clickButton.AbsolutePosition.Y + clickY + offsetY
925 )
926
927 local earned = math.floor(state.multiplier)
928 spawnFloatingText("+" .. formatNumber(earned) .. " Coins", screenPos, CONFIG.COIN_GOLD)
929end
930
931clickButton.Activated:Connect(onClickButtonActivated)
932
933-- Touch support for mobile
934clickButton.TouchTap:Connect(function()
935 onClickButtonActivated()
936end)
937
938-- ============================================================
939-- PULSE ANIMATION (Idle state)
940-- ============================================================
941
942local pulseRunning = true
943
944local function runIdlePulse()
945 while pulseRunning do
946 local pulseGoal = TweenService:Create(clickPulse, TweenInfo.new(1.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
947 Size = UDim2.fromOffset(CONFIG.CLICK_BUTTON_SIZE + 20, CONFIG.CLICK_BUTTON_SIZE + 20),
948 Position = UDim2.new(0.5, -(CONFIG.CLICK_BUTTON_SIZE + 20) / 2, 0, -10),
949 BackgroundTransparency = 0.6,
950 })
951 pulseGoal:Play()
952 pulseGoal.Completed:Wait()
953
954 if not pulseRunning then break end
955
956 local pulseReturn = TweenService:Create(clickPulse, TweenInfo.new(1.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
957 Size = UDim2.fromOffset(CONFIG.CLICK_BUTTON_SIZE, CONFIG.CLICK_BUTTON_SIZE),
958 Position = UDim2.new(0.5, -CONFIG.CLICK_BUTTON_SIZE / 2, 0, 0),
959 BackgroundTransparency = 0.8,
960 })
961 pulseReturn:Play()
962 pulseReturn.Completed:Wait()
963 end
964end
965
966task.spawn(runIdlePulse)
967
968-- ============================================================
969-- REMOTE EVENT CONNECTIONS
970-- ============================================================
971
972updateCurrencyEvent.OnClientEvent:Connect(function(amount)
973 updateCurrency(amount)
974end)
975
976updateClicksEvent.OnClientEvent:Connect(function(amount)
977 updateClicks(amount)
978end)
979
980updateRebirthsEvent.OnClientEvent:Connect(function(amount)
981 updateRebirths(amount)
982end)
983
984updatePetsEvent.OnClientEvent:Connect(function(equipped, capacity)
985 updatePets(equipped, capacity)
986end)
987
988updateMultiplierEvent.OnClientEvent:Connect(function(value)
989 updateMultiplier(value)
990end)
991
992showNotificationEvent.OnClientEvent:Connect(function(message, notifType)
993 showNotification(message, notifType)
994end)
995
996showFloatingTextEvent.OnClientEvent:Connect(function(text, position, color)
997 spawnFloatingText(text, position, color)
998end)
999
1000-- ============================================================
1001-- KEYBOARD SHORTCUTS
1002-- ============================================================
1003
1004UserInputService.InputBegan:Connect(function(input, gameProcessed)
1005 if gameProcessed then return end
1006
1007 -- Spacebar also triggers click
1008 if input.KeyCode == Enum.KeyCode.Space then
1009 onClickButtonActivated()
1010 end
1011end)
1012
1013-- ============================================================
1014-- MENU BUTTON CONNECTIONS
1015-- ============================================================
1016
1017for _, cfg in ipairs(menuButtonConfigs) do
1018 local btn = menuButtons:FindFirstChild(cfg.name)
1019 if btn then
1020 btn.Activated:Connect(function()
1021 -- Button press feedback
1022 TweenService:Create(btn, CONFIG.TWEEN_FAST, { Size = UDim2.fromOffset(46, 46) }):Play()
1023 task.delay(0.1, function()
1024 TweenService:Create(btn, CONFIG.TWEEN_BOUNCE, {
1025 Size = UDim2.fromOffset(CONFIG.MENU_BUTTON_SIZE, CONFIG.MENU_BUTTON_SIZE),
1026 }):Play()
1027 end)
1028
1029 -- Fire to server to open menu
1030 openMenuEvent:FireServer(cfg.name)
1031 showNotification("Opening " .. cfg.label .. "...", "info")
1032 end)
1033 end
1034end
1035
1036-- ============================================================
1037-- INITIALIZATION
1038-- ============================================================
1039
1040print("[Simulator HUD] Initialized successfully")
1041
1042-- Intro animation
1043task.spawn(function()
1044 local elements = { topBar, clickButtonContainer, statsContainer, multiplierContainer, menuButtons }
1045 for _, element in ipairs(elements) do
1046 element.BackgroundTransparency = 1
1047 end
1048
1049 -- Slide in animations
1050 TweenService:Create(topBar, CONFIG.TWEEN_SLOW, { BackgroundTransparency = 0.1 }):Play()
1051 task.wait(0.1)
1052
1053 TweenService:Create(clickButtonContainer, CONFIG.TWEEN_BOUNCE, {
1054 Position = UDim2.new(0.5, 0, 1, -180),
1055 }):Play()
1056 task.wait(0.1)
1057
1058 TweenService:Create(statsContainer, CONFIG.TWEEN_SLOW, { BackgroundTransparency = 1 }):Play()
1059 TweenService:Create(multiplierContainer, CONFIG.TWEEN_SLOW, { BackgroundTransparency = 0.9 }):Play()
1060 TweenService:Create(menuButtons, CONFIG.TWEEN_SLOW, { BackgroundTransparency = 1 }):Play()
1061
1062 task.wait(0.5)
1063 showNotification("Welcome! Tap the button to start earning!", "success")
1064end)
1065
1066-- Demo: Simulate incoming data
1067task.delay(2, function()
1068 updateCurrency(1500)
1069 updateClicks(42)
1070 updateRebirths(1)
1071 updatePets(5, 100)
1072 updateMultiplier(2.5)
1073 updateProgress(0.35)
1074end)

Code preview

Simulator HUD

Luau
Interactive visual preview is shown in the Live preview section above.Switch tabs to inspect the generated Luau client/server code.
Visual preview of the templateRoblox GUI Maker

Frequently asked questions

Keep going

Similar templates