Bb
--// MODERN VISUAL PET GUI (CLIENT ONLY)
--// No RemoteEvent | No Server Touch
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local gui = Instance.new("ScreenGui")
gui.Name = "ModernVisualPetGUI"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
-- Cleanup
for _,v in ipairs(player.PlayerGui:GetChildren()) do
if v ~= gui and v.Name == gui.Name then
v:Destroy()
end
end
--------------------------------------------------
-- UI UTIL
--------------------------------------------------
local function corner(obj, r)
local c = Instance.new("UICorner")
c.CornerRadius = UDim.new(0, r)
c.Parent = obj
end
local function tween(o, t, p)
TweenService:Create(o, TweenInfo.new(t, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), p):Play()
end
--------------------------------------------------
-- MAIN WINDOW
--------------------------------------------------
local main = Instance.new("Frame", gui)
main.Size = UDim2.fromOffset(700, 375)
main.Position = UDim2.fromScale(0.5, -1)
main.AnchorPoint = Vector2.new(0.5, 0)
main.BackgroundColor3 = Color3.fromRGB(20, 24, 33)
main.BorderSizePixel = 0
corner(main, 18)
-- Shadow
local shadow = Instance.new("ImageLabel", main)
shadow.Image = "rbxassetid://1316045217"
shadow.ImageTransparency = 0.85
shadow.ScaleType = Enum.ScaleType.Slice
shadow.SliceCenter = Rect.new(10,10,118,118)
shadow.Size = UDim2.new(1,40,1,40)
shadow.Position = UDim2.fromOffset(-20,-20)
shadow.BackgroundTransparency = 1
shadow.ZIndex = 0
tween(main, 0.9, {Position = UDim2.fromScale(0.5,0.2)})
--------------------------------------------------
-- HEADER
--------------------------------------------------
local header = Instance.new("Frame", main)
header.Size = UDim2.new(1,0,0,55)
header.BackgroundTransparency = 1
local title = Instance.new("TextLabel", header)
title.Text = "Visual Pet Simulator"
title.Font = Enum.Font.GothamBold
title.TextSize = 18
title.TextColor3 = Color3.fromRGB(220,230,255)
title.Size = UDim2.fromScale(1,1)
title.BackgroundTransparency = 1
--------------------------------------------------
-- SMOOTH DRAG
--------------------------------------------------
do
local dragging, startPos, startMouse
header.InputBegan:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
startMouse = 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 - startMouse
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
--------------------------------------------------
-- CONTENT
--------------------------------------------------
local content = Instance.new("Frame", main)
content.Position = UDim2.fromOffset(20,70)
content.Size = UDim2.new(1,-40,1,-90)
content.BackgroundTransparency = 1
--------------------------------------------------
-- PET LIST
--------------------------------------------------
local pets = {
"Frost Spirit",
"Gilded Seraphin",
"Christmas Tree"
}
local spawned = {}
--------------------------------------------------
-- VISUAL PET ENTITY
--------------------------------------------------
local function createVisualPet(name, mutation)
local model = Instance.new("Model")
model.Name = name.."_VISUAL"
local root = Instance.new("Part")
root.Size = Vector3.new(1.8,1.8,1.8)
root.Shape = Enum.PartType.Ball
root.Material = Enum.Material.Neon
root.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)
root.Anchored = false
root.CanCollide = false
root.Parent = model
local bill = Instance.new("BillboardGui", root)
bill.Size = UDim2.fromOffset(200,60)
bill.StudsOffset = Vector3.new(0,2.5,0)
bill.AlwaysOnTop = true
local text = Instance.new("TextLabel", bill)
text.Size = UDim2.fromScale(1,1)
text.BackgroundTransparency = 1
text.Text = name.."\n["..mutation.."]"
text.Font = Enum.Font.GothamBold
text.TextSize = 14
text.TextColor3 = Color3.fromRGB(230,240,255)
model.PrimaryPart = root
model.Parent = workspace
return model
end
--------------------------------------------------
-- UI CARDS
--------------------------------------------------
local layout = Instance.new("UIListLayout", content)
layout.Padding = UDim.new(0,14)
for _,pet in ipairs(pets) do
local card = Instance.new("Frame", content)
card.Size = UDim2.new(1,0,0,90)
card.BackgroundColor3 = Color3.fromRGB(28,33,45)
corner(card, 14)
local label = Instance.new("TextLabel", card)
label.Text = pet
label.Font = Enum.Font.GothamBold
label.TextSize = 16
label.TextColor3 = Color3.fromRGB(200,220,255)
label.Position = UDim2.fromOffset(15,10)
label.Size = UDim2.new(1,-30,0,24)
label.BackgroundTransparency = 1
local amount = Instance.new("TextBox", card)
amount.PlaceholderText = "Jumlah Pet"
amount.Position = UDim2.fromOffset(15,45)
amount.Size = UDim2.fromOffset(120,32)
amount.BackgroundColor3 = Color3.fromRGB(40,45,60)
amount.TextColor3 = Color3.new(1,1,1)
corner(amount, 8)
local mutation = Instance.new("TextBox", card)
mutation.PlaceholderText = "Mutasi (Rainbow / Golden)"
mutation.Position = UDim2.fromOffset(150,45)
mutation.Size = UDim2.fromOffset(220,32)
mutation.BackgroundColor3 = Color3.fromRGB(40,45,60)
mutation.TextColor3 = Color3.new(1,1,1)
corner(mutation, 8)
local start = Instance.new("TextButton", card)
start.Text = "START"
start.Position = UDim2.fromOffset(390,45)
start.Size = UDim2.fromOffset(100,32)
start.BackgroundColor3 = Color3.fromRGB(90,120,255)
start.TextColor3 = Color3.new(1,1,1)
corner(start, 10)
start.MouseButton1Click:Connect(function()
local n = tonumber(amount.Text) or 1
local mut = mutation.Text ~= "" and mutation.Text or "Normal"
for i=1,math.clamp(n,1,25) do
local petModel = createVisualPet(pet, mut)
petModel:PivotTo(player.Character.HumanoidRootPart.CFrame * CFrame.new(math.random(-6,6),0,math.random(-6,6)))
table.insert(spawned, petModel)
end
end)
end
--------------------------------------------------
-- DELETE ALL
--------------------------------------------------
local del = Instance.new("TextButton", main)
del.Text = "DELETE ALL VISUAL PET"
del.Size = UDim2.fromOffset(260,36)
del.Position = UDim2.fromScale(0.5,1)
del.AnchorPoint = Vector2.new(0.5,1)
del.BackgroundColor3 = Color3.fromRGB(180,60,60)
del.TextColor3 = Color3.new(1,1,1)
corner(del, 12)
del.MouseButton1Click:Connect(function()
for _,v in ipairs(spawned) do
pcall(function() v:Destroy() end)
end
table.clear(spawned)
end)
Views: 63
Created At: 2025-12-29 09:57:59
Copy the code below to embed this paste: