Advertisement
ItzLorenzo

Lumber Tycoon 2 | Set Money Gui

Apr 23rd, 2021
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 KB | None | 0 0
  1. -- Lumber Tycoon 2 Set Money Gui
  2. -- Made By TSR_Lorenzo
  3. -- Script Version: 2.0
  4.  
  5. -- Instances:
  6.  
  7. local ly2 = Instance.new("ScreenGui")
  8. local main = Instance.new("ImageLabel")
  9. local setMoney = Instance.new("TextBox")
  10. local setMoneyBtn = Instance.new("TextButton")
  11.  
  12. --Properties:
  13.  
  14. ly2.Name = "ly2"
  15. ly2.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  16.  
  17. main.Name = "main"
  18. main.Parent = ly2
  19. main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  20. main.BackgroundTransparency = 1.000
  21. main.Position = UDim2.new(0.781212151, 0, 0.79618597, 0)
  22. main.Size = UDim2.new(0, 346, 0, 149)
  23. main.Image = "rbxassetid://3570695787"
  24. main.ImageColor3 = Color3.fromRGB(130, 70, 182)
  25. main.ScaleType = Enum.ScaleType.Slice
  26. main.SliceCenter = Rect.new(100, 100, 100, 100)
  27. main.SliceScale = 0.200
  28.  
  29. setMoney.Name = "setMoney"
  30. setMoney.Parent = main
  31. setMoney.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  32. setMoney.BackgroundTransparency = 1.000
  33. setMoney.Position = UDim2.new(0.179190755, 0, 0.107382543, 0)
  34. setMoney.Size = UDim2.new(0.64450866, 0, 0.389261752, 0)
  35. setMoney.Font = Enum.Font.Fondamento
  36. setMoney.PlaceholderColor3 = Color3.fromRGB(0, 0, 0)
  37. setMoney.PlaceholderText = "Amount"
  38. setMoney.Text = ""
  39. setMoney.TextColor3 = Color3.fromRGB(0, 0, 0)
  40. setMoney.TextScaled = true
  41. setMoney.TextSize = 14.000
  42. setMoney.TextWrapped = true
  43.  
  44. setMoneyBtn.Name = "setMoneyBtn"
  45. setMoneyBtn.Parent = main
  46. setMoneyBtn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  47. setMoneyBtn.BackgroundTransparency = 1.000
  48. setMoneyBtn.Position = UDim2.new(0.175999999, 0, 0.496436208, 0)
  49. setMoneyBtn.Size = UDim2.new(0.644999981, 0, 0.388999999, 0)
  50. setMoneyBtn.Font = Enum.Font.Fondamento
  51. setMoneyBtn.Text = "Set Money"
  52. setMoneyBtn.TextColor3 = Color3.fromRGB(0, 0, 0)
  53. setMoneyBtn.TextScaled = true
  54. setMoneyBtn.TextSize = 14.000
  55. setMoneyBtn.TextWrapped = true
  56.  
  57. -- Scripts:
  58.  
  59. local function FUKREE_fake_script() -- main.drag
  60. local script = Instance.new('LocalScript', main)
  61.  
  62. local UserInputService = game:GetService("UserInputService")
  63.  
  64. local gui = script.Parent
  65.  
  66. local dragging
  67. local dragInput
  68. local dragStart
  69. local startPos
  70.  
  71. local function update(input)
  72. local delta = input.Position - dragStart
  73. gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  74. end
  75.  
  76. gui.InputBegan:Connect(function(input)
  77. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  78. dragging = true
  79. dragStart = input.Position
  80. startPos = gui.Position
  81.  
  82. input.Changed:Connect(function()
  83. if input.UserInputState == Enum.UserInputState.End then
  84. dragging = false
  85. end
  86. end)
  87. end
  88. end)
  89.  
  90. gui.InputChanged:Connect(function(input)
  91. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  92. dragInput = input
  93. end
  94. end)
  95.  
  96. UserInputService.InputChanged:Connect(function(input)
  97. if input == dragInput and dragging then
  98. update(input)
  99. end
  100. end)
  101. end
  102. coroutine.wrap(FUKREE_fake_script)()
  103. local function MYDF_fake_script() -- setMoneyBtn.LocalScript
  104. local script = Instance.new('LocalScript', setMoneyBtn)
  105.  
  106. local player = game.Players.LocalPlayer
  107.  
  108. script.Parent.MouseButton1Click:Connect(function()
  109. player.leaderstats.Money = script.Parent.Parent.setMoney.Text
  110. end)
  111. end
  112. coroutine.wrap(MYDF_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement