Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Define currency
- local currencyName = "Yen"
- -- Create Screen GUI
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "MoneyGui"
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- Create Frame
- local mainFrame = Instance.new("Frame")
- mainFrame.Size = UDim2.new(0, 300, 0, 250)
- mainFrame.Position = UDim2.new(0, 100, 0, 100)
- mainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) -- Dark gray background
- mainFrame.Parent = screenGui
- -- Create TextBox
- local textBox = Instance.new("TextBox")
- textBox.Size = UDim2.new(0, 200, 0, 40)
- textBox.Position = UDim2.new(0.5, -100, 0.3, 0)
- textBox.PlaceholderText = "Enter Amount"
- textBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255) -- White background
- textBox.TextColor3 = Color3.fromRGB(0, 0, 0) -- Black text
- textBox.TextSize = 18
- textBox.Parent = mainFrame
- -- Create Button
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 200, 0, 50)
- button.Position = UDim2.new(0.5, -100, 0.65, 0)
- button.Text = "Give Yen"
- button.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green (active)
- button.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
- button.TextSize = 18
- button.Parent = mainFrame
- -- Hover effect for the button
- button.MouseEnter:Connect(function()
- button.BackgroundColor3 = Color3.fromRGB(255, 165, 0) -- Orange (hover)
- end)
- button.MouseLeave:Connect(function()
- button.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green (normal)
- end)
- -- Create the close button
- local closeButton = Instance.new("TextButton")
- closeButton.Size = UDim2.new(0, 30, 0, 30) -- Smaller size for the close button
- closeButton.Position = UDim2.new(1, -40, 0, 10) -- Positioned at the top right corner of the frame
- closeButton.Text = "X"
- closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red (close)
- closeButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
- closeButton.TextSize = 18
- closeButton.Parent = mainFrame
- -- Close button hover effect
- closeButton.MouseEnter:Connect(function()
- closeButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0) -- Darker red (hover)
- end)
- closeButton.MouseLeave:Connect(function()
- closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red (normal)
- end)
- -- Close button click event to hide the frame
- closeButton.MouseButton1Click:Connect(function()
- mainFrame.Visible = false
- end)
- -- Create TextLabel
- local textLabel = Instance.new("TextLabel")
- textLabel.Size = UDim2.new(0, 200, 0, 30)
- textLabel.Position = UDim2.new(0.5, -100, 0.9, 0)
- textLabel.Text = "Subscribe to duchen scripts!"
- textLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
- textLabel.BackgroundTransparency = 1 -- Transparent background
- textLabel.TextScaled = true
- textLabel.Parent = mainFrame
- -- Button click event to give currency
- button.MouseButton1Click:Connect(function()
- local currencyAmount = tonumber(textBox.Text) -- Convert input to number
- if currencyAmount then
- game:GetService("ReplicatedStorage").Remotes.UpdateData:FireServer(currencyName, currencyAmount)
- print("Fired with amount: " .. currencyAmount)
- else
- warn("Invalid input! Please enter a valid number.")
- end
- end)
- print("Styled GUI loaded.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement