Pastefi mark
Frog Hub
/91dcfdd8
Paste view
NONE PUBLIC 30 views
91dcfdd8
2025-12-27 23:17:54
--[[
	Frog Universal Hub - Universal LocalScript GUI
	Улучшенная версия с исправлениями
]]

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")

local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local hrp = character:WaitForChild("HumanoidRootPart")

-- Rebind on respawn
player.CharacterAdded:Connect(function(char)
	character = char
	humanoid = char:WaitForChild("Humanoid")
	hrp = char:WaitForChild("HumanoidRootPart")
end)

-- GUI
local gui = Instance.new("ScreenGui")
gui.Name = "FrogUniversalHub"
gui.ResetOnSpawn = false
gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
gui.Parent = player:WaitForChild("PlayerGui")

local main = Instance.new("Frame")
main.Size = UDim2.new(0, 280, 0, 350)
main.Position = UDim2.new(0.5, -140, 0.5, -175)
main.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
main.BackgroundTransparency = 0.1
main.Active = true
main.Draggable = true
main.Parent = gui

local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 12)
corner.Parent = main

local topBar = Instance.new("Frame")
topBar.Size = UDim2.new(1, 0, 0, 40)
topBar.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
topBar.BorderSizePixel = 0
topBar.Parent = main

local topCorner = Instance.new("UICorner")
topCorner.CornerRadius = UDim.new(0, 12, 0, 0)
topCorner.Parent = topBar

local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, -20, 1, 0)
title.Position = UDim2.new(0, 10, 0, 0)
title.Text = "???? Frog Universal Hub"
title.TextColor3 = Color3.new(1, 1, 1)
title.BackgroundTransparency = 1
title.Font = Enum.Font.GothamBold
title.TextSize = 18
title.TextXAlignment = Enum.TextXAlignment.Left
title.Parent = topBar

local closeBtn = Instance.new("TextButton")
closeBtn.Size = UDim2.new(0, 30, 0, 30)
closeBtn.Position = UDim2.new(1, -35, 0.5, -15)
closeBtn.Text = "X"
closeBtn.BackgroundColor3 = Color3.fromRGB(220, 60, 60)
closeBtn.TextColor3 = Color3.new(1, 1, 1)
closeBtn.Font = Enum.Font.GothamBold
closeBtn.TextSize = 14
closeBtn.Parent = topBar

local closeCorner = Instance.new("UICorner")
closeCorner.CornerRadius = UDim.new(0, 8)
closeCorner.Parent = closeBtn

closeBtn.MouseButton1Click:Connect(function()
	gui:Destroy()
end)

local content = Instance.new("Frame")
content.Size = UDim2.new(1, -20, 1, -60)
content.Position = UDim2.new(0, 10, 0, 50)
content.BackgroundTransparency = 1
content.Parent = main

-- Helper functions
local function makeBox(y, text)
	local container = Instance.new("Frame")
	container.Size = UDim2.new(1, 0, 0, 40)
	container.Position = UDim2.new(0, 0, 0, y)
	container.BackgroundTransparency = 1
	container.Parent = content

	local lbl = Instance.new("TextLabel")
	lbl.Size = UDim2.new(0, 150, 1, 0)
	lbl.Text = text
	lbl.TextColor3 = Color3.new(1, 1, 1)
	lbl.BackgroundTransparency = 1
	lbl.Font = Enum.Font.Gotham
	lbl.TextSize = 14
	lbl.TextXAlignment = Enum.TextXAlignment.Left
	lbl.Parent = container

	local box = Instance.new("TextBox")
	box.Position = UDim2.new(1, -90, 0, 5)
	box.Size = UDim2.new(0, 80, 0, 30)
	box.PlaceholderText = "Number"
	box.Text = ""
	box.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
	box.BorderSizePixel = 0
	box.TextColor3 = Color3.new(1, 1, 1)
	box.Font = Enum.Font.Gotham
	box.TextSize = 13
	box.Parent = container

	local boxCorner = Instance.new("UICorner")
	boxCorner.CornerRadius = UDim.new(0, 6)
	boxCorner.Parent = box

	return box
end

local function makeToggle(y, text, initialState)
	local btn = Instance.new("TextButton")
	btn.Size = UDim2.new(1, 0, 0, 36)
	btn.Position = UDim2.new(0, 0, 0, y)
	btn.Text = text .. " : " .. (initialState and "ON" or "OFF")
	btn.BackgroundColor3 = initialState and Color3.fromRGB(60, 120, 60) or Color3.fromRGB(45, 45, 45)
	btn.BorderSizePixel = 0
	btn.TextColor3 = Color3.new(1, 1, 1)
	btn.Font = Enum.Font.Gotham
	btn.TextSize = 14
	btn.Parent = content

	local btnCorner = Instance.new("UICorner")
	btnCorner.CornerRadius = UDim.new(0, 8)
	btnCorner.Parent = btn

	return btn
end

-- WalkSpeed
local wsBox = makeBox(0, "WalkSpeed")
wsBox.Text = tostring(humanoid.WalkSpeed)
wsBox.FocusLost:Connect(function(enterPressed)
	local val = tonumber(wsBox.Text)
	if val and val > 0 and val <= 500 then
		humanoid.WalkSpeed = val
	else
		wsBox.Text = tostring(humanoid.WalkSpeed)
	end
end)

-- JumpPower
local jpBox = makeBox(45, "JumpPower")
jpBox.Text = tostring(humanoid.JumpPower)
jpBox.FocusLost:Connect(function(enterPressed)
	local val = tonumber(jpBox.Text)
	if val and val > 0 and val <= 500 then
		humanoid.JumpPower = val
	else
		jpBox.Text = tostring(humanoid.JumpPower)
	end
end)

-- Fly
local flying = false
local flyBtn = makeToggle(100, "Fly", false)

local flyBV, flyBG
flyBtn.MouseButton1Click:Connect(function()
	flying = not flying
	flyBtn.Text = "Fly : " .. (flying and "ON" or "OFF")
	flyBtn.BackgroundColor3 = flying and Color3.fromRGB(60, 120, 60) or Color3.fromRGB(45, 45, 45)

	if flying then
		-- Save original properties
		local originalGravity = workspace.Gravity
		workspace.Gravity = 0
		
		flyBV = Instance.new("BodyVelocity")
		flyBV.MaxForce = Vector3.new(1e9, 1e9, 1e9)
		flyBV.Velocity = Vector3.zero
		flyBV.Parent = hrp

		flyBG = Instance.new("BodyGyro")
		flyBG.MaxTorque = Vector3.new(1e9, 1e9, 1e9)
		flyBG.P = 10000
		flyBG.D = 1000
		flyBG.Parent = hrp

		local flyConnection
		flyConnection = RunService.Heartbeat:Connect(function()
			if not flying or not hrp then
				flyConnection:Disconnect()
				return
			end
			
			local cam = workspace.CurrentCamera
			local move = Vector3.zero
			
			if UserInputService:IsKeyDown(Enum.KeyCode.W) then 
				move = move + cam.CFrame.LookVector 
			end
			if UserInputService:IsKeyDown(Enum.KeyCode.S) then 
				move = move - cam.CFrame.LookVector 
			end
			if UserInputService:IsKeyDown(Enum.KeyCode.A) then 
				move = move - cam.CFrame.RightVector 
			end
			if UserInputService:IsKeyDown(Enum.KeyCode.D) then 
				move = move + cam.CFrame.RightVector 
			end
			if UserInputService:IsKeyDown(Enum.KeyCode.Space) then 
				move = move + Vector3.new(0, 1, 0) 
			end
			if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then 
				move = move - Vector3.new(0, 1, 0) 
			end
			
			if move.Magnitude > 0 then
				move = move.Unit * 60
			end
			
			if flyBV then
				flyBV.Velocity = move
			end
			if flyBG then
				flyBG.CFrame = cam.CFrame
			end
		end)
	else
		workspace.Gravity = 196.2 -- Default gravity
		if flyBV then 
			flyBV:Destroy() 
			flyBV = nil
		end
		if flyBG then 
			flyBG:Destroy() 
			flyBG = nil
		end
	end
end)

-- Noclip
local noclip = false
local noclipBtn = makeToggle(145, "Noclip", false)

noclipBtn.MouseButton1Click:Connect(function()
	noclip = not noclip
	noclipBtn.Text = "Noclip : " .. (noclip and "ON" or "OFF")
	noclipBtn.BackgroundColor3 = noclip and Color3.fromRGB(60, 120, 60) or Color3.fromRGB(45, 45, 45)
end)

local noclipConnection
noclipConnection = RunService.Stepped:Connect(function()
	if noclip and character then
		for _, v in pairs(character:GetDescendants()) do
			if v:IsA("BasePart") then
				v.CanCollide = false
			end
		end
	end
end)

-- Clean up connections when GUI is destroyed
gui.Destroying:Connect(function()
	if noclipConnection then
		noclipConnection:Disconnect()
	end
	if flying then
		if flyBV then flyBV:Destroy() end
		if flyBG then flyBG:Destroy() end
	end
end)

-- Info text
local hint = Instance.new("TextLabel")
hint.Size = UDim2.new(1, 0, 0, 40)
hint.Position = UDim2.new(0, 0, 1, -40)
hint.Text = "Drag GUI | Universal Client-Side"
hint.TextColor3 = Color3.fromRGB(180, 180, 180)
hint.BackgroundTransparency = 1
hint.Font = Enum.Font.Gotham
hint.TextSize = 12
hint.Parent = content

-- Minimize button (optional feature)
local minimizeBtn = Instance.new("TextButton")
minimizeBtn.Size = UDim2.new(0, 30, 0, 30)
minimizeBtn.Position = UDim2.new(1, -70, 0.5, -15)
minimizeBtn.Text = "_"
minimizeBtn.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
minimizeBtn.TextColor3 = Color3.new(1, 1, 1)
minimizeBtn.Font = Enum.Font.GothamBold
minimizeBtn.TextSize = 14
minimizeBtn.Parent = topBar

local minimizeCorner = Instance.new("UICorner")
minimizeCorner.CornerRadius = UDim.new(0, 8)
minimizeCorner.Parent = minimizeBtn

local minimized = false
minimizeBtn.MouseButton1Click:Connect(function()
	minimized = not minimized
	if minimized then
		TweenService:Create(main, TweenInfo.new(0.3), {Size = UDim2.new(0, 280, 0, 40)}):Play()
		content.Visible = false
		minimizeBtn.Text = "+"
	else
		TweenService:Create(main, TweenInfo.new(0.3), {Size = UDim2.new(0, 280, 0, 350)}):Play()
		content.Visible = true
		minimizeBtn.Text = "_"
	end
end)

print("???? Frog Universal Hub loaded successfully!")

Comments (0)

Log in to leave a comment.

No comments yet.