Yhh
-- P E E X H U B | VISUAL PET SANDBOX (FIXED)
-- Client Only | Inventory Visual | Drag Mobile + PC
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
local gui = Instance.new("ScreenGui", player.PlayerGui)
gui.Name = "PeexHubFixed"
gui.ResetOnSpawn = false
--------------------------------------------------
-- CLEAN OLD
--------------------------------------------------
for _,v in ipairs(player.PlayerGui:GetChildren()) do
if v ~= gui and v.Name == gui.Name then
v:Destroy()
end
end
--------------------------------------------------
-- 🦖 DINO SPLASH (SMALL & CUTE)
--------------------------------------------------
local splash = Instance.new("Frame",gui)
splash.Size = UDim2.fromOffset(220,120)
splash.Position = UDim2.fromScale(0.5,0.4)
splash.AnchorPoint = Vector2.new(0.5,0.5)
splash.BackgroundColor3 = Color3.fromRGB(20,25,35)
Instance.new("UICorner",splash).CornerRadius = UDim.new(0,16)
local dino = Instance.new("ImageLabel",splash)
dino.Image = "rbxassetid://7229442422"
dino.Size = UDim2.fromOffset(64,64)
dino.Position = UDim2.fromScale(0.5,-0.5)
dino.AnchorPoint = Vector2.new(0.5,0.5)
dino.BackgroundTransparency = 1
local txt = Instance.new("TextLabel",splash)
txt.Text = "PeexHub"
txt.Font = Enum.Font.GothamBlack
txt.TextSize = 18
txt.Position = UDim2.fromScale(0.5,0.75)
txt.AnchorPoint = Vector2.new(0.5,0.5)
txt.BackgroundTransparency = 1
TweenService:Create(dino,TweenInfo.new(0.8,Enum.EasingStyle.Bounce),{
Position = UDim2.fromScale(0.5,0.35)
}):Play()
task.wait(1.2)
splash:Destroy()
--------------------------------------------------
-- MAIN GUI (SMALLER)
--------------------------------------------------
local main = Instance.new("Frame",gui)
main.Size = UDim2.fromOffset(480,280)
main.Position = UDim2.fromScale(0.5,0.5)
main.AnchorPoint = Vector2.new(0.5,0.5)
main.BackgroundColor3 = Color3.fromRGB(18,22,30)
main.BorderSizePixel = 0
Instance.new("UICorner",main).CornerRadius = UDim.new(0,16)
--------------------------------------------------
-- HEADER + DRAG (PC + MOBILE FIX)
--------------------------------------------------
local header = Instance.new("Frame",main)
header.Size = UDim2.new(1,0,0,36)
header.BackgroundTransparency = 1
local title = Instance.new("TextLabel",header)
title.Text = "PeexHub"
title.Font = Enum.Font.GothamBlack
title.TextSize = 16
title.TextColor3 = Color3.fromRGB(220,230,255)
title.Size = UDim2.fromScale(1,1)
title.BackgroundTransparency = 1
do
local dragging = false
local dragStart, startPos
local function startDrag(input)
dragging = true
dragStart = input.Position
startPos = main.Position
end
local function updateDrag(input)
if dragging then
local delta = input.Position - dragStart
main.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
end
header.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
startDrag(input)
end
end)
UIS.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch then
updateDrag(input)
end
end)
UIS.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
end
--------------------------------------------------
-- INVENTORY VISUAL (LOCAL)
--------------------------------------------------
local inventory = {}
local equipped = {}
--------------------------------------------------
-- VISUAL PET MODEL
--------------------------------------------------
local function createPet(name,mutation)
local m = Instance.new("Model")
m.Name = name
local p = Instance.new("Part")
p.Size = Vector3.new(1.4,1.4,1.4)
p.Shape = Enum.PartType.Ball
p.Material = Enum.Material.Neon
p.CanCollide = false
p.Color =
mutation=="Rainbow" and Color3.fromHSV(math.random(),1,1)
or mutation=="Golden" and Color3.fromRGB(255,215,0)
or Color3.fromRGB(140,190,255)
p.Parent = m
local bill = Instance.new("BillboardGui",p)
bill.Size = UDim2.fromOffset(150,40)
bill.StudsOffset = Vector3.new(0,2.1,0)
bill.AlwaysOnTop = true
local t = Instance.new("TextLabel",bill)
t.Size = UDim2.fromScale(1,1)
t.BackgroundTransparency = 1
t.Text = mutation ~= "" and (name.." ["..mutation.."]") or name
t.Font = Enum.Font.GothamBold
t.TextSize = 13
t.TextColor3 = Color3.fromRGB(230,240,255)
m.PrimaryPart = p
m.Parent = workspace
return m
end
--------------------------------------------------
-- EQUIP ORBIT (FIXED)
--------------------------------------------------
RunService.RenderStepped:Connect(function()
local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
if not hrp then return end
for i,pet in ipairs(equipped) do
if pet.PrimaryPart then
local a = tick()*1.4 + i
pet:PivotTo(hrp.CFrame * CFrame.new(math.cos(a)*2.8,1.4,math.sin(a)*2.8))
end
end
end)
--------------------------------------------------
-- UI CONTROLS
--------------------------------------------------
local btn = Instance.new("TextButton",main)
btn.Text = "ADD VISUAL PET"
btn.Size = UDim2.fromOffset(180,36)
btn.Position = UDim2.fromScale(0.5,0.85)
btn.AnchorPoint = Vector2.new(0.5,0.5)
btn.BackgroundColor3 = Color3.fromRGB(90,120,255)
btn.TextColor3 = Color3.new(1,1,1)
Instance.new("UICorner",btn).CornerRadius = UDim.new(0,12)
btn.MouseButton1Click:Connect(function()
local pet = createPet("Frost Spirit","Rainbow")
table.insert(inventory,pet)
table.insert(equipped,pet)
end)
Views: 54
Created At: 2025-12-29 10:20:18
Copy the code below to embed this paste: