Ok i think i can help! So first thing we want to do is make a folder for the pets you can get.
Next thing you want to do is make a folder for the decals. This is purely for looks but it will help!
Now you want to make a gui and name it like i did
What you want to do now is put the pets you have made inside of the folder. This will be my pet
Now what you want to do is put the pet in your folder.
Now what you want to do is make a string value with the same name as the pet.
Now upload your image and copy the url
Then set the string value to the image url like so.
Ok now we need to make sure the client cant rig what pet they are going to get so we are going to make a remote event!
Now you want to insert a script into serverscriptservice called PetServer
Now we will script the serverside of the pets.
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local PetClient = ReplicatedStorage:WaitForChild(“PetClient”)
local Items = {“EpicPet”, “EpicPet2”}
PetClient.OnServerEvent:Connect(function(Player)
local PetRandom = math.random(1, #Items)
for i, v in pairs(Items) do
if i == PetRandom then
PetClient:FireClient(Player, v, game.ServerStorage.Decals:FindFirstChild(v).Value)
end
end
end)
Now just make a local script inside of the gui.
Now here is the code for the gui:
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local PetClient = ReplicatedStorage:WaitForChild(“PetClient”)
PetClient:FireServer()
PetClient.OnClientEvent:Connect(function(PetName, DecalId)
script.Parent.ImageLabel.Image = DecalId
end)
script.Parent.ClaimButton.MouseButton1Click:Connect(function()
script.Parent.Parent.Enabled = false
end)
if you are having trouble i made an open source for you to toy around with: Untitled Game - Roblox