
KeylessUniversal

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
-- Ensure Player and Mouse are fully loaded to prevent nil indexing errors
local player = Players.LocalPlayer
while not player do
task.wait()
player = Players.LocalPlayer
end
local mouse = player:GetMouse()
while not mouse do
task.wait()
mouse = player:GetMouse()
end
local looping = false
local targetPlayer = nil
local currentTime = 0
-- Persistent state variables for respawn tracking
local isFloatActive = false
local activeTarget = nil
local targetConnection = nil
-- Keep track of original joint states for clean resets
_G.OriginalJoints = {}
_G.OriginalHipHeight = 0
-- Configuration table with updated defaults from the screenshot
local config = {
baseZ = 2.5,
rangeZ = 1.5,
limbSpeed = 220,
bodySpeed = 210
}
-- ScreenGui
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "BalloonFloatGui"
ScreenGui.ResetOnSpawn = false -- Keeps the UI loaded across spawns
local successCore, errCore = pcall(function()
ScreenGui.Parent = game:GetService("CoreGui")
end)
if not successCore then
ScreenGui.Parent = player:WaitForChild("PlayerGui")
end
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
-- Intro Frame
local IntroFrame = Instance.new("Frame")
IntroFrame.Name = "IntroFrame"
IntroFrame.Parent = ScreenGui
IntroFrame.BackgroundColor3 = Color3.fromRGB(20, 30, 45)
IntroFrame.BorderSizePixel = 0
IntroFrame.Position = UDim2.new(0.5, -200, 0.5, -150)
IntroFrame.Size = UDim2.new(0, 400, 0, 300)
local UICorner1 = Instance.new("UICorner")
UICorner1.Parent = IntroFrame
UICorner1.CornerRadius = UDim.new(0, 15)
-- Intro Title & Subtitle
local IntroTitle = Instance.new("TextLabel")
IntroTitle.Parent = IntroFrame
IntroTitle.BackgroundTransparency = 1
IntroTitle.Position = UDim2.new(0, 0, 0.2, 0)
IntroTitle.Size = UDim2.new(1, 0, 0, 60)
IntroTitle.Font = Enum.Font.GothamBold
IntroTitle.Text = "BALLOON FLOAT"
IntroTitle.TextColor3 = Color3.fromRGB(85, 200, 255)
IntroTitle.TextSize = 42
IntroTitle.TextStrokeTransparency = 0.8
local IntroSubtitle = Instance.new("TextLabel")
IntroSubtitle.Parent = IntroFrame
IntroSubtitle.BackgroundTransparency = 1
IntroSubtitle.Position = UDim2.new(0, 0, 0.45, 0)
IntroSubtitle.Size = UDim2.new(1, 0, 0, 30)
IntroSubtitle.Font = Enum.Font.Gotham
IntroSubtitle.Text = "Direct Click Follower - PC Edition"
IntroSubtitle.TextColor3 = Color3.fromRGB(200, 220, 240)
IntroSubtitle.TextSize = 16
-- Continue Button
local ContinueButton = Instance.new("TextButton")
ContinueButton.Parent = IntroFrame
ContinueButton.BackgroundColor3 = Color3.fromRGB(85, 170, 255)
ContinueButton.Position = UDim2.new(0.5, -80, 0.7, 0)
ContinueButton.Size = UDim2.new(0, 160, 0, 45)
ContinueButton.Font = Enum.Font.GothamBold
ContinueButton.Text = "CONTINUE"
ContinueButton.TextColor3 = Color3.fromRGB(255, 255, 255)
ContinueButton.TextSize = 18
ContinueButton.AutoButtonColor = false
local UICorner2 = Instance.new("UICorner")
UICorner2.Parent = ContinueButton
UICorner2.CornerRadius = UDim.new(0, 10)
-- Main Frame (Expanded width to 600 for Sidebar player list)
local MainFrame = Instance.new("Frame")
MainFrame.Name = "MainFrame"
MainFrame.Parent = ScreenGui
MainFrame.BackgroundColor3 = Color3.fromRGB(25, 35, 50)
MainFrame.BorderSizePixel = 0
MainFrame.Position = UDim2.new(0.5, -300, 0.5, -137)
MainFrame.Size = UDim2.new(0, 600, 0, 275)
MainFrame.Visible = false
MainFrame.BackgroundTransparency = 1
local UICorner3 = Instance.new("UICorner")
UICorner3.Parent = MainFrame
UICorner3.CornerRadius = UDim.new(0, 15)
-- Top Bar (drag handle)
local TopBar = Instance.new("Frame")
TopBar.Parent = MainFrame
TopBar.BackgroundColor3 = Color3.fromRGB(35, 45, 65)
TopBar.BorderSizePixel = 0
TopBar.Size = UDim2.new(1, 0, 0, 50)
local UICorner4 = Instance.new("UICorner")
UICorner4.Parent = TopBar
UICorner4.CornerRadius = UDim.new(0, 15)
-- Title
local Title = Instance.new("TextLabel")
Title.Parent = TopBar
Title.BackgroundTransparency = 1
Title.Position = UDim2.new(0, 15, 0, 0)
Title.Size = UDim2.new(1, -60, 1, 0)
Title.Font = Enum.Font.GothamBold
Title.Text = "BALLOON FLOAT"
Title.TextColor3 = Color3.fromRGB(85, 200, 255)
Title.TextSize = 22
Title.TextXAlignment = Enum.TextXAlignment.Left
-- Close Button
local CloseButton = Instance.new("TextButton")
CloseButton.Parent = TopBar
CloseButton.BackgroundColor3 = Color3.fromRGB(255, 85, 85)
CloseButton.Position = UDim2.new(1, -45, 0.5, -15)
CloseButton.Size = UDim2.new(0, 30, 0, 30)
CloseButton.Font = Enum.Font.GothamBold
CloseButton.Text = "X"
CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
CloseButton.TextSize = 18
local UICorner5 = Instance.new("UICorner")
UICorner5.Parent = CloseButton
UICorner5.CornerRadius = UDim.new(0, 8)
-- Status Label
local StatusLabel = Instance.new("TextLabel")
StatusLabel.Parent = MainFrame
StatusLabel.BackgroundTransparency = 1
StatusLabel.Position = UDim2.new(0, 20, 0, 55)
StatusLabel.Size = UDim2.new(0, 360, 0, 50)
StatusLabel.Font = Enum.Font.GothamMedium
StatusLabel.Text = "Status: Click on any player's character to start floating!\n(Press INSERT or R-CTRL to Hide/Show)"
StatusLabel.TextColor3 = Color3.fromRGB(180, 200, 220)
StatusLabel.TextSize = 14
StatusLabel.TextWrapped = true
StatusLabel.TextYAlignment = Enum.TextYAlignment.Center
-- --- UI Inputs Configuration Area (2x2 Grid on Left side) ---
-- ROW 1, COLUMN 1: Base Z Input
local BaseZLabel = Instance.new("TextLabel")
BaseZLabel.Parent = MainFrame
BaseZLabel.BackgroundTransparency = 1
BaseZLabel.Position = UDim2.new(0, 20, 0, 110)
BaseZLabel.Size = UDim2.new(0, 170, 0, 15)
BaseZLabel.Font = Enum.Font.GothamBold
BaseZLabel.Text = "Base Z"
BaseZLabel.TextColor3 = Color3.fromRGB(85, 200, 255)
BaseZLabel.TextSize = 12
BaseZLabel.TextXAlignment = Enum.TextXAlignment.Center
local BaseZInput = Instance.new("TextBox")
BaseZInput.Parent = MainFrame
BaseZInput.BackgroundColor3 = Color3.fromRGB(35, 45, 65)
BaseZInput.Position = UDim2.new(0, 20, 0, 127)
BaseZInput.Size = UDim2.new(0, 170, 0, 28)
BaseZInput.Font = Enum.Font.GothamMedium
BaseZInput.Text = tostring(config.baseZ)
BaseZInput.TextColor3 = Color3.fromRGB(255, 255, 255)
BaseZInput.TextSize = 14
BaseZInput.ClearTextOnFocus = false
local UICornerBaseZ = Instance.new("UICorner")
UICornerBaseZ.Parent = BaseZInput
UICornerBaseZ.CornerRadius = UDim.new(0, 6)
-- ROW 1, COLUMN 2: Range Z Input
local RangeZLabel = Instance.new("TextLabel")
RangeZLabel.Parent = MainFrame
RangeZLabel.BackgroundTransparency = 1
RangeZLabel.Position = UDim2.new(0, 210, 0, 110)
RangeZLabel.Size = UDim2.new(0, 170, 0, 15)
RangeZLabel.Font = Enum.Font.GothamBold
RangeZLabel.Text = "Range Z"
RangeZLabel.TextColor3 = Color3.fromRGB(85, 200, 255)
RangeZLabel.TextSize = 12
RangeZLabel.TextXAlignment = Enum.TextXAlignment.Center
local RangeZInput = Instance.new("TextBox")
RangeZInput.Parent = MainFrame
RangeZInput.BackgroundColor3 = Color3.fromRGB(35, 45, 65)
RangeZInput.Position = UDim2.new(0, 210, 0, 127)
RangeZInput.Size = UDim2.new(0, 170, 0, 28)
RangeZInput.Font = Enum.Font.GothamMedium
RangeZInput.Text = tostring(config.rangeZ)
RangeZInput.TextColor3 = Color3.fromRGB(255, 255, 255)
RangeZInput.TextSize = 14
RangeZInput.ClearTextOnFocus = false
local UICornerRangeZ = Instance.new("UICorner")
UICornerRangeZ.Parent = RangeZInput
UICornerRangeZ.CornerRadius = UDim.new(0, 6)
-- ROW 2, COLUMN 1: Limb Speed Input
local SpeedLabel = Instance.new("TextLabel")
SpeedLabel.Parent = MainFrame
SpeedLabel.BackgroundTransparency = 1
SpeedLabel.Position = UDim2.new(0, 20, 0, 160)
SpeedLabel.Size = UDim2.new(0, 170, 0, 15)
SpeedLabel.Font = Enum.Font.GothamBold
SpeedLabel.Text = "Limb Speed"
SpeedLabel.TextColor3 = Color3.fromRGB(85, 200, 255)
SpeedLabel.TextSize = 12
SpeedLabel.TextXAlignment = Enum.TextXAlignment.Center
local SpeedInput = Instance.new("TextBox")
SpeedInput.Parent = MainFrame
SpeedInput.BackgroundColor3 = Color3.fromRGB(35, 45, 65)
SpeedInput.Position = UDim2.new(0, 20, 0, 177)
SpeedInput.Size = UDim2.new(0, 170, 0, 28)
SpeedInput.Font = Enum.Font.GothamMedium
SpeedInput.Text = tostring(config.limbSpeed)
SpeedInput.TextColor3 = Color3.fromRGB(255, 255, 255)
SpeedInput.TextSize = 14
SpeedInput.ClearTextOnFocus = false
local UICornerSpeed = Instance.new("UICorner")
UICornerSpeed.Parent = SpeedInput
UICornerSpeed.CornerRadius = UDim.new(0, 6)
-- ROW 2, COLUMN 2: Body Speed Input
local BodySpeedLabel = Instance.new("TextLabel")
BodySpeedLabel.Parent = MainFrame
BodySpeedLabel.BackgroundTransparency = 1
BodySpeedLabel.Position = UDim2.new(0, 210, 0, 160)
BodySpeedLabel.Size = UDim2.new(0, 170, 0, 15)
BodySpeedLabel.Font = Enum.Font.GothamBold
BodySpeedLabel.Text = "Body Speed"
BodySpeedLabel.TextColor3 = Color3.fromRGB(85, 200, 255)
BodySpeedLabel.TextSize = 12
BodySpeedLabel.TextXAlignment = Enum.TextXAlignment.Center
local BodySpeedInput = Instance.new("TextBox")
BodySpeedInput.Parent = MainFrame
BodySpeedInput.BackgroundColor3 = Color3.fromRGB(35, 45, 65)
BodySpeedInput.Position = UDim2.new(0, 210, 0, 177)
BodySpeedInput.Size = UDim2.new(0, 170, 0, 28)
BodySpeedInput.Font = Enum.Font.GothamMedium
BodySpeedInput.Text = tostring(config.bodySpeed)
BodySpeedInput.TextColor3 = Color3.fromRGB(255, 255, 255)
BodySpeedInput.TextSize = 14
BodySpeedInput.ClearTextOnFocus = false
local UICornerBodySpeed = Instance.new("UICorner")
UICornerBodySpeed.Parent = BodySpeedInput
UICornerBodySpeed.CornerRadius = UDim.new(0, 6)
-- Sanitization & input capture connections
BaseZInput.FocusLost:Connect(function()
local val = tonumber(BaseZInput.Text)
if val then
config.baseZ = val
else
BaseZInput.Text = tostring(config.baseZ)
end
end)
RangeZInput.FocusLost:Connect(function()
local val = tonumber(RangeZInput.Text)
if val then
config.rangeZ = val
else
RangeZInput.Text = tostring(config.rangeZ)
end
end)
SpeedInput.FocusLost:Connect(function()
local val = tonumber(SpeedInput.Text)
if val then
config.limbSpeed = val
else
SpeedInput.Text = tostring(config.limbSpeed)
end
end)
BodySpeedInput.FocusLost:Connect(function()
local val = tonumber(BodySpeedInput.Text)
if val then
config.bodySpeed = val
else
BodySpeedInput.Text = tostring(config.bodySpeed)
end
end)
-- --- Stop Button (Aligned to the left panel) ---
local StopButton = Instance.new("TextButton")
StopButton.Parent = MainFrame
StopButton.BackgroundColor3 = Color3.fromRGB(255, 90, 90)
StopButton.Position = UDim2.new(0, 20, 0, 215)
StopButton.Size = UDim2.new(0, 360, 0, 45)
StopButton.Font = Enum.Font.GothamBold
StopButton.Text = "STOP LOOP"
StopButton.TextColor3 = Color3.fromRGB(255, 255, 255)
StopButton.TextSize = 18
StopButton.AutoButtonColor = false
local StopCorner = Instance.new("UICorner")
StopCorner.Parent = StopButton
StopCorner.CornerRadius = UDim.new(0, 10)
-- --- Sidebar Divider ---
local Divider = Instance.new("Frame")
Divider.Parent = MainFrame
Divider.BackgroundColor3 = Color3.fromRGB(35, 45, 65)
Divider.BorderSizePixel = 0
Divider.Position = UDim2.new(0, 395, 0, 60)
Divider.Size = UDim2.new(0, 2, 0, 200)
-- --- Player List & Text Search Sidebar Panel ---
-- Player Name Input (Search Box / Instant Interact)
local NameInput = Instance.new("TextBox")
NameInput.Parent = MainFrame
NameInput.BackgroundColor3 = Color3.fromRGB(35, 45, 65)
NameInput.Position = UDim2.new(0, 410, 0, 55)
NameInput.Size = UDim2.new(0, 170, 0, 30)
NameInput.Font = Enum.Font.GothamMedium
NameInput.PlaceholderText = "Type Player Name..."
NameInput.PlaceholderColor3 = Color3.fromRGB(120, 140, 160)
NameInput.Text = ""
NameInput.TextColor3 = Color3.fromRGB(255, 255, 255)
NameInput.TextSize = 13
NameInput.ClearTextOnFocus = false
local UICornerNameInput = Instance.new("UICorner")
UICornerNameInput.Parent = NameInput
UICornerNameInput.CornerRadius = UDim.new(0, 6)
-- Player List Scroll Container
local ScrollFrame = Instance.new("ScrollingFrame")
ScrollFrame.Parent = MainFrame
ScrollFrame.BackgroundTransparency = 1
ScrollFrame.BorderSizePixel = 0
ScrollFrame.Position = UDim2.new(0, 410, 0, 95)
ScrollFrame.Size = UDim2.new(0, 170, 0, 165)
ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
ScrollFrame.ScrollBarThickness = 4
ScrollFrame.ScrollBarImageColor3 = Color3.fromRGB(85, 200, 255)
local ListLayout = Instance.new("UIListLayout")
ListLayout.Parent = ScrollFrame
ListLayout.SortOrder = Enum.SortOrder.LayoutOrder
ListLayout.Padding = UDim.new(0, 5)
-- --- Sidebar logic functions ---
local function updatePlayerList()
-- Clear current listings
for _, child in pairs(ScrollFrame:GetChildren()) do
if child:IsA("TextButton") then
child:Destroy()
end
end
local filterText = string.lower(NameInput.Text)
local players = Players:GetPlayers()
local displayCount = 0
for _, otherPlayer in pairs(players) do
if otherPlayer ~= player then
local username = string.lower(otherPlayer.Name)
local displayname = string.lower(otherPlayer.DisplayName)
-- Only include player if name matches active text filter
if filterText == "" or string.find(username, filterText) or string.find(displayname, filterText) then
displayCount = displayCount + 1
local PlayerBtn = Instance.new("TextButton")
PlayerBtn.Parent = ScrollFrame
PlayerBtn.BackgroundColor3 = Color3.fromRGB(35, 45, 65)
PlayerBtn.Size = UDim2.new(1, -6, 0, 28) -- offset for scrollbar
PlayerBtn.Font = Enum.Font.GothamBold
PlayerBtn.Text = otherPlayer.DisplayName
PlayerBtn.TextColor3 = Color3.fromRGB(200, 220, 240)
PlayerBtn.TextSize = 11
PlayerBtn.AutoButtonColor = true
local BtnCorner = Instance.new("UICorner")
BtnCorner.Parent = PlayerBtn
BtnCorner.CornerRadius = UDim.new(0, 6)
PlayerBtn.MouseButton1Click:Connect(function()
startBalloonFloat(otherPlayer)
end)
end
end
end
ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, displayCount * 33)
end
-- Refresh the list dynamically
Players.PlayerAdded:Connect(updatePlayerList)
Players.PlayerRemoving:Connect(updatePlayerList)
NameInput:GetPropertyChangedSignal("Text"):Connect(updatePlayerList)
-- Start float connection setup helper
local function startBalloonFloat(target)
-- Defined down below, forward-declared logically
end
-- Instant "Type Player Name" connection on Enter
NameInput.FocusLost:Connect(function(enterPressed)
if enterPressed then
local targetName = string.lower(NameInput.Text)
if targetName ~= "" then
for _, otherPlayer in pairs(Players:GetPlayers()) do
if otherPlayer ~= player then
local username = string.lower(otherPlayer.Name)
local displayname = string.lower(otherPlayer.DisplayName)
if username == targetName or displayname == targetName or string.find(username, targetName) or string.find(displayname, targetName) then
startBalloonFloat(otherPlayer)
break
end
end
end
end
end
end)
-- --- GUI control mechanics ---
local isOpen = false
local guiUnlocked = false
-- Open Frame Animation
local function openGUI()
if isOpen or not guiUnlocked then return end
isOpen = true
updatePlayerList() -- Build initial list
MainFrame.Visible = true
MainFrame.Position = UDim2.new(0.5, -300, 1.5, 0)
TweenService:Create(MainFrame, TweenInfo.new(0.6, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
Position = UDim2.new(0.5, -300, 0.5, -137),
BackgroundTransparency = 0
}):Play()
for _, child in pairs(MainFrame:GetDescendants()) do
if child:IsA("GuiObject") then
if child:IsA("TextBox") or child:IsA("TextButton") then
child.BackgroundTransparency = 0
child.TextTransparency = 0
elseif child:IsA("TextLabel") then
child.BackgroundTransparency = 1
child.TextTransparency = 0
end
end
end
end
-- Close Frame Animation
local function closeGUI()
if not isOpen then return end
isOpen = false
TweenService:Create(MainFrame, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {
Position = UDim2.new(0.5, -300, 1.5, 0),
BackgroundTransparency = 1
}):Play()
for _, child in pairs(MainFrame:GetDescendants()) do
if child:IsA("GuiObject") then
local targets = {
BackgroundTransparency = 1
}
if child:IsA("TextLabel") or child:IsA("TextButton") or child:IsA("TextBox") then
targets.TextTransparency = 1
end
if child:IsA("ScrollingFrame") then
targets.BackgroundTransparency = 1
end
TweenService:Create(child, TweenInfo.new(0.4), targets):Play()
end
end
task.wait(0.5)
MainFrame.Visible = false
end
-- Keyboard Hotkey (Insert / Right Control) to Toggle Open/Close
UserInputService.InputBegan:Connect(function(input, processed)
if processed then return end
if input.KeyCode == Enum.KeyCode.Insert or input.KeyCode == Enum.KeyCode.RightControl then
if not guiUnlocked then return end
if isOpen then
closeGUI()
else
openGUI()
end
end
end)
-- Continue Button click
ContinueButton.MouseButton1Click:Connect(function()
ContinueButton.BackgroundColor3 = Color3.fromRGB(60, 150, 235)
task.wait(0.1)
ContinueButton.BackgroundColor3 = Color3.fromRGB(85, 170, 255)
IntroFrame:TweenPosition(UDim2.new(0.5, -200, -0.5, 0), "Out", "Back", 0.6, true)
task.wait(0.6)
IntroFrame.Visible = false
guiUnlocked = true
openGUI()
end)
-- Helper Functions
local function getJoint(parent, name)
return parent:FindFirstChild(name) or parent:FindFirstChild(name:gsub(" ", ""))
end
local function updateStatus(text, color)
StatusLabel.Text = "Status: " .. text
StatusLabel.TextColor3 = color or Color3.fromRGB(180, 200, 220)
end
-- Stop Float Loop & Restore Joints
local function stopLoop()
looping = false
targetPlayer = nil
local char = player.Character
if char then
local humanoid = char:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.PlatformStand = false
humanoid.HipHeight = _G.OriginalHipHeight or 0
end
end
-- Restore initial postures
if _G.OriginalJoints then
for joint, originalC0 in pairs(_G.OriginalJoints) do
if joint and joint.Parent then
joint.C0 = originalC0
end
end
end
-- Status only clears completely if we are not persisting a respawn float
if not isFloatActive then
updateStatus("Balloon float stopped. Click any player to start again!", Color3.fromRGB(180, 200, 220))
end
end
-- Clean disconnections for target tracking
local function disconnectTarget()
if targetConnection then
targetConnection:Disconnect()
targetConnection = nil
end
end
-- Completely stop and erase active follow states
local function endActiveFloat()
isFloatActive = false
activeTarget = nil
disconnectTarget()
stopLoop()
end
-- Connect target player's character updates to resume automatically if they die/respawn
local function connectTargetRespawn(target)
disconnectTarget()
targetConnection = target.CharacterAdded:Connect(function(char)
char:WaitForChild("Humanoid")
char:WaitForChild("HumanoidRootPart")
task.wait(0.3)
if isFloatActive and activeTarget == target then
startBalloonFloat(target)
end
end)
end
-- Start Balloon Floating (Strictly behind target, no forward clipping)
function startBalloonFloat(target)
if not guiUnlocked then return false end
if not target or target == player then return false end
-- Save state persistency values
isFloatActive = true
activeTarget = target
connectTargetRespawn(target)
if looping then
stopLoop()
task.wait(0.1)
end
targetPlayer = target
looping = true
updateStatus("Floating on " .. target.DisplayName .. " strictly behind them!", Color3.fromRGB(85, 255, 170))
local character = player.Character
if not character then return false end
local humanoid = character:FindFirstChildOfClass("Humanoid")
local myHRP = character:FindFirstChild("HumanoidRootPart")
if not humanoid or not myHRP then return false end
_G.OriginalHipHeight = humanoid.HipHeight
_G.OriginalJoints = {}
local isR15 = (humanoid.RigType == Enum.HumanoidRigType.R15)
local joints = {}
-- Track rig structures
if isR15 then
local upperTorso = character:WaitForChild("UpperTorso")
local head = character:WaitForChild("Head")
local rightUpper = character:WaitForChild("RightUpperArm")
local leftUpper = character:WaitForChild("LeftUpperArm")
local rightThigh = character:WaitForChild("RightUpperLeg")
local leftThigh = character:WaitForChild("LeftUpperLeg")
joints.Neck = getJoint(head, "Neck")
joints.RightShoulder = getJoint(rightUpper, "RightShoulder")
joints.LeftShoulder = getJoint(leftUpper, "LeftShoulder")
joints.RightHip = getJoint(rightThigh, "RightHip")
joints.LeftHip = getJoint(leftThigh, "LeftHip")
joints.Waist = getJoint(upperTorso, "Waist")
else
local torso = character:WaitForChild("Torso")
joints.Neck = getJoint(torso, "Neck")
joints.RightShoulder = getJoint(torso, "Right Shoulder")
joints.LeftShoulder = getJoint(torso, "Left Shoulder")
joints.RightHip = getJoint(torso, "Right Hip")
joints.LeftHip = getJoint(torso, "Left Hip")
end
-- Save joints
for name, joint in pairs(joints) do
if joint then
_G.OriginalJoints[joint] = joint.C0
end
end
humanoid.PlatformStand = true
task.spawn(function()
currentTime = 0
while looping and targetPlayer and targetPlayer.Character and player.Character do
local targetHRP = targetPlayer.Character:FindFirstChild("HumanoidRootPart")
myHRP = player.Character:FindFirstChild("HumanoidRootPart")
if targetHRP and myHRP then
-- Calculations read dynamic configurations instantly from input fields:
local baseZ = config.baseZ
local rangeZ = config.rangeZ
local offsetZ = baseZ + (rangeZ * math.sin(currentTime * config.bodySpeed))
myHRP.CFrame = targetHRP.CFrame * CFrame.new(0, 0, offsetZ)
myHRP.AssemblyLinearVelocity = Vector3.new(0, 0, 0)
end
-- Joint swaying animations (Floating limbs)
local slowSway = math.sin(currentTime * 1.5)
local fastSway = math.cos(currentTime * 3)
-- Custom sway cycles for realistic dangles (Forward/Backward pitch)
local forwardDip = math.rad(25) * (math.sin(currentTime * config.limbSpeed) + 1) * 0.5
local leftArmSway = math.sin(currentTime * config.limbSpeed) * math.rad(15)
local legSwayLeft = math.sin(currentTime * config.limbSpeed) * math.rad(15)
local legSwayRight = -math.sin(currentTime * config.limbSpeed) * math.rad(15)
-- Right Arm (Dips forward/downward and returns up to holding position)
if joints.RightShoulder then
local orig = _G.OriginalJoints[joints.RightShoulder]
if isR15 then
joints.RightShoulder.C0 = orig * CFrame.Angles(forwardDip, 0, math.rad(140))
else
joints.RightShoulder.C0 = orig * CFrame.Angles(0, 0, math.rad(130) - forwardDip)
end
end
-- Left Arm (Realistic forward/backward dangle)
if joints.LeftShoulder then
local orig = _G.OriginalJoints[joints.LeftShoulder]
if isR15 then
joints.LeftShoulder.C0 = orig * CFrame.Angles(leftArmSway, 0, math.rad(-15))
else
joints.LeftShoulder.C0 = orig * CFrame.Angles(0, 0, math.rad(-10) + leftArmSway)
end
end
-- Head
if joints.Neck then
local orig = _G.OriginalJoints[joints.Neck]
joints.Neck.C0 = orig * CFrame.Angles(math.rad(-10) + (fastSway * 0.02), math.rad(10) + (slowSway * 0.05), 0)
end
-- Legs (Realistic out-of-phase forward/backward dangle)
if joints.LeftHip then
local orig = _G.OriginalJoints[joints.LeftHip]
joints.LeftHip.C0 = orig * CFrame.Angles(math.rad(10) + legSwayLeft, 0, math.rad(-5))
end
if joints.RightHip then
local orig = _G.OriginalJoints[joints.RightHip]
joints.RightHip.C0 = orig * CFrame.Angles(math.rad(10) + legSwayRight, 0, math.rad(5))
end
-- Waist/Spine (R15)
if isR15 and joints.Waist then
local orig = _G.OriginalJoints[joints.Waist]
joints.Waist.C0 = orig * CFrame.Angles(math.rad(-5) + (slowSway * 0.03), 0, math.rad(5) + (slowSway * 0.02))
end
currentTime += RunService.Heartbeat:Wait()
end
stopLoop()
end)
return true
end
-- Automatically resume float on local respawn
player.CharacterAdded:Connect(function(char)
char:WaitForChild("Humanoid")
char:WaitForChild("HumanoidRootPart")
task.wait(0.3) -- Small buffer for joint instantiation setup
if isFloatActive and activeTarget and activeTarget.Parent then
startBalloonFloat(activeTarget)
end
end)
-- Button Connections
StopButton.MouseButton1Click:Connect(function()
if not guiUnlocked then return end
endActiveFloat()
end)
CloseButton.MouseButton1Click:Connect(function()
endActiveFloat()
closeGUI()
end)
-- Detect Mouse Clicks on Other Players (Triggers start immediately)
mouse.Button1Down:Connect(function()
if not guiUnlocked then return end
local target = mouse.Target
if target and target.Parent then
local clickedPlayer = Players:GetPlayerFromCharacter(target.Parent) or Players:GetPlayerFromCharacter(target.Parent.Parent)
if clickedPlayer and clickedPlayer ~= player then
startBalloonFloat(clickedPlayer)
end
end
end)
-- Reliable Dragging Script for PC
local function makeDraggable(frame, handle)
local dragStart = nil
local startPos = nil
handle.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragStart = input.Position
startPos = frame.Position
local connection
connection = UserInputService.InputChanged:Connect(function(changedInput)
if changedInput.UserInputType == Enum.UserInputType.MouseMovement then
local delta = changedInput.Position - dragStart
frame.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
end)
local releaseConnection
releaseConnection = UserInputService.InputEnded:Connect(function(endedInput)
if endedInput.UserInputType == Enum.UserInputType.MouseButton1 then
connection:Disconnect()
releaseConnection:Disconnect()
end
end)
end
end)
end
makeDraggable(MainFrame, TopBar)No comments yet for this script.



