0% found this document useful (0 votes)
38 views3 pages

Main Lua

The document is a script for a GUI framework called Rayfield, designed for the game 'Restaurant Tycoon 2'. It includes features such as a key system for access, customizable player controls like infinite jump and adjustable walk speed, and teleport options to various in-game locations. The script also provides user notifications and allows for configuration saving.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views3 pages

Main Lua

The document is a script for a GUI framework called Rayfield, designed for the game 'Restaurant Tycoon 2'. It includes features such as a key system for access, customizable player controls like infinite jump and adjustable walk speed, and teleport options to various in-game locations. The script also provides user notifications and allows for configuration saving.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

local Rayfield = loadstring(game:HttpGet('https://sirius.

menu/rayfield'))()

local Window = Rayfield:CreateWindow({


Name = "🔥 Restaurant Tycoon 2 Script Hub | Game",
LoadingTitle = "Restaurant Tycoon 2💥",
LoadingSubtitle = "by LinuxDiscord",
ConfigurationSaving = {
Enabled = false,
FolderName = nil, -- Create a custom folder for your hub/game
FileName = "restaurant tycoon 2"
},
Discord = {
Enabled = false,
Invite = "noinvitelink", -- The Discord invite code, do not include
discord.gg/. E.g. discord.gg/ABCD would be ABCD
RememberJoins = true -- Set this to false to make them join the discord every
time they load it up
},
KeySystem = true, -- Set this to true to use our key system
KeySettings = {
Title = "Key | restaurant Tycoon 2",
Subtitle = "Key System",
Note = "Key In Discord Server",
FileName = "Wixkwosdiwso", -- It is recommended to use something unique as
other scripts using Rayfield may overwrite your key file
SaveKey = false, -- The user's key will be saved, but if you change the key,
they will be unable to use your script
GrabKeyFromSite = true, -- If this is true, set Key below to the RAW site you
would like Rayfield to get the key from
Key = {"https://pastebin.com/raw/AtgzSPWK"} -- List of keys that will be
accepted by the system, can be RAW file links (pastebin, github etc) or simple
strings ("hello","key22")
}
})

local MainTab = Window:CreateTab("🏠 Home", nil) -- Title, Image


local MainSection = MainTab:CreateSection("Main")

Rayfield:Notify({
Title = "You executed the script",
Content = "Very cool gui",
Duration = 5,
Image = 13047715178,
Actions = { -- Notification Buttons
Ignore = {
Name = "Okay!",
Callback = function()
print("The user tapped Okay!")
end
},
},
})

local Button = MainTab:CreateButton({


Name = "Infinite Jump Toggle 1",
Callback = function()
--Toggles the infinite jump between on or off on every script run
_G.infinjump = not _G.infinjump
if _G.infinJumpStarted == nil then
--Ensures this only runs once to save resources
_G.infinJumpStarted = true

--Notifies readiness
game.StarterGui:SetCore("SendNotification", {Title="Discord Hub";
Text="Infinite Jump Activated!"; Duration=5;})

--The actual infinite jump


local plr = game:GetService('Players').LocalPlayer
local m = plr:GetMouse()
m.KeyDown:connect(function(k)
if _G.infinjump then
if k:byte() == 32 then
humanoid =
game:GetService'Players'.LocalPlayer.Character:FindFirstChildOfClass('Humanoid')
humanoid:ChangeState('Jumping')
wait()
humanoid:ChangeState('Seated')
end
end
end)
end
end,
})

local Slider = MainTab:CreateSlider({


Name = "WalkSpeed Slider",
Range = {1, 350},
Increment = 1,
Suffix = "Speed",
CurrentValue = 16,
Flag = "sliderws", -- A flag is the identifier for the configuration file, make
sure every element has a different flag if you're using configuration saving to
ensure no overlaps
Callback = function(Value)
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = (Value)
end,
})

local Slider = MainTab:CreateSlider({


Name = "JumpPower Slider",
Range = {1, 350},
Increment = 1,
Suffix = "Speed",
CurrentValue = 16,
Flag = "sliderjp", -- A flag is the identifier for the configuration file, make
sure every element has a different flag if you're using configuration saving to
ensure no overlaps
Callback = function(Value)
game.Players.LocalPlayer.Character.Humanoid.JumpPower = (Value)
end,
})

local Dropdown = MainTab:CreateDropdown({


Name = "Select Area",
Options = {"Starter World","Pirate Island","Pineapple Paradise"},
CurrentOption = {"Starter World"},
MultipleOptions = false,
Flag = "dropdownarea", -- A flag is the identifier for the configuration file,
make sure every element has a different flag if you're using configuration saving
to ensure no overlaps
Callback = function(Option)
print(Option)
end,
})

local Input = MainTab:CreateInput({


Name = "Walkspeed",
PlaceholderText = "1-500",
RemoveTextAfterFocusLost = true,
Callback = function(Text)
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = (Text)
end,
})

local OtherSection = MainTab:CreateSection("Other")

local Toggle = MainTab:CreateToggle({


Name = "Auto Farm",
CurrentValue = false,
Flag = "Toggle1", -- A flag is the identifier for the configuration file, make
sure every element has a different flag if you're using configuration saving to
ensure no overlaps
Callback = function(Value)
print("FARMING")
end,
})

local TPTab = Window:CreateTab("Teleports", nil) -- Title, Image

local Button1 = TPTab:CreateButton({


Name = "Mall",
Callback = function()
--Teleport1
end,
})

local Button2 = TPTab:CreateButton({


Name = "Pirate Island",
Callback = function()
--Teleport2
end,
})

local Button3 = TPTab:CreateButton({


Name = "Restaurant",
Callback = function()
--Teleport3
end,
})

local TPTab = Window:CreateTab("🎲 Misc", nil) -- Title, Image


local TPTab = Window:CreateTab("mods coming soon scripts", nil) -- Title, Image
local TPTab = Window:CreateTab("Coming soon", nil) -- Title, Image

You might also like