Advertisement
Sufferrrrrr

Untitled

Oct 12th, 2024
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.22 KB | None | 0 0
  1.  
  2.  
  3. -- Define currency
  4. local currencyName = "Yen"
  5.  
  6. -- Create Screen GUI
  7. local screenGui = Instance.new("ScreenGui")
  8. screenGui.Name = "MoneyGui"
  9. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  10.  
  11. -- Create Frame
  12. local mainFrame = Instance.new("Frame")
  13. mainFrame.Size = UDim2.new(0, 300, 0, 250)
  14. mainFrame.Position = UDim2.new(0, 100, 0, 100)
  15. mainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) -- Dark gray background
  16. mainFrame.Parent = screenGui
  17.  
  18. -- Create TextBox
  19. local textBox = Instance.new("TextBox")
  20. textBox.Size = UDim2.new(0, 200, 0, 40)
  21. textBox.Position = UDim2.new(0.5, -100, 0.3, 0)
  22. textBox.PlaceholderText = "Enter Amount"
  23. textBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255) -- White background
  24. textBox.TextColor3 = Color3.fromRGB(0, 0, 0) -- Black text
  25. textBox.TextSize = 18
  26. textBox.Parent = mainFrame
  27.  
  28. -- Create Button
  29. local button = Instance.new("TextButton")
  30. button.Size = UDim2.new(0, 200, 0, 50)
  31. button.Position = UDim2.new(0.5, -100, 0.65, 0)
  32. button.Text = "Give Yen"
  33. button.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green (active)
  34. button.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  35. button.TextSize = 18
  36. button.Parent = mainFrame
  37.  
  38. -- Hover effect for the button
  39. button.MouseEnter:Connect(function()
  40.     button.BackgroundColor3 = Color3.fromRGB(255, 165, 0) -- Orange (hover)
  41. end)
  42.  
  43. button.MouseLeave:Connect(function()
  44.     button.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green (normal)
  45. end)
  46.  
  47. -- Create the close button
  48. local closeButton = Instance.new("TextButton")
  49. closeButton.Size = UDim2.new(0, 30, 0, 30) -- Smaller size for the close button
  50. closeButton.Position = UDim2.new(1, -40, 0, 10) -- Positioned at the top right corner of the frame
  51. closeButton.Text = "X"
  52. closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red (close)
  53. closeButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  54. closeButton.TextSize = 18
  55. closeButton.Parent = mainFrame
  56.  
  57. -- Close button hover effect
  58. closeButton.MouseEnter:Connect(function()
  59.     closeButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0) -- Darker red (hover)
  60. end)
  61.  
  62. closeButton.MouseLeave:Connect(function()
  63.     closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red (normal)
  64. end)
  65.  
  66. -- Close button click event to hide the frame
  67. closeButton.MouseButton1Click:Connect(function()
  68.     mainFrame.Visible = false
  69. end)
  70.  
  71. -- Create TextLabel
  72. local textLabel = Instance.new("TextLabel")
  73. textLabel.Size = UDim2.new(0, 200, 0, 30)
  74. textLabel.Position = UDim2.new(0.5, -100, 0.9, 0)
  75. textLabel.Text = "Subscribe to duchen scripts!"
  76. textLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  77. textLabel.BackgroundTransparency = 1 -- Transparent background
  78. textLabel.TextScaled = true
  79. textLabel.Parent = mainFrame
  80.  
  81. -- Button click event to give currency
  82. button.MouseButton1Click:Connect(function()
  83.     local currencyAmount = tonumber(textBox.Text) -- Convert input to number
  84.     if currencyAmount then
  85.         game:GetService("ReplicatedStorage").Remotes.UpdateData:FireServer(currencyName, currencyAmount)
  86.         print("Fired with amount: " .. currencyAmount)
  87.     else
  88.         warn("Invalid input! Please enter a valid number.")
  89.     end
  90. end)
  91.  
  92. print("Styled GUI loaded.")
  93.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement