local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()

local Window = Rayfield:CreateWindow({
   Name = "🏈⚾️ValHub🏈⚾️",
   LoadingTitle = "ValHub",
   LoadingSubtitle = "by Val",
   ConfigurationSaving = {
      Enabled = false,
      FolderName = nil, -- Create a custom folder for your hub/game
      FileName = "Val Hub"
   },
   Discord = {
      Enabled = true,
      Invite = "3vHKe2dcQ9", -- 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 = "ValHub ┃ Key",
      Subtitle = "Link In Discord Server",
      Note = "Join Server From valhub-key Tab",
      FileName = "ValHub Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
      SaveKey = true, -- 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://[Log in to view URL]"} -- 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("⚾️ HCBB ⚾️")

Rayfield:Notify({
   Title = "Execution Successful",
   Content = "ValHub",
   Duration = 5,
   Image = nil,
   Actions = { -- Notification Buttons
      Ignore = {
         Name = "Okay!",
         Callback = function()
            print("The user tapped Okay!")
         end
      },
   },
})

local autoAimEnabled = false
local offsetX = 10
local offsetY = 10

local Toggle = MainTab:CreateToggle({
   Name = "Auto Aim",
   CurrentValue = true,
   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)
      autoAimEnabled = Value
      print("Auto Aim set to", Value)
   end,
})

local SliderX = MainTab:CreateSlider({
   Name = "Offset X-Axis",
   Range = {-10, 100},
   Increment = 1,
   Suffix = "X-Axis",
   CurrentValue = 10,
   Flag = "SliderX", -- 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)
      offsetX = Value
      if autoAimEnabled then
         print("Offset X-Axis set to", Value)
         -- Your logic to handle X-Axis offset when Auto Aim is enabled
      end
   end,
})

local SliderY = MainTab:CreateSlider({
   Name = "Offset Y-Axis",
   Range = {-10, 100},
   Increment = 1,
   Suffix = "Y-Axis",
   CurrentValue = 10,
   Flag = "SliderY", -- 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)
      offsetY = Value
      if autoAimEnabled then
         print("Offset Y-Axis set to", Value)
         -- Your logic to handle Y-Axis offset when Auto Aim is enabled
      end
   end,
})

local Toggle = MainTab:CreateToggle({
   Name = "Don't Swing At Balls",
   CurrentValue = true,
   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)
-- SCRIPT HERE
   end,
})

local Toggle = MainTab:CreateToggle({
   Name = "Auto Hit",
   CurrentValue = true,
   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)
-- SCRIPT HERE
   end,
})

local Slider = MainTab:CreateSlider({
   Name = "Swing Timing",
   Range = {1, 50},
   Increment = 1,
   Suffix = "Timing",
   CurrentValue = 10,
   Flag = "Slider1", -- 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)
  -- SCRIPT HERE
   end,
})

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: