local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()
local Window = Rayfield:CreateWindow({
Name = "Khang Gay Hub | Beta",
Icon = 0, -- Icon in Topbar. Can use Lucide Icons (string) or Roblox Image (number). 0 to use no icon (default).
LoadingTitle = "Khang Gay",
LoadingSubtitle = "by huh",
Theme = "Default", -- Check https://[Log in to view URL]
DisableRayfieldPrompts = false,
DisableBuildWarnings = false, -- Prevents Rayfield from warning when the script has a version mismatch with the interface
ConfigurationSaving = {
Enabled = false,
FolderName = nil, -- Create a custom folder for your hub/game
FileName = "Big Hub"
},
Discord = {
Enabled = false, -- Prompt the user to join your Discord server if their executor supports it
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 = false, -- Set this to true to use our key system
KeySettings = {
Title = "asdasasd",
Subtitle = "Key System",
Note = "No method of obtaining the key is provided", -- Use this to tell the user how to get a key
FileName = "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 = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
Key = {"Hello"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
}
})
Rayfield:Notify({
Title = "Script Executed",
Content = "Use at your own risk!",
Duration = 6.5,
Image = nil,
})
local MainTab = Window:CreateTab("Home", nil) -- Title, Image
local MainSection = MainTab:CreateSection("Main")
local MiscTab = Window:CreateTab("Misc", nil) -- Title, Image
local MiscSection = MiscTab:CreateSection("Local PLayer")
local Slider = MiscTab:CreateSlider({
Name = "Walk Speed",
Range = {1, 150},
Increment = 1,
Suffix = "Speed",
CurrentValue = 1,
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)
game.Players.LocalPlayer.Character:SetAttribute("SpeedMultiplier",Value)
end,
})
local Slider = MiscTab:CreateSlider({
Name = "Dash Length",
Range = {1, 300},
Increment = 1,
Suffix = "Length",
CurrentValue = 1,
Flag = "Slider2", -- 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:SetAttribute("DashLength",Value)
end,
})
local Slider = MiscTab:CreateSlider({
Name = "Jump Height",
Range = {50, 300},
Increment = 1,
Suffix = "Height",
CurrentValue = 50,
Flag = "Slider3", -- 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 IslandTab = Window:CreateTab("Island", nil) -- Title, Image
local IslandSection = IslandTab:CreateSection("Cant use this function now, wait me fix")
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)
local lp = game.Players.LocalPlayer
-- Function to get the player's current level
local function getPlayerLevel()
-- Assuming level is stored in a player attribute; adjust as necessary
return lp.Data.Level.Value
end
-- Function to get the appropriate NPC based on player level
local function getNPC()
local level = getPlayerLevel()
local enemyName
-- Determine the enemy name based on the player's level
if level < 10 then
enemyName = "Bandit"
elseif level >= 10 and level < 20 then
enemyName = "Monkey" -- Example for level 10-19
end
local dist, thing = math.huge
for _, v in pairs(game:GetService("Workspace").Enemies:GetChildren()) do
if v.Name == enemyName and v:FindFirstChild("Humanoid") and v.Humanoid.Health > 0 then
local mag = (lp.Character.HumanoidRootPart.Position - v.HumanoidRootPart.Position).Magnitude
if mag < dist then
dist = mag
thing = v
end
end
end
return thing
end
local TweenService = game:GetService("TweenService")
local noclipE = false
local antifall = true
local function noclip()
for i, v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
if v:IsA("BasePart") and v.CanCollide == true then
v.CanCollide = false
game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
end
end
end
local function moveto(obj, speed)
local info = TweenInfo.new(((game.Players.LocalPlayer.Character.HumanoidRootPart.Position - obj.Position).Magnitude)/ speed,Enum.EasingStyle.Linear)
local tween = TweenService:Create(game.Players.LocalPlayer.Character.HumanoidRootPart, info, {CFrame = obj})
if not game.Players.LocalPlayer.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
antifall = Instance.new("BodyVelocity", game.Players.LocalPlayer.Character.HumanoidRootPart)
antifall.Velocity = Vector3.new(0,0,0)
noclipE = game:GetService("RunService").Stepped:Connect(noclip)
tween:Play()
end
tween.Completed:Connect(function()
antifall:Destroy()
noclipE:Disconnect()
end)
end
getgenv().enemyName = true
while getgenv().enemyName do
task.wait()
pcall(function()
local npc = getNPC()
if npc then
moveto(npc.HumanoidRootPart.CFrame + Vector3.new(0, 0, 0), 100)
game:GetService("VirtualUser"):ClickButton1(Vector2.new(9e9, 9e9))
end
end)
end
-- The variable (Value) is a boolean on whether the toggle is true or false
end,
})
To embed this project on your website, copy the following code and paste it into your website's HTML: