Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local GuiController = require(script.Parent.Parent.GuiController)
- local Player = Players.LocalPlayer
- local OpenGui = GuiController.Guis.Top
- local OpenButton = OpenGui.Frame.Help
- local Gui = GuiController.Guis.Help
- local Frame = Gui.Frame
- local Title = Frame.Title
- local Description = Frame.Description
- local Icon = Frame.Icon
- local Page = Frame.Page
- local Exit = Frame.Exit
- local Next = Frame.Next
- local Previous = Frame.Previous
- local PageIndex = 1
- local MaxPageIndex = 4
- local MinPageIndex = 1
- local IconPrefix = "rbxassetid://"
- local HelpFrames = {
- [1] = {Title = "The Basics", Description = "Running and collecting orbs will give you steps and make you faster - each orb gives different stats!", Icon = 139966146780269},
- [2] = {Title = "Speed Ramps", Description = "Speed Ramps give you a short boost when used - time your jump right to go higher!", Icon = 74412884009643},
- [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},
- [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},
- }
- local function ChangePage(Amount: number)
- PageIndex += Amount
- if PageIndex > MaxPageIndex then
- PageIndex = MinPageIndex
- end
- if PageIndex < MinPageIndex then
- PageIndex = MaxPageIndex
- end
- Page.Text = `Page {PageIndex} / {MaxPageIndex}`
- Title.Title.Text = HelpFrames[PageIndex].Title
- Description.Title.Text = HelpFrames[PageIndex].Description
- Icon.Image = IconPrefix .. HelpFrames[PageIndex].Icon
- end
- Next.MouseButton1Click:Connect(function()
- ChangePage(1)
- end)
- Previous.MouseButton1Click:Connect(function()
- ChangePage(-1)
- end)
- ChangePage(0)
- GuiController.SetupGui(Gui, OpenButton, Exit)
Advertisement
Add Comment
Please, Sign In to add comment