Yhh
--// MODERN VISUAL PET INVENTORY (CLIENT ONLY)
--// NO SERVER | NO REMOTE | SAFE
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local gui = Instance.new("ScreenGui", player.PlayerGui)
gui.Name = "VisualPetSandbox"
gui.ResetOnSpawn = false
-- cleanup
for _,v in ipairs(player.PlayerGui:GetChildren()) do
if v ~= gui and v.Name == gui.Name then
v:Destroy()
end
end
--------------------------------------------------
-- UTIL
--------------------------------------------------
local function corner(o,r)
Instance.new("UICorner",o).CornerRadius = UDim.new(0,r)
end
local function tween(o,t,p)
TweenService:Create(o,TweenInfo.new(t,Enum.EasingStyle.Quint),p):Play()
end
--------------------------------------------------
-- MAIN WINDOW
--------------------------------------------------
local main = Instance.new("Frame",gui)
main.Size = UDim2.fromOffset(600,330)
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
corner(main,18)
-- RGB BORDER
local stroke = Instance.new("UIStroke",main)
stroke.Thickness = 2
stroke.Transparency = 0.2
task.spawn(function()
local h = 0
while gui.Parent do
h = (h + 0.5) % 360
stroke.Color = Color3.fromHSV(h/360,1,1)
task.wait(0.03)
end
end)
--------------------------------------------------
-- HEADER + DRAG (SMOOTH & REAL)
--------------------------------------------------
local header = Instance.new("Frame",main)
header.Size = UDim2.new(1,0,0,45)
header.BackgroundTransparency = 1
local title = Instance.new("TextLabel",header)
title.Text = "Visual Pet Sandbox"
title.Font = Enum.Font.GothamBold
title.TextSize = 17
title.TextColor3 = Color3.fromRGB(230,240,255)
title.Size = UDim2.fromScale(1,1)
title.BackgroundTransparency = 1
do
local dragging = false
local dragStart, startPos
header.InputBegan:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = i.Position
startPos = main.Position
end
end)
UIS.InputChanged:Connect(function(i)
if dragging and i.UserInputType == Enum.UserInputType.MouseMovement then
local delta = i.Position - dragStart
main.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
end)
UIS.InputEnded:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = false
end
end)
end
--------------------------------------------------
-- DATA
--------------------------------------------------
local PETS = {
"Frost Spirit",
"Gilded Seraphin",
"Christmas Tree"
}
local inventory = {}
local equipped = {}
--------------------------------------------------
-- VISUAL PET MODEL
--------------------------------------------------
local function createPetModel(name, mutation)
local m = Instance.new("Model")
m.Name = name
local p = Instance.new("Part")
p.Size = Vector3.new(1.6,1.6,1.6)
p.Shape = Enum.PartType.Ball
p.Material = Enum.Material.Neon
p.CanCollide = false
p.Anchored = false
p.Color =
mutation=="Rainbow" and Color3.fromHSV(math.random(),1,1)
or mutation=="Golden" and Color3.fromRGB(255,215,0)
or Color3.fromRGB(150,200,255)
p.Parent = m
local bill = Instance.new("BillboardGui",p)
bill.Size = UDim2.fromOffset(160,45)
bill.StudsOffset = Vector3.new(0,2.3,0)
bill.AlwaysOnTop = true
local txt = Instance.new("TextLabel",bill)
txt.BackgroundTransparency = 1
txt.Size = UDim2.fromScale(1,1)
txt.Text = mutation and mutation~="" and (name.." ["..mutation.."]") or name
txt.Font = Enum.Font.GothamBold
txt.TextSize = 13
txt.TextColor3 = Color3.fromRGB(235,245,255)
m.PrimaryPart = p
m.Parent = workspace
return m
end
--------------------------------------------------
-- EQUIP VISUAL (ORBIT)
--------------------------------------------------
RunService.RenderStepped:Connect(function()
local char = player.Character
if not char or not char:FindFirstChild("HumanoidRootPart") then return end
for i,pet in ipairs(equipped) do
if pet.PrimaryPart then
local angle = tick()*1.5 + (i*math.pi*2/#equipped)
local offset = CFrame.new(math.cos(angle)*3,1.5,math.sin(angle)*3)
pet:PivotTo(char.HumanoidRootPart.CFrame * offset)
end
end
end)
--------------------------------------------------
-- UI CONTENT
--------------------------------------------------
local content = Instance.new("Frame",main)
content.Position = UDim2.fromOffset(15,55)
content.Size = UDim2.new(1,-30,1,-70)
content.BackgroundTransparency = 1
local layout = Instance.new("UIListLayout",content)
layout.Padding = UDim.new(0,10)
for _,pet in ipairs(PETS) do
local card = Instance.new("Frame",content)
card.Size = UDim2.new(1,0,0,70)
card.BackgroundColor3 = Color3.fromRGB(28,33,45)
corner(card,14)
local name = Instance.new("TextLabel",card)
name.Text = pet
name.Font = Enum.Font.GothamBold
name.TextSize = 15
name.TextColor3 = Color3.fromRGB(210,225,255)
name.Position = UDim2.fromOffset(12,6)
name.Size = UDim2.new(1,-24,0,20)
name.BackgroundTransparency = 1
local amountLabel = Instance.new("TextLabel",card)
amountLabel.Text = "Jumlah"
amountLabel.Font = Enum.Font.Gotham
amountLabel.TextSize = 11
amountLabel.TextColor3 = Color3.fromRGB(160,170,190)
amountLabel.Position = UDim2.fromOffset(12,30)
amountLabel.BackgroundTransparency = 1
amountLabel.Size = UDim2.fromOffset(60,15)
local amount = Instance.new("TextBox",card)
amount.Size = UDim2.fromOffset(60,26)
amount.Position = UDim2.fromOffset(12,44)
amount.BackgroundColor3 = Color3.fromRGB(40,45,60)
amount.TextColor3 = Color3.new(1,1,1)
amount.Text = "1"
corner(amount,8)
local mutLabel = Instance.new("TextLabel",card)
mutLabel.Text = "Mutasi (opsional)"
mutLabel.Font = Enum.Font.Gotham
mutLabel.TextSize = 11
mutLabel.TextColor3 = Color3.fromRGB(160,170,190)
mutLabel.Position = UDim2.fromOffset(85,30)
mutLabel.BackgroundTransparency = 1
mutLabel.Size = UDim2.fromOffset(120,15)
local mutation = Instance.new("TextBox",card)
mutation.Size = UDim2.fromOffset(140,26)
mutation.Position = UDim2.fromOffset(85,44)
mutation.BackgroundColor3 = Color3.fromRGB(40,45,60)
mutation.TextColor3 = Color3.new(1,1,1)
mutation.PlaceholderText = "Rainbow / Golden"
corner(mutation,8)
local add = Instance.new("TextButton",card)
add.Text = "ADD"
add.Size = UDim2.fromOffset(70,26)
add.Position = UDim2.fromOffset(240,44)
add.BackgroundColor3 = Color3.fromRGB(90,120,255)
add.TextColor3 = Color3.new(1,1,1)
corner(add,10)
add.MouseButton1Click:Connect(function()
local n = tonumber(amount.Text) or 1
local mut = mutation.Text ~= "" and mutation.Text or nil
for i=1,math.clamp(n,1,10) do
local petModel = createPetModel(pet,mut)
table.insert(inventory,petModel)
table.insert(equipped,petModel)
end
end)
end
Views: 54
Created At: 2025-12-29 10:02:41
Copy the code below to embed this paste: