
KeylessUniversal

-- OiHub Compacto 4.0 - Corrigido
local KEY = "OiHub_Key10"
local DiscordLink = "https://discord.gg/EYSvDJGc"
local P = game.Players.LocalPlayer
local C = P.Character or P.CharacterAdded:Wait()
local H = C:WaitForChild("Humanoid")
local HRP = C:WaitForChild("HumanoidRootPart")
local UIS = game:GetService("UserInputService")
local RS = game:GetService("RunService")
local SG = game:GetService("StarterGui")
-- Estados
local states = {fly=false, noclip=false, anti=false, invis=false}
local flySpeed, walkSpeed, jumpPower = 50, 16, 50
local flyMove = {W=false, A=false, S=false, D=false, Up=false, Down=false}
-- Atualiza humanoid e HRP ao respawn
P.CharacterAdded:Connect(function(char)
C = char
H = C:WaitForChild("Humanoid")
HRP = C:WaitForChild("HumanoidRootPart")
H.WalkSpeed = walkSpeed
H.JumpPower = jumpPower
end)
-- GUI
local gui = Instance.new("ScreenGui", P:WaitForChild("PlayerGui"))
gui.Name = "OiHub"
-- Key Frame
local keyF = Instance.new("Frame", gui)
keyF.Size = UDim2.new(0, 300, 0, 150)
keyF.Position = UDim2.new(0.5, -150, 0.5, -75)
keyF.BackgroundColor3 = Color3.fromRGB(30,30,30)
local keyBox = Instance.new("TextBox", keyF)
keyBox.Size = UDim2.new(0.8,0,0,30)
keyBox.Position = UDim2.new(0.1,0,0.3,0)
keyBox.PlaceholderText = "Digite a Key"
local conf = Instance.new("TextButton", keyF)
conf.Size = UDim2.new(0.35,0,0,30)
conf.Position = UDim2.new(0.1,0,0.7,0)
conf.Text = "Confirmar"
-- Main GUI
local main = Instance.new("Frame", gui)
main.Size = UDim2.new(0, 400, 0, 350)
main.Position = UDim2.new(0.5, -200, 0.5, -175)
main.BackgroundColor3 = Color3.fromRGB(40,40,40)
main.Visible = false
local closeBtn = Instance.new("TextButton", main)
closeBtn.Size = UDim2.new(0,30,0,30)
closeBtn.Position = UDim2.new(1,-35,0,5)
closeBtn.Text = "X"
local layout = Instance.new("UIListLayout", main)
layout.Padding = UDim.new(0,5)
-- Funções utilitárias
local function notify(text)
SG:SetCore("SendNotification",{Title="OiHub",Text=text,Duration=3})
end
local function createToggle(name, callback)
local b = Instance.new("TextButton")
b.Size = UDim2.new(1,-20,0,40)
b.Text = name.." [OFF]"
local st = false
b.MouseButton1Click:Connect(function()
st = not st
b.Text = name.." ["..(st and "ON" or "OFF").."]"
callback(st)
end)
return b
end
local function createSlider(name, min, max, default, callback)
local f = Instance.new("Frame")
f.Size = UDim2.new(1,-20,0,50)
f.BackgroundColor3 = Color3.fromRGB(60,60,60)
local lbl = Instance.new("TextLabel", f)
lbl.Size = UDim2.new(1,0,0.4,0)
lbl.Text = name.." ["..default.."]"
local slider = Instance.new("TextButton", f)
slider.Size = UDim2.new(0.8,0,0.3,0)
slider.Position = UDim2.new(0.1,0,0.6,0)
slider.Text = "●"
local val = default
local dragging = false
slider.MouseButton1Down:Connect(function()
dragging = true
end)
UIS.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = false
end
end)
RS.RenderStepped:Connect(function()
if dragging then
local mouseX = UIS:GetMouseLocation().X
local p = math.clamp((mouseX - slider.AbsolutePosition.X)/slider.AbsoluteSize.X, 0, 1)
val = math.floor(min + (max - min) * p)
lbl.Text = name.." ["..val.."]"
callback(val)
end
end)
return f
end
-- Key
conf.MouseButton1Click:Connect(function()
if keyBox.Text == KEY then
keyF.Visible = false
main.Visible = true
notify("Bem-vindo ao OiHub!")
else
notify("Key inválida!")
end
end)
-- Close
closeBtn.MouseButton1Click:Connect(function()
main.Visible = false
keyF.Visible = true
end)
-- Toggles
createToggle("Fly", function(v) states.fly = v end).Parent = main
createToggle("Noclip", function(v) states.noclip = v end).Parent = main
createToggle("AntiHit", function(v) states.anti = v end).Parent = main
createToggle("Invisível", function(v) states.invis = v end).Parent = main
-- Sliders
createSlider("Velocidade", 16, 200, 16, function(v) walkSpeed = v; if H then H.WalkSpeed = v end end).Parent = main
createSlider("Pulo", 50, 300, 50, function(v) jumpPower = v; if H then H.JumpPower = v end end).Parent = main
createSlider("Fly Speed", 50, 300, 50, function(v) flySpeed = v end).Parent = main
-- Fly
local flyVel, flyGyro
local function startFly()
if not HRP then return end
if not flyVel then
flyVel = Instance.new("BodyVelocity", HRP)
flyVel.MaxForce = Vector3.new(1e5,1e5,1e5)
flyVel.Velocity = Vector3.new()
end
if not flyGyro then
flyGyro = Instance.new("BodyGyro", HRP)
flyGyro.MaxTorque = Vector3.new(1e5,1e5,1e5)
flyGyro.CFrame = HRP.CFrame
end
end
local function stopFly()
if flyVel then flyVel:Destroy(); flyVel = nil end
if flyGyro then flyGyro:Destroy(); flyGyro = nil end
end
-- Input
UIS.InputBegan:Connect(function(i,g)
if g then return end
if i.KeyCode==Enum.KeyCode.W then flyMove.W=true
elseif i.KeyCode==Enum.KeyCode.A then flyMove.A=true
elseif i.KeyCode==Enum.KeyCode.S then flyMove.S=true
elseif i.KeyCode==Enum.KeyCode.D then flyMove.D=true
elseif i.KeyCode==Enum.KeyCode.Space then flyMove.Up=true
elseif i.KeyCode==Enum.KeyCode.LeftControl then flyMove.Down=true
end
end)
UIS.InputEnded:Connect(function(i,g)
if g then return end
if i.KeyCode==Enum.KeyCode.W then flyMove.W=false
elseif i.KeyCode==Enum.KeyCode.A then flyMove.A=false
elseif i.KeyCode==Enum.KeyCode.S then flyMove.S=false
elseif i.KeyCode==Enum.KeyCode.D then flyMove.D=false
elseif i.KeyCode==Enum.KeyCode.Space then flyMove.Up=false
elseif i.KeyCode==Enum.KeyCode.LeftControl then flyMove.Down=false
end
end)
-- Loop principal
RS.RenderStepped:Connect(function()
-- Fly
if states.fly and HRP then
startFly()
local dir = Vector3.new()
local cam = workspace.CurrentCamera.CFrame
if flyMove.W then dir = dir + cam.LookVector end
if flyMove.S then dir = dir - cam.LookVector end
if flyMove.A then dir = dir - cam.RightVector end
if flyMove.D then dir = dir + cam.RightVector end
if flyMove.Up then dir = dir + Vector3.new(0,1,0) end
if flyMove.Down then dir = dir + Vector3.new(0,-1,0) end
flyVel.Velocity = (dir.Magnitude>0 and dir.Unit*flySpeed or Vector3.new())
flyGyro.CFrame = CFrame.new(HRP.Position, HRP.Position + cam.LookVector)
else
stopFly()
end
-- Noclip
if states.noclip and C then
for _,p in pairs(C:GetDescendants()) do
if p:IsA("BasePart") then p.CanCollide = false end
end
end
-- Invis
if states.invis and C then
for _,p in pairs(C:GetDescendants()) do
if p:IsA("BasePart") and p.Name~="HumanoidRootPart" then
p.Transparency = 1
end
end
end
-- AntiHit
if states.anti and C then
for _,p in pairs(C:GetDescendants()) do
if p:IsA("BasePart") and p.Name~="HumanoidRootPart" then
p.Size = Vector3.new(0.1,0.1,0.1)
end
end
end
end)
-- Godmode simples
H.HealthChanged:Connect(function()
if states.fly then H.Health = H.MaxHealth end
end)No comments yet for this script.



