Cakey3101

Legends Of Speed - 8 - Help Script

Sep 19th, 2025
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.90 KB | Source Code | 0 0
  1. local Players = game:GetService("Players")
  2.  
  3. local GuiController = require(script.Parent.Parent.GuiController)
  4.  
  5. local Player = Players.LocalPlayer
  6.  
  7. local OpenGui = GuiController.Guis.Top
  8. local OpenButton = OpenGui.Frame.Help
  9.  
  10. local Gui = GuiController.Guis.Help
  11. local Frame = Gui.Frame
  12.  
  13. local Title = Frame.Title
  14. local Description = Frame.Description
  15. local Icon = Frame.Icon
  16. local Page = Frame.Page
  17.  
  18. local Exit = Frame.Exit
  19. local Next = Frame.Next
  20. local Previous = Frame.Previous
  21.  
  22. local PageIndex = 1
  23. local MaxPageIndex = 4
  24. local MinPageIndex = 1
  25.  
  26. local IconPrefix = "rbxassetid://"
  27.  
  28. local HelpFrames = {
  29.     [1] = {Title = "The Basics", Description = "Running and collecting orbs will give you steps and make you faster - each orb gives different stats!", Icon = 139966146780269},
  30.     [2] = {Title = "Speed Ramps", Description = "Speed Ramps give you a short boost when used - time your jump right to go higher!", Icon = 74412884009643},
  31.     [3] = {Title = "Hoops", Description = "Going through a Hoop will give you a huge amount of Steps/Gems - Hoop rewards get bigger with each map!", Icon = 106500402776483},
  32.     [4] = {Title = "Races", Description = "Races are a great way to earn rewards and compete against others - you must finish 1st, 2nd or 3rd to win!", Icon = 93868302606095},
  33. }
  34.  
  35. local function ChangePage(Amount: number)
  36.     PageIndex += Amount
  37.    
  38.     if PageIndex > MaxPageIndex then
  39.         PageIndex = MinPageIndex
  40.     end
  41.    
  42.     if PageIndex < MinPageIndex then
  43.         PageIndex = MaxPageIndex
  44.     end
  45.    
  46.     Page.Text = `Page {PageIndex} / {MaxPageIndex}`
  47.     Title.Title.Text = HelpFrames[PageIndex].Title
  48.     Description.Title.Text = HelpFrames[PageIndex].Description
  49.     Icon.Image = IconPrefix .. HelpFrames[PageIndex].Icon
  50. end
  51.  
  52. Next.MouseButton1Click:Connect(function()
  53.     ChangePage(1)
  54. end)
  55.  
  56. Previous.MouseButton1Click:Connect(function()
  57.     ChangePage(-1)
  58. end)
  59.  
  60. ChangePage(0)
  61. GuiController.SetupGui(Gui, OpenButton, Exit)
Advertisement
Add Comment
Please, Sign In to add comment