local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") -- Создаем GUI local screenGui = Instance.new("ScreenGui") screenGui.Name = "SimpleMoneyMenu" local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 200, 0, 150) mainFrame.Position = UDim2.new(0, 10, 0, 10) -- В левом верхнем углу mainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) mainFrame.Parent = screenGui local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 30) title.Text = "Добавить деньги" title.BackgroundColor3 = Color3.fromRGB(30, 30, 30) title.TextColor3 = Color3.new(1, 1, 1) title.Parent = mainFrame -- Кнопка сворачивания local minimizeButton = Instance.new("TextButton") minimizeButton.Size = UDim2.new(0, 30, 0, 30) minimizeButton.Position = UDim2.new(1, -30, 0, 0) minimizeButton.Text = "_" minimizeButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100) minimizeButton.TextColor3 = Color3.new(1, 1, 1) minimizeButton.Parent = mainFrame local amountBox = Instance.new("TextBox") amountBox.Size = UDim2.new(0.8, 0, 0, 30) amountBox.Position = UDim2.new(0.1, 0, 0.3, 0) amountBox.Text = "1000" amountBox.BackgroundColor3 = Color3.fromRGB(70, 70, 70) amountBox.TextColor3 = Color3.new(1, 1, 1) amountBox.Parent = mainFrame local addButton = Instance.new("TextButton") addButton.Size = UDim2.new(0.8, 0, 0, 30) addButton.Position = UDim2.new(0.1, 0, 0.6, 0) addButton.Text = "Добавить" addButton.BackgroundColor3 = Color3.fromRGB(0, 100, 0) addButton.TextColor3 = Color3.new(1, 1, 1) addButton.Parent = mainFrame -- Кнопка разворачивания (изначально скрыта) local maximizeButton = Instance.new("TextButton") maximizeButton.Size = UDim2.new(0, 50, 0, 30) maximizeButton.Position = UDim2.new(0, 10, 0, 10) maximizeButton.Text = "Меню" maximizeButton.BackgroundColor3 = Color3.fromRGB(0, 100, 0) maximizeButton.TextColor3 = Color3.new(1, 1, 1) maximizeButton.Visible = false maximizeButton.Parent = screenGui screenGui.Parent = playerGui -- Функция добавления денег local function addMoney() local amount = tonumber(amountBox.Text) if amount and amount > 0 then local success, error = pcall(function() game:GetService("ReplicatedStorage").Remotes.Cash:FireServer(amount, "CashKey2") end) if success then print("Деньги добавлены: " .. amount) else print("Ошибка: " .. error) end else print("Введите правильную сумму!") end end -- Функция сворачивания меню local function minimizeMenu() mainFrame.Visible = false maximizeButton.Visible = true end -- Функция разворачивания меню local function maximizeMenu() mainFrame.Visible = true maximizeButton.Visible = false end -- Привязываем кнопки addButton.MouseButton1Click:Connect(addMoney) minimizeButton.MouseButton1Click:Connect(minimizeMenu) maximizeButton.MouseButton1Click:Connect(maximizeMenu) -- Можно добавить по Enter amountBox.FocusLost:Connect(function(enterPressed) if enterPressed then addMoney() end end)