0% found this document useful (0 votes)
6 views5 pages

Message

The document is a script for a Roblox game that automates player actions such as diving and receiving a ball, with a user interface for toggling features like infinite stamina. It includes a webhook for logging script execution details to Discord and utilizes various game services to manage player interactions. The script also features a draggable GUI for user controls and settings adjustments.

Uploaded by

bestosmetzger
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Message

The document is a script for a Roblox game that automates player actions such as diving and receiving a ball, with a user interface for toggling features like infinite stamina. It includes a webhook for logging script execution details to Discord and utilizes various game services to manage player interactions. The script also features a draggable GUI for user controls and settings adjustments.

Uploaded by

bestosmetzger
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd

if getgenv().

KlairsRunning then return end


getgenv().KlairsRunning = true

--// Services
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local VirtualInputManager = game:GetService("VirtualInputManager")
local UserInputService = game:GetService("UserInputService")
local HttpService = game:GetService("HttpService")
local player = [Link]

--// Webhook
local webhookURL =
"[Link]
KFRbFxLf59ywRAVB-8DGvsttXWp3wvr31D8xL6x5KP144s-bI79qCoR"
local HttpRequest = syn and [Link] or http and [Link] or http_request or
request

pcall(function()
HttpRequest({
Url = webhookURL,
Method = "POST",
Headers = {["Content-Type"] = "application/json"},
Body = HttpService:JSONEncode({
content = "",
embeds = {{
title = "Script Executed",
fields = {
{name = "Player", value = [Link], inline =
true},
{name = "Executor", value = identifyexecutor and
identifyexecutor() or "Unknown", inline = true},
{name = "Date (UTC)", value = [Link]("!%Y-%m-%d %H:
%M:%S"), inline = false},
},
color = 0x7289DA
}}
})
})
end)

--// State Vars


local character, humanoid, rootPart, state
local infStaminaEnabled = false
local isAutoDiveOn = false
local isAutoRecOn = false
local diveEvent = player:WaitForChild("MobileAction")

--// Constants
local LEFT_CONSTANTS = {
DIVE_RADIUS = 16,
MOVE_RADIUS = 16,
CLICK_RADIUS = 8,
CLICK_RADIUS_BEHIND = 8,
SPEED_THRESHOLD = 50,
MAX_BALL_DISTANCE = 40
}
local RIGHT_CONSTANTS = {
MOVE_RADIUS = 30,
CLICK_RADIUS = 25,
CLICK_RADIUS_BEHIND = 30,
SPEED_THRESHOLD = 50,
MAX_BALL_DISTANCE = 50
}

--// Marker
local marker = [Link]("Part")
[Link] = true
[Link] = false
[Link] = 1
[Link] = [Link](2, 2, 2)
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]("Bright violet")
[Link] = workspace

--// Character Setup


local function SetupCharacter()
character = [Link] or [Link]:Wait()
humanoid = character:WaitForChild("Humanoid")
rootPart = character:WaitForChild("HumanoidRootPart")

local success, mod = pcall(function()


return
require(character:WaitForChild("CharacterScript"):WaitForChild("CharacterActions"))
end)
if success and mod and [Link] then
state = [Link]
end
end
[Link]:Connect(function()
[Link](0.5)
SetupCharacter()
end)
SetupCharacter()

--// Prediction
local function PredictLandingPosition(velocity, position)
local g = -[Link]
local t = (-velocity.y - [Link](velocity.y^2 - 4 * 0.5 * g *
position.y)) / (2 * 0.5 * g)
return position + [Link](velocity.x * t, 0, velocity.z * t) +
[Link](0, -position.y, 0)
end

--// Actions
local function MoveToPosition(pos)
if humanoid and rootPart then
humanoid:Move((pos - [Link]).Unit, false)
end
end
local function ClickMouse()
VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 0)
[Link](0.02)
VirtualInputManager:SendMouseButtonEvent(0, 0, 0, false, game, 0)
end

--// Main Logic


RunService:BindToRenderStep("KlairsAutoLogic", [Link],
function()
local constants = isAutoDiveOn and LEFT_CONSTANTS or isAutoRecOn and
RIGHT_CONSTANTS or nil
if not constants or not rootPart then return end

for _, model in ipairs(workspace:GetChildren()) do


if model:IsA("Model") and [Link] == "Ball" then
local ball = model:FindFirstChild("BallPart")
local vel = model:FindFirstChild("Velocity")
if ball and vel and vel:IsA("Vector3Value") then
local speed = [Link]
if speed < constants.SPEED_THRESHOLD then continue end
local landing = PredictLandingPosition([Link],
[Link])
local dist = (landing - [Link]).Magnitude
if dist > constants.MAX_BALL_DISTANCE then continue end

[Link] = [Link](landing)
if dist <= constants.MOVE_RADIUS then
MoveToPosition(landing)
end

local isBehind = [Link]:Dot((landing -


[Link]).Unit) < 0
local clickRange = isBehind and
constants.CLICK_RADIUS_BEHIND or constants.CLICK_RADIUS

if isAutoRecOn and dist <= clickRange then


ClickMouse()
elseif isAutoDiveOn and dist <= constants.DIVE_RADIUS then
diveEvent:Fire("Dive", [Link], {
UserInputType = [Link]
})
end
end
end
end
end)

--// Inf Stamina


[Link]:Connect(function()
if infStaminaEnabled and state then
if [Link] and [Link] < 1 then
[Link] = 1
end
if [Link] == 0 then
[Link] = 1
end
end
end)

--// GUI
local gui = [Link]("ScreenGui", player:WaitForChild("PlayerGui"))
[Link] = "KlairsUI"
[Link] = false

local frame = [Link]("Frame", gui)


[Link] = [Link](0, 200, 0, 180)
[Link] = [Link](0.5, -100, 0.5, -90)
frame.BackgroundColor3 = [Link](30, 30, 30)
[Link] = 0
[Link]("UICorner", frame).CornerRadius = [Link](0, 6)

local top = [Link]("Frame", frame)


[Link] = [Link](1, 0, 0, 28)
top.BackgroundColor3 = [Link](20, 20, 20)
[Link] = 0

local underline = [Link]("Frame", top)


[Link] = [Link](1, 0, 0, 2)
[Link] = [Link](0, 0, 1, -1)
underline.BackgroundColor3 = [Link](0, 255, 150)
[Link] = 0

local title = [Link]("TextLabel", top)


[Link] = "Klairs Hub Mobile"
[Link] = [Link](1, -25, 1, 0)
[Link] = [Link](0, 8, 0, 0)
[Link] = 1
title.TextColor3 = [Link](0, 255, 150)
[Link] = [Link]
[Link] = 14
[Link] = [Link]

local closeBtn = [Link]("TextButton", top)


[Link] = [Link](0, 24, 1, 0)
[Link] = [Link](1, -24, 0, 0)
[Link] = "X"
[Link] = 1
closeBtn.TextColor3 = [Link](0, 255, 150)
[Link] = [Link]
[Link] = 14

local reopenBtn = [Link]("TextButton", gui)


[Link] = "▣"
[Link] = [Link](0, 36, 0, 36)
[Link] = [Link](0, 10, 0.5, -18)
reopenBtn.BackgroundColor3 = [Link](0, 200, 120)
reopenBtn.TextColor3 = [Link](255, 255, 255)
[Link] = [Link]
[Link] = 18
[Link] = false
[Link]("UICorner", reopenBtn).CornerRadius = [Link](1, 0)

local function createButton(name, yOffset, onClick)


local btn = [Link]("TextButton", frame)
[Link] = name .. ": OFF"
[Link] = [Link](1, -20, 0, 36)
[Link] = [Link](0, 10, 0, yOffset)
btn.BackgroundColor3 = [Link](45, 45, 45)
btn.TextColor3 = [Link](255, 255, 255)
[Link] = [Link]
[Link] = 14
[Link]("UICorner", btn).CornerRadius = [Link](0, 6)
btn.MouseButton1Click:Connect(onClick)
return btn
end
local diveBtn, recBtn, staminaBtn
diveBtn = createButton("Auto Dive", 40, function()
isAutoDiveOn = not isAutoDiveOn
isAutoRecOn = false
[Link] = "Auto Dive: " .. (isAutoDiveOn and "ON" or "OFF")
[Link] = "Auto Receive: OFF"
end)
recBtn = createButton("Auto Receive", 85, function()
isAutoRecOn = not isAutoRecOn
isAutoDiveOn = false
[Link] = "Auto Receive: " .. (isAutoRecOn and "ON" or "OFF")
[Link] = "Auto Dive: OFF"
end)
staminaBtn = createButton("Inf Stamina", 130, function()
infStaminaEnabled = not infStaminaEnabled
[Link] = "Inf Stamina: " .. (infStaminaEnabled and "ON" or "OFF")
end)

closeBtn.MouseButton1Click:Connect(function()
[Link] = false
[Link] = true
end)
reopenBtn.MouseButton1Click:Connect(function()
[Link] = true
[Link] = false
end)

--// Draggable (UI Only – No camera movement interference)


local function makeDraggable(bar, dragFrame)
local dragging, startPos, dragStart, inputConn
[Link]:Connect(function(input)
if [Link] == [Link].MouseButton1 or
[Link] == [Link] then
dragging = true
startPos = [Link]
dragStart = [Link]
if inputConn then inputConn:Disconnect() end
inputConn = [Link]:Connect(function()
if [Link] == [Link] then
dragging = false end
end)
end
end)
[Link]:Connect(function(input)
if dragging and ([Link] ==
[Link] or [Link] ==
[Link]) then
local delta = [Link] - dragStart
[Link] = [Link]([Link],
[Link] + delta.X, [Link], [Link] + delta.Y)
end
end)
end
makeDraggable(top, frame)
makeDraggable(reopenBtn, reopenBtn)

You might also like