RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Create a loot gui like dungeon quest"
-- LocalScript inside a ScreenGui local player = game.Players.LocalPlayer local lootGui = script.Parent local lootFrame = lootGui.LootFrame local closeButton = lootFrame.CloseButton local function showLoot() lootFrame.Visible = true end local function hideLoot() lootFrame.Visible = false end -- Connect the close button to hide the loot frame closeButton.MouseButton1Click:Connect(hideLoot) -- Show the loot frame when the player receives loot game.ReplicatedStorage.Events.LootReceived.OnClientEvent:Connect(function(loot) for i, item in ipairs(loot) do local lootLabel = Instance.new("TextLabel") lootLabel.Size = UDim2.new(0, 200, 0, 50) lootLabel.Position = UDim2.new(0.5, -100, 0, i * 50) lootLabel.Text = item.Name .. " - " .. item.Rarity lootLabel.Parent = lootFrame end showLoot() end)