0% found this document useful (0 votes)
63 views

message (5)

The document is a Lua script for a game called 'Rune Slayer' that initializes a user interface and various game functionalities such as ESP, auto-farming, and character movement controls. It includes configuration settings, functions for fetching game entities like mobs and players, and automated actions like sprinting and skill usage. The script also handles user input and provides a framework for customizing gameplay features through a graphical window.

Uploaded by

endersteven098
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)
63 views

message (5)

The document is a Lua script for a game called 'Rune Slayer' that initializes a user interface and various game functionalities such as ESP, auto-farming, and character movement controls. It includes configuration settings, functions for fetching game entities like mobs and players, and automated actions like sprinting and skill usage. The script also handles user input and provides a framework for customizing gameplay features through a graphical window.

Uploaded by

endersteven098
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/ 25

loadstring([[

function LPH_NO_VIRTUALIZE(f) return f end;


]])()

repeat
task.wait()
until game:IsLoaded()

if getgenv().Luckyware then
return warn("Luckyware Already Loaded")
end

getgenv().Luckyware = true

--#region required functions


local Library =
loadstring(game:HttpGet("https://raw.githubusercontent.com/Lachyx/Library/
refs/heads/main/Library.lua"))()
local ESP =
loadstring(game:HttpGet("https://raw.githubusercontent.com/Lachyx/Library/
refs/heads/main/ESPLibrary.lua"))()
local RunService = game:GetService("RunService")
local Stats = game:GetService("Stats")
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local Workspace = game:GetService("Workspace")
local VirtualInputManager = game:GetService("VirtualInputManager")
local Lighting = game:GetService("Lighting")
local TeleportService = game:GetService("TeleportService")

local Player = Players.LocalPlayer


local Character = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart", 5)
--#endregion

--#region custom functions


local Game = "Rune Slayer" -- Adjust if targeting a different game
local Executor = identifyexecutor() or "Unknown"
local script_key = script_key or "Unknown"
local request = http_request or request or syn.request or http
local LRM_ScriptVersion = LRM_ScriptVersion or "0000"

if hookfunction then
hookfunction(warn, function()
return
end)
end

--#endregion custom functions

local Config = {
["MenuKeybind"] = "End",
["Infinite Jump"] = false,
["ESP"] = false,
["Boxes"] = false,
["Names"] = false,
["Tracers"] = false,
["Show Health"] = false,
["Show Distance"] = false,
["Distance"] = 300,
["No Fall Damage"] = false,
["Speed"] = false,
["Farm Mobs"] = false,
["AutoRollEnabled"] = false,
["AutoFarmEnabled"] = false,
["AutoAttackEnabled"] = false,
["FarmNearestEnabled"] = false,
["FarmDistance"] = 5,
["FarmBehind"] = false,
["AutoHarvestEnabled"] = false,
["HarvestDistance"] = 5,
["HarvestBehind"] = false,
["AutoSprintEnabled"] = false,
["AutoSkillEnabled"] = false,
["AutoBlockEnabled"] = false,
["SafeModeEnabled"] = false,
["HealthThreshold"] = 50,
["HealToThreshold"] = 75,
["SafeRetreatHeight"] = 100,
["CFrameSpeedEnabled"] = false,
["TweenSpeed"] = 10,
["FastModeEnabled"] = false,
["AnonymousModeEnabled"] = false,
}

local Connections = {}

makefolder("Luckyware")
makefolder(string.format("Luckyware/%s", Game))
makefolder(string.format("Luckyware/%s/Configs", Game))

local ConfigLoaded = false

local function LoadConfig()


local ConfigPath = string.format("Luckyware/%s/Configs/%s.json", Game,
Player.Name)

if isfile(ConfigPath) then
local SavedConfig = HttpService:JSONDecode(readfile(ConfigPath))
for k, v in pairs(Config) do
SavedConfig[k] = SavedConfig[k] or v
end
Config = SavedConfig
else
writefile(ConfigPath, HttpService:JSONEncode(Config))
end
ConfigLoaded = true
end

task.spawn(LoadConfig)

repeat
task.wait()
until ConfigLoaded

local Window = Library:CreateWindow({


Title = string.format(
"Luckyware - %s - %s - v%s.%s.%s.%s",
Game,
Executor,
string.sub(LRM_ScriptVersion, 1, 1),
string.sub(LRM_ScriptVersion, 2, 2),
string.sub(LRM_ScriptVersion, 3, 3),
string.sub(LRM_ScriptVersion, 4, 4)
),
Center = true,
AutoShow = true,
TabPadding = 1,
MenuFadeTime = 0.2,
})

local Tabs = {
Main = Window:AddTab("Main"),
Misc = Window:AddTab("Misc"),
Settings = Window:AddTab("Settings"),
}

local Groups = {
Main = {
Main = Tabs.Main:AddLeftGroupbox("Main"),
ESP = Tabs.Main:AddRightGroupbox("ESP"),
},
Misc = {
Misc = Tabs.Misc:AddLeftGroupbox("Misc"),
},
Settings = {
Settings = Tabs.Settings:AddLeftGroupbox("Settings"),
},
}

-- Custom Variables
local teleport_table = {}
local selected_teleport = nil
local mobs_table = {}
local players_table = {}
local harvestable_table = {}
local harvestable_types = {}
local npc_table = {}
local selected_mob = nil
local selected_player = nil
local selected_resource = nil
local selected_npc = nil
local inventory_table = {}
local selected_item = nil
local original_display_name = Player.DisplayName
local speed = 1 -- For CFrame Speed

-- Custom Functions
local function get_health_percentage()
local humanoid = Character and Character:FindFirstChild("Humanoid")
if humanoid then
return (humanoid.Health / humanoid.MaxHealth) * 100
end
return 100
end
local function tween_to_safe_above()
local hrp = Character and Character:FindFirstChild("HumanoidRootPart")
if not hrp then return end

local current_pos = hrp.Position


local safe_pos = current_pos + Vector3.new(0, Config["SafeRetreatHeight"], 0)
local target_cframe = CFrame.new(safe_pos, current_pos)

local distance = (current_pos - safe_pos).Magnitude


local tween_info = TweenInfo.new(distance / Config["TweenSpeed"],
Enum.EasingStyle.Linear)
local tween = TweenService:Create(hrp, tween_info, {CFrame = target_cframe})
print("Retreating upward to heal at:", safe_pos)
tween:Play()
tween.Completed:Wait()
hrp.Anchored = true
end

local function tween_back_down(target)


local hrp = Character and Character:FindFirstChild("HumanoidRootPart")
if not hrp or not target or not target:FindFirstChild("HumanoidRootPart") then
return end

local target_pos = target.HumanoidRootPart.Position


local descent_pos = Vector3.new(target_pos.X, target_pos.Y +
Config["FarmDistance"], target_pos.Z)
local target_cframe = CFrame.new(descent_pos, target_pos)

local distance = (hrp.Position - descent_pos).Magnitude


local tween_info = TweenInfo.new(distance / Config["TweenSpeed"],
Enum.EasingStyle.Linear)
local tween = TweenService:Create(hrp, tween_info, {CFrame = target_cframe})
hrp.Anchored = false
tween:Play()
tween.Completed:Wait()
end

local function fetch_mobs()


mobs_table = {}
local mobs_folder = Workspace:FindFirstChild("Alive")
if mobs_folder then
local unique_names = {}
for _, mob in pairs(mobs_folder:GetChildren()) do
if mob:IsA("Model") and mob:FindFirstChild("HumanoidRootPart") and not
Players:GetPlayerFromCharacter(mob) then
local base_name = mob.Name:match("^[^%d]+") or mob.Name
if not unique_names[base_name] then
unique_names[base_name] = true
table.insert(mobs_table, base_name)
end
end
end
print("Mobs fetched (unique):", table.concat(mobs_table, ", "))
else
warn("Alive folder not found in workspace!")
end
end
local function fetch_players()
players_table = {}
for _, player in pairs(Players:GetPlayers()) do
if player ~= Player and player.Character and
player.Character:FindFirstChild("HumanoidRootPart") then
table.insert(players_table, player.Name)
end
end
print("Players fetched:", table.concat(players_table, ", "))
end

local function fetch_teleport_locations()


teleport_table = {}
local alive_folder = Workspace:FindFirstChild("Alive")
if alive_folder then
local unique_names = {}
for _, obj in pairs(alive_folder:GetChildren()) do
if obj:IsA("Model") and obj:FindFirstChild("HumanoidRootPart") then
local base_name = obj.Name:match("^[^%d]+") or obj.Name
if not unique_names[base_name] then
unique_names[base_name] = true
teleport_table[base_name] = obj.HumanoidRootPart.Position
print("Teleport location fetched:", base_name,
obj.HumanoidRootPart.Position)
end
end
end
else
warn("Alive folder not found in workspace!")
end
end

local function fetch_npcs()


npc_table = {}
local effects_folder = Workspace:FindFirstChild("Effects")
if effects_folder then
local npcs_folder = effects_folder:FindFirstChild("NPCS")
if npcs_folder then
for _, npc in pairs(npcs_folder:GetChildren()) do
if npc:IsA("Model") and npc:FindFirstChild("HumanoidRootPart") then
-- Removed Quest1 filter
local position = npc.HumanoidRootPart.Position
npc_table[npc.Name] = {position = position, object = npc}
print("NPC fetched:", npc.Name, position)
end
end
else
warn("NPCS folder not found in Effects!")
end
else
warn("Effects folder not found in Workspace!")
end
end

local function fetch_inventory_items()


inventory_table = {}
local backpack = Player:FindFirstChild("Backpack")
if backpack then
for _, item in pairs(backpack:GetChildren()) do
if item:IsA("Tool") then
table.insert(inventory_table, item.Name)
print("Inventory item fetched:", item.Name)
end
end
else
warn("Backpack not found for player!")
end
end

local function fetch_harvestables()


harvestable_table = {}
harvestable_types = {}
local harvestable_folder = Workspace:FindFirstChild("Harvestable")
if harvestable_folder then
local unique_names = {}
for _, resource in pairs(harvestable_folder:GetChildren()) do
if resource:IsA("BasePart") or (resource:IsA("Model") and
(resource:FindFirstChild("trunk") or resource:FindFirstChild("PrimaryPart"))) then
local position
if resource:IsA("BasePart") then
position = resource.Position
elseif resource:FindFirstChild("trunk") then
position = resource.trunk.Position
else
position = resource.PrimaryPart.Position
end
harvestable_table[resource.Name] = {object = resource, position =
position}
local base_name = resource.Name:match("^[^%d]+") or resource.Name
if not unique_names[base_name] then
unique_names[base_name] = true
table.insert(harvestable_types, base_name)
end
print("Harvestable fetched:", resource.Name, position)
end
end
print("Harvestable types fetched:", table.concat(harvestable_types, ", "))
else
warn("Harvestable folder not found in workspace!")
end
end

local function equip_weapon()


VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.X, false, game)
task.wait(0.1)
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.X, false, game)
end

local function auto_click()


VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 0)
task.wait(0.1)
VirtualInputManager:SendMouseButtonEvent(0, 0, 0, false, game, 0)
end

local function auto_harvest_press()


VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.E, false, game)
task.wait(0.1)
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.E, false, game)
end

local function press_q()


VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.Q, false, game)
task.wait(0.1)
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.Q, false, game)
end

local function auto_sprint()


if Toggles["AutoSprintEnabled"].Value then
VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.W, false, game)
else
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.W, false, game)
end
end

local function auto_skill_press()


VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.R, false, game)
task.wait(0.1)
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.R, false, game)
end

local function auto_block()


if Toggles["AutoBlockEnabled"].Value then
VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.F, false, game)
else
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.F, false, game)
end
end

local function handle_auto_sprint()


spawn(function()
while not Library.Unloaded do
if Toggles["AutoSprintEnabled"].Value then
auto_sprint()
end
task.wait(0.1)
end
end)
end

local function handle_auto_skill()


spawn(function()
while not Library.Unloaded do
if Toggles["AutoSkillEnabled"].Value then
auto_skill_press()
task.wait(10)
else
task.wait(0.1)
end
end
end)
end

local function handle_auto_block()


spawn(function()
while not Library.Unloaded do
if Toggles["AutoBlockEnabled"].Value then
auto_block()
end
task.wait(0.1)
end
end)
end

local function handle_cframe_speed()


spawn(function()
while Toggles["CFrameSpeedEnabled"].Value and not Library.Unloaded do
local hrp = Character and Character:FindFirstChild("HumanoidRootPart")
if hrp then
hrp.CFrame = hrp.CFrame * CFrame.new(0, 0, -speed)
end
task.wait(0.01)
end
end)
end

local function handle_auto_roll()


spawn(function()
while Toggles["AutoRollEnabled"].Value and not Library.Unloaded do
press_q()
task.wait(0.5) -- Adjust timing as needed for roll cooldown
end
end)
end

local function move_to_target(target)


if not target or not target:FindFirstChild("HumanoidRootPart") then return end
local hrp = Character and Character:FindFirstChild("HumanoidRootPart")
if not hrp then return end

local distance = (hrp.Position - target.HumanoidRootPart.Position).Magnitude


local tween_info = TweenInfo.new(distance / Config["TweenSpeed"],
Enum.EasingStyle.Linear)
local tween = TweenService:Create(hrp, tween_info, {CFrame =
target.HumanoidRootPart.CFrame})
tween:Play()
tween.Completed:Wait()
end

local function tween_to_npc()


if not selected_npc or not npc_table[selected_npc] then
Library:Notify("Select a valid NPC first!")
return
end

local hrp = Character and Character:FindFirstChild("HumanoidRootPart")


if not hrp then return end

local npc_data = npc_table[selected_npc]


local npc_pos = npc_data.position
local distance = (hrp.Position - npc_pos).Magnitude
local tween_info = TweenInfo.new(distance / Config["TweenSpeed"],
Enum.EasingStyle.Linear)
local tween = TweenService:Create(hrp, tween_info, {CFrame =
CFrame.new(npc_pos)})
print("Tweening to NPC:", selected_npc, "at", npc_pos)
tween:Play()
tween.Completed:Wait()

task.wait(0.5)
Library:Notify("Teleported to NPC: " .. selected_npc .. "!")
end

local function tween_to_mob_target(target)


if not target or not target:FindFirstChild("HumanoidRootPart") then return end
local hrp = Character and Character:FindFirstChild("HumanoidRootPart")
if not hrp then return end

local mob_cframe = target.HumanoidRootPart.CFrame


local target_pos
if Toggles["FarmBehind"].Value then
target_pos = mob_cframe.Position - (mob_cframe.LookVector *
Config["FarmDistance"])
else
target_pos = mob_cframe.Position - Vector3.new(0, Config["FarmDistance"],
0)
end
local target_cframe = CFrame.new(target_pos, mob_cframe.Position)

local distance = (hrp.Position - target_pos).Magnitude


local tween_info = TweenInfo.new(distance / Config["TweenSpeed"],
Enum.EasingStyle.Linear)
local tween = TweenService:Create(hrp, tween_info, {CFrame = target_cframe})
print("Tweening to mob:", target.Name, "at", target_pos)
tween:Play()
tween.Completed:Wait()
end

local function tween_to_harvestable(resource)


if not resource or not resource:IsDescendantOf(Workspace) then return end
local hrp = Character and Character:FindFirstChild("HumanoidRootPart")
if not hrp then return end

local position
if resource:IsA("BasePart") then
position = resource.Position
elseif resource:FindFirstChild("trunk") then
position = resource.trunk.Position
else
position = resource.PrimaryPart.Position
end
local target_pos
if Toggles["HarvestBehind"].Value then
target_pos = position - Vector3.new(0, 0, Config["HarvestDistance"])
else
target_pos = position - Vector3.new(0, Config["HarvestDistance"], 0)
end
local target_cframe = CFrame.new(target_pos, position)

local distance = (hrp.Position - target_pos).Magnitude


local tween_info = TweenInfo.new(distance / Config["TweenSpeed"],
Enum.EasingStyle.Linear)
local tween = TweenService:Create(hrp, tween_info, {CFrame = target_cframe})
tween:Play()
tween.Completed:Wait()
end
local function auto_attack(mob)
if not mob or not mob:FindFirstChild("Humanoid") then return end
while Toggles["AutoAttackEnabled"].Value and mob:FindFirstChild("Humanoid") and
mob.Humanoid.Health > 0 and not Library.Unloaded do
equip_weapon()
auto_click()
task.wait(0.5)
end
end

local function start_auto_farm()


local mobs_folder = Workspace:FindFirstChild("Alive")
if not mobs_folder then
Library:Notify("Alive folder not found!")
return
end

if not selected_mob and not selected_player then


Library:Notify("No mob or player selected for Auto-Farm!")
return
end

spawn(function()
while Toggles["AutoFarmEnabled"].Value and not Library.Unloaded do
fetch_mobs()
fetch_players()

local targets = {}
if selected_mob then
for _, mob in pairs(mobs_folder:GetChildren()) do
if mob:IsA("Model") and mob:FindFirstChild("HumanoidRootPart")
and mob.Name:match("^" .. selected_mob) then
table.insert(targets, mob)
end
end
elseif selected_player then
local target_player = Players:FindPlayerByName(selected_player)
if target_player and target_player.Character and
target_player.Character:FindFirstChild("HumanoidRootPart") then
table.insert(targets, target_player.Character)
end
end

if #targets == 0 then
Library:Notify(selected_mob and "No mobs of type '" .. selected_mob
.. "' found!" or "Selected player '" .. selected_player .. "' not found!")
task.wait(2)
else
local closest_target = nil
local closest_distance = math.huge
local hrp = Character and
Character:FindFirstChild("HumanoidRootPart")
if hrp then
for _, target in pairs(targets) do
local distance = (hrp.Position -
target.HumanoidRootPart.Position).Magnitude
if distance < closest_distance then
closest_distance = distance
closest_target = target
end
end
end

if closest_target then
local health_percent = get_health_percentage()
if Toggles["SafeModeEnabled"].Value and health_percent <
Config["HealthThreshold"] then
Library:Notify("Health below " .. Config["HealthThreshold"]
.. "%! Retreating upward to heal...")
tween_to_safe_above()
while Toggles["SafeModeEnabled"].Value and
Toggles["AutoFarmEnabled"].Value and get_health_percentage() <
Config["HealToThreshold"] and not Library.Unloaded do
task.wait(1)
end
Library:Notify("Health reached " ..
Config["HealToThreshold"] .. "%! Resuming farming...")
tween_back_down(closest_target)
end
tween_to_mob_target(closest_target)
if Toggles["AutoAttackEnabled"].Value then
spawn(function()
auto_attack(closest_target)
end)
end
else
print("No valid closest target found!")
task.wait(1)
end
end
task.wait(0.5)
end
end)
end

local function start_farm_nearest()


local mobs_folder = Workspace:FindFirstChild("Alive")
if not mobs_folder then
Library:Notify("Alive folder not found!")
return
end

spawn(function()
while Toggles["FarmNearestEnabled"].Value and not Library.Unloaded do
fetch_mobs()
local targets = {}
for _, mob in pairs(mobs_folder:GetChildren()) do
if mob:IsA("Model") and mob:FindFirstChild("HumanoidRootPart") and
mob:FindFirstChild("Humanoid") and not Players:GetPlayerFromCharacter(mob) then
table.insert(targets, mob)
end
end

if #targets == 0 then
Library:Notify("No valid mobs found in Alive folder!")
task.wait(2)
else
local closest_mob = nil
local closest_distance = math.huge
local hrp = Character and
Character:FindFirstChild("HumanoidRootPart")
if hrp then
for _, mob in pairs(targets) do
local distance = (hrp.Position -
mob.HumanoidRootPart.Position).Magnitude
if distance < closest_distance then
closest_distance = distance
closest_mob = mob
end
end
end

if closest_mob then
local health_percent = get_health_percentage()
if Toggles["SafeModeEnabled"].Value and health_percent <
Config["HealthThreshold"] then
Library:Notify("Health below " .. Config["HealthThreshold"]
.. "%! Retreating upward to heal...")
tween_to_safe_above()
while Toggles["SafeModeEnabled"].Value and
Toggles["FarmNearestEnabled"].Value and get_health_percentage() <
Config["HealToThreshold"] and not Library.Unloaded do
task.wait(1)
end
Library:Notify("Health reached " ..
Config["HealToThreshold"] .. "%! Resuming farming...")
tween_back_down(closest_mob)
end
tween_to_mob_target(closest_mob)
if Toggles["AutoAttackEnabled"].Value then
spawn(function()
auto_attack(closest_mob)
end)
end
else
print("No valid closest mob found!")
task.wait(1)
end
end
task.wait(0.5)
end
end)
end

local function start_auto_harvest()


if not selected_resource then
Library:Notify("No resource type selected!")
return
end
local harvestable_folder = Workspace:FindFirstChild("Harvestable")
if not harvestable_folder then
Library:Notify("Harvestable folder not found!")
return
end

spawn(function()
while Toggles["AutoHarvestEnabled"].Value and not Library.Unloaded do
fetch_harvestables()
local targets = {}
for _, resource in pairs(harvestable_folder:GetChildren()) do
if resource:IsDescendantOf(Workspace) and (resource:IsA("BasePart")
or (resource:IsA("Model") and (resource:FindFirstChild("trunk") or
resource:FindFirstChild("PrimaryPart")))) then
if resource.Name:match("^" .. selected_resource) then
table.insert(targets, resource)
end
end
end

if #targets == 0 then
Library:Notify("No harvestable resources of type '" ..
selected_resource .. "' found!")
task.wait(2)
else
local closest_resource = nil
local closest_distance = math.huge
local hrp = Character and
Character:FindFirstChild("HumanoidRootPart")
if hrp then
for _, resource in pairs(targets) do
local position
if resource:IsA("BasePart") then
position = resource.Position
elseif resource:FindFirstChild("trunk") then
position = resource.trunk.Position
else
position = resource.PrimaryPart.Position
end
local distance = (hrp.Position - position).Magnitude
if distance < closest_distance then
closest_distance = distance
closest_resource = resource
end
end
end

if closest_resource then
tween_to_harvestable(closest_resource)
local harvest_start = tick()
while Toggles["AutoHarvestEnabled"].Value and
closest_resource:IsDescendantOf(Workspace) and (tick() - harvest_start < 10) and
not Library.Unloaded do
auto_harvest_press()
task.wait(0.5)
end
end
end
task.wait(0.5)
end
end)
end

local function sell_item()


if not selected_item then
Library:Notify("Select an item to sell first!")
return
end

local handler = Character and Character:WaitForChild("CharacterHandler", 5)


if not handler then
Library:Notify("CharacterHandler not loaded!")
return
end

task.wait(1) -- Ensure inventory sync

if not Player:FindFirstChild("Backpack"):FindFirstChild(selected_item) then


Library:Notify(selected_item .. " not found in Backpack!")
return
end

local args = {
[1] = Player:WaitForChild(selected_item) -- Default to Honey method for now
}

handler.Input.Events.SellEvent:FireServer(unpack(args))
Library:Notify("Sold " .. selected_item .. "!")
end

-- Auto-Update Dropdowns
local function auto_update_dropdowns()
spawn(function()
while not Library.Unloaded do
fetch_mobs()
Options["MobDropdown"]:SetValues(mobs_table)

fetch_players()
Options["PlayerDropdown"]:SetValues(players_table)

fetch_harvestables()
Options["HarvestDropdown"]:SetValues(harvestable_types)

fetch_teleport_locations()
local teleport_values = {}
for name, _ in pairs(teleport_table) do
table.insert(teleport_values, name)
end
Options["TeleportDropdown"]:SetValues(teleport_values)

fetch_npcs()
local npc_values = {}
for name, _ in pairs(npc_table) do
table.insert(npc_values, name)
end
Options["NPCDropdown"]:SetValues(npc_values)

fetch_inventory_items()
Options["SellItemDropdown"]:SetValues(inventory_table)

task.wait(5) -- Update every 5 seconds


end
end)
end
-- UI Setup
Groups.Main.Main
:AddToggle("Infinite Jump", {
Text = "Infinite Jump",
Default = Config["Infinite Jump"],
})
:OnChanged(function(Value)
task.spawn(function()
if Value then
Connections["InfiniteJump"] =
UserInputService.JumpRequest:Connect(function()
if
Character
and Character:FindFirstChild("Humanoid")
and not Library.Unloaded
and Toggles["Infinite Jump"].Value
then

Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)
else
if Connections["InfiniteJump"] then
Connections["InfiniteJump"]:Disconnect()
Connections["InfiniteJump"] = nil
end
end
end)
end)

Groups.Main.Main
:AddToggle("AutoRollEnabled", {
Text = "Enable Auto Roll",
Default = Config["AutoRollEnabled"],
})
:OnChanged(function(Value)
if Value then handle_auto_roll() end
end)

Groups.Main.ESP
:AddToggle("ESP", {
Text = "ESP",
Default = Config["ESP"],
})
:OnChanged(function(Value)
task.spawn(function()
if Value then
for _, entity in
pairs(Workspace:WaitForChild("Alive"):GetChildren()) do
ESP:AddObject(entity)
end

Connections["ESPChildAdded"] =
Workspace:WaitForChild("Alive").ChildAdded:Connect(function(child)
if Toggles["ESP"].Value and not Library.Unloaded then
ESP:AddObject(child)
end
end)
Connections["ESPChildRemoved"] =
Workspace:WaitForChild("Alive").ChildRemoved:Connect(function(child)
if Toggles["ESP"].Value and not Library.Unloaded then
ESP:RemoveObject(child)
end
end)
else
ESP:Destruct()
if Connections["ESPChildAdded"] then
Connections["ESPChildAdded"]:Disconnect()
Connections["ESPChildAdded"] = nil
end
if Connections["ESPChildRemoved"] then
Connections["ESPChildRemoved"]:Disconnect()
Connections["ESPChildRemoved"] = nil
end
end
end)
end)

Groups.Main.ESP
:AddToggle("Boxes", {
Text = "Boxes",
Default = Config["Boxes"],
})
:OnChanged(function(Value)
task.spawn(function()
ESP.Settings.Boxes = Value
end)
end)

Groups.Main.ESP
:AddToggle("Names", {
Text = "Names",
Default = Config["Names"],
})
:OnChanged(function(Value)
task.spawn(function()
ESP.Settings.Names = Value
end)
end)

Groups.Main.ESP
:AddToggle("Tracers", {
Text = "Tracers",
Default = Config["Tracers"],
})
:OnChanged(function(Value)
task.spawn(function()
ESP.Settings.Tracers = Value
end)
end)

Groups.Main.ESP
:AddToggle("Show Health", {
Text = "Health",
Default = Config["Show Health"],
})
:OnChanged(function(Value)
task.spawn(function()
ESP.Settings.ShowHealth = Value
end)
end)

Groups.Main.ESP
:AddToggle("Show Distance", {
Text = "Distance",
Default = Config["Show Distance"],
})
:OnChanged(function(Value)
task.spawn(function()
ESP.Settings.ShowDistance = Value
end)
end)

Groups.Main.ESP
:AddSlider("Distance", {
Text = "Distance",
Default = Config["Distance"],
Min = 0,
Max = 50000,
Rounding = 1,
Compact = true,
})
:OnChanged(function(Value)
task.spawn(function()
ESP.Settings.DistanceThreshold = Value
end)
end)

Groups.Main.Main
:AddToggle("No Fall Damage", {
Text = "No Fall Damage",
Default = Config["No Fall Damage"],
})
:OnChanged(function(Value)
task.spawn(function()
if Value then
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
Connections["NoFallDamage"] =
Humanoid.StateChanged:Connect(function(_, newState)
if
newState == Enum.HumanoidStateType.Freefall
and Toggles["No Fall Damage"].Value
and not Library.Unloaded
then
Humanoid:ChangeState(Enum.HumanoidStateType.Running)
end
end)
end
else
if Connections["NoFallDamage"] then
Connections["NoFallDamage"]:Disconnect()
Connections["NoFallDamage"] = nil
end
end
end)
end)

Groups.Main.Main
:AddToggle("Speed", {
Text = "Speed",
Default = Config["Speed"],
})
:OnChanged(function(Value)
task.spawn(function()
if Value then
local index
index = hookmetamethod(game, "__index", function(self, arg)
if
not checkcaller()
and Toggles["Speed"].Value
and not Library.Unloaded
and self:IsA("Humanoid")
and (tostring(arg):lower() == "walkspeed" or tostring(arg)
== "SpeedBoost")
then
return 100
end
return index(self, arg)
end)
end
end)
end)

Groups.Main.Main
:AddToggle("Farm Mobs", {
Text = "Farm Mobs",
Default = Config["Farm Mobs"],
})
:OnChanged(function(Value)
task.spawn(function()
while Value and Toggles["Farm Mobs"].Value and not Library.Unloaded do
for _, mob in pairs(Workspace:WaitForChild("Alive"):GetChildren())
do
local MobRoot = mob:FindFirstChild("HumanoidRootPart")
if MobRoot and Toggles["Farm Mobs"].Value and not
Library.Unloaded then
local TweenInfoData = TweenInfo.new(5,
Enum.EasingStyle.Linear)
local Animation =
TweenService:Create(HumanoidRootPart, TweenInfoData,
{ CFrame = MobRoot.CFrame })
Animation:Play()
task.wait(5)
end
end
task.wait(0.1)
end
end)
end)

-- Teleport Features
Groups.Misc.Misc
:AddDropdown("TeleportDropdown", {
Text = "Select Location",
Default = "None",
Values = {},
AllowNull = true,
})
:OnChanged(function(Value)
selected_teleport = Value
print("Teleport location selected:", Value)
end)

Groups.Misc.Misc:AddButton("Teleport", function()
if selected_teleport and teleport_table[selected_teleport] then
local alive_folder = Workspace:FindFirstChild("Alive")
if alive_folder then
for _, obj in pairs(alive_folder:GetChildren()) do
if obj:IsA("Model") and obj:FindFirstChild("HumanoidRootPart") and
(obj.Name:match("^" .. selected_teleport) or obj.Name == selected_teleport) then
move_to_target(obj)
Library:Notify("Teleported to " .. selected_teleport .. "!")
break
end
end
end
else
Library:Notify("Select a valid teleport location first!")
end
end)

Groups.Misc.Misc
:AddDropdown("NPCDropdown", {
Text = "Select NPC",
Default = "None",
Values = {},
AllowNull = true,
})
:OnChanged(function(Value)
selected_npc = Value
print("NPC selected:", Value)
end)

Groups.Misc.Misc:AddButton("Tween to NPC", function()


tween_to_npc()
end)

-- Auto-Farm & Harvest Features


Groups.Misc.Misc
:AddDropdown("MobDropdown", {
Text = "Select Mob Type",
Default = "None",
Values = mobs_table,
AllowNull = true,
})
:OnChanged(function(Value)
selected_mob = Value
selected_player = nil
print("Mob type selected:", Value)
end)

Groups.Misc.Misc
:AddDropdown("PlayerDropdown", {
Text = "Select Player",
Default = "None",
Values = players_table,
AllowNull = true,
})
:OnChanged(function(Value)
selected_player = Value
selected_mob = nil
print("Player selected:", Value)
end)

Groups.Misc.Misc
:AddDropdown("HarvestDropdown", {
Text = "Select Resource Type",
Default = "None",
Values = harvestable_types,
AllowNull = true,
})
:OnChanged(function(Value)
selected_resource = Value
print("Resource type selected:", Value)
end)

Groups.Misc.Misc
:AddToggle("AutoFarmEnabled", {
Text = "Enable Auto-Farm",
Default = Config["AutoFarmEnabled"],
})
:OnChanged(function(Value)
if Value then start_auto_farm() end
end)

Groups.Misc.Misc
:AddToggle("AutoAttackEnabled", {
Text = "Enable Auto-Attack",
Default = Config["AutoAttackEnabled"],
})
:OnChanged(function(Value)
-- Value checked in auto_attack
end)

Groups.Misc.Misc
:AddToggle("FarmNearestEnabled", {
Text = "Farm Nearest Mob",
Default = Config["FarmNearestEnabled"],
})
:OnChanged(function(Value)
if Value then start_farm_nearest() end
end)

Groups.Misc.Misc
:AddSlider("FarmDistance", {
Text = "Farm Distance",
Default = Config["FarmDistance"],
Min = 2,
Max = 15,
Rounding = 1,
})
:OnChanged(function(Value)
print("Farm distance set to:", Value)
end)

Groups.Misc.Misc
:AddToggle("FarmBehind", {
Text = "Farm Behind Mob",
Default = Config["FarmBehind"],
})
:OnChanged(function(Value)
print("Farm behind mob:", Value)
end)

Groups.Misc.Misc
:AddToggle("AutoHarvestEnabled", {
Text = "Enable Auto-Harvest",
Default = Config["AutoHarvestEnabled"],
})
:OnChanged(function(Value)
if Value then start_auto_harvest() end
end)

Groups.Misc.Misc
:AddSlider("HarvestDistance", {
Text = "Harvest Distance",
Default = Config["HarvestDistance"],
Min = 2,
Max = 15,
Rounding = 1,
})
:OnChanged(function(Value)
print("Harvest distance set to:", Value)
end)

Groups.Misc.Misc
:AddToggle("HarvestBehind", {
Text = "Harvest Behind Resource",
Default = Config["HarvestBehind"],
})
:OnChanged(function(Value)
print("Harvest behind resource:", Value)
end)

Groups.Misc.Misc
:AddToggle("AutoSprintEnabled", {
Text = "Enable Auto-Sprint",
Default = Config["AutoSprintEnabled"],
})
:OnChanged(function(Value)
print("Auto-sprint:", Value)
end)

Groups.Misc.Misc
:AddToggle("AutoSkillEnabled", {
Text = "Enable Auto-Skill (R every 10s)",
Default = Config["AutoSkillEnabled"],
})
:OnChanged(function(Value)
print("Auto-skill:", Value)
end)
Groups.Misc.Misc
:AddToggle("AutoBlockEnabled", {
Text = "Enable Auto-Block (Hold F)",
Default = Config["AutoBlockEnabled"],
})
:OnChanged(function(Value)
print("Auto-block:", Value)
end)

Groups.Misc.Misc
:AddToggle("SafeModeEnabled", {
Text = "Enable Safe Mode",
Default = Config["SafeModeEnabled"],
})
:OnChanged(function(Value)
print("Safe mode:", Value)
end)

Groups.Misc.Misc
:AddSlider("HealthThreshold", {
Text = "Health Trigger (%)",
Default = Config["HealthThreshold"],
Min = 10,
Max = 90,
Rounding = 0,
})
:OnChanged(function(Value)
print("Health trigger set to:", Value .. "%")
end)

Groups.Misc.Misc
:AddSlider("HealToThreshold", {
Text = "Heal To (%)",
Default = Config["HealToThreshold"],
Min = 20,
Max = 100,
Rounding = 0,
})
:OnChanged(function(Value)
print("Heal to threshold set to:", Value .. "%")
end)

Groups.Misc.Misc
:AddSlider("SafeRetreatHeight", {
Text = "Safe Retreat Height",
Default = Config["SafeRetreatHeight"],
Min = 50,
Max = 200,
Rounding = 0,
})
:OnChanged(function(Value)
print("Safe retreat height set to:", Value)
end)

-- Settings Features
Groups.Settings.Settings
:AddDropdown("SellItemDropdown", {
Text = "Select Item to Sell",
Default = "None",
Values = {},
AllowNull = true,
})
:OnChanged(function(Value)
selected_item = Value
print("Item to sell selected:", Value)
end)

Groups.Settings.Settings:AddButton("Sell Item", function()


sell_item()
end)

Groups.Settings.Settings
:AddToggle("CFrameSpeedEnabled", {
Text = "Enable CFrame Speed",
Default = Config["CFrameSpeedEnabled"],
})
:OnChanged(function(Value)
if Value then handle_cframe_speed() end
end)

Groups.Settings.Settings
:AddSlider("TweenSpeed", {
Text = "Tween Speed",
Default = Config["TweenSpeed"],
Min = 1,
Max = 100,
Rounding = 1,
})
:OnChanged(function(Value)
print("Tween speed set to:", Value)
end)

Groups.Settings.Settings
:AddToggle("FastModeEnabled", {
Text = "Enable Fast Mode",
Default = Config["FastModeEnabled"],
})
:OnChanged(function(Value)
if Value then
settings().Rendering.QualityLevel = Enum.QualityLevel.Level01
Lighting.GlobalShadows = false
Lighting.FogEnd = 10000
Library:Notify("Fast Mode enabled!")
else
settings().Rendering.QualityLevel = Enum.QualityLevel.Automatic
Lighting.GlobalShadows = true
Lighting.FogEnd = 100000
Library:Notify("Fast Mode disabled!")
end
end)

Groups.Settings.Settings
:AddToggle("AnonymousModeEnabled", {
Text = "Enable Anonymous Mode",
Default = Config["AnonymousModeEnabled"],
})
:OnChanged(function(Value)
if Value then
Player.DisplayName = ""
local humanoid = Character and Character:FindFirstChild("Humanoid")
if humanoid then
local desc = Instance.new("HumanoidDescription")
desc.HairAccessory = ""
desc.Head = 0
desc.Face = 0
humanoid:ApplyDescription(desc)
end
Library:Notify("Anonymous Mode enabled!")
else
Player.DisplayName = original_display_name
local humanoid = Character and Character:FindFirstChild("Humanoid")
if humanoid then
local original_desc =
Players:GetHumanoidDescriptionFromUserId(Player.UserId)
humanoid:ApplyDescription(original_desc)
end
Library:Notify("Anonymous Mode disabled!")
end
end)

Groups.Settings.Settings:AddButton("Auto Rejoin Game", function()


TeleportService:Teleport(game.PlaceId, Player)
task.wait(2)
Library:Notify("Rejoined game!")
end)

Groups.Settings.Settings:AddButton("Unload", function()
Library:Unload()
end)

Groups.Settings.Settings
:AddLabel("Menu bind")
:AddKeyPicker("MenuKeybind", { Default = Config["MenuKeybind"], NoUI = true,
Text = "Menu Keybind" })

-- Initialize Continuous Features


task.spawn(handle_auto_sprint)
task.spawn(handle_auto_skill)
task.spawn(handle_auto_block)
task.spawn(auto_update_dropdowns) -- Auto-update all dropdowns

local FrameTimer = tick()


local FrameCounter = 0
local FPS = 60

local WatermarkConnection =
RunService.RenderStepped:Connect(LPH_NO_VIRTUALIZE(function()
FrameCounter += 1

if (tick() - FrameTimer) >= 1 then


FPS = FrameCounter
FrameTimer = tick()
FrameCounter = 0
end

Library:SetWatermark(
("Luckyware | %s FPS | %s ms | %s Kbps | %s"):format(
math.floor(FPS),
math.floor(Stats.Network.ServerStatsItem["Data Ping"]:GetValue()),
math.floor(Stats.Network.ServerStatsItem["Receive kBps"]:GetValue()),
string.format(
"%02d:%02d:%02d",

math.floor(Stats.Network.ServerStatsItem["ElapsedTime"]:GetValue() / 3600),
math.floor((Stats.Network.ServerStatsItem["ElapsedTime"]:GetValue()
% 3600) / 60),
math.floor(Stats.Network.ServerStatsItem["ElapsedTime"]:GetValue()
% 60)
)
)
)
end))

Library:OnUnload(function()
WatermarkConnection:Disconnect()
if cleardrawcache then
cleardrawcache()
end
for _, connection in pairs(Connections) do
connection:Disconnect()
end
Library.Unloaded = true
getgenv().Luckyware = false
end)

Library:Notify("Discord: Luckyware")

Library.ToggleKeybind = Options["MenuKeybind"]

task.spawn(function()
while task.wait(0.1) and not Library.Unloaded do
for Name, Option in pairs(Options) do
Config[Name] = Option.Value
end
for Name, Toggle in pairs(Toggles) do
Config[Name] = Toggle.Value
end
writefile(string.format("Luckyware/%s/Configs/%s.json", Game, Player.Name),
HttpService:JSONEncode(Config))
end
end)

You might also like