Advertisement
ERROR_CODE

Frame

Jan 19th, 2024 (edited)
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.99 KB | None | 0 0
  1. if game:GetService("CoreGui"):FindFirstChild("ScreenGui") then
  2. game:GetService("CoreGui"):FindFirstChild("ScreenGui"):Destroy()
  3. end
  4. local ScreenGui = Instance.new("ScreenGui")
  5. local CoreFrame = Instance.new("ImageLabel")
  6. local CoreFrameUICorner = Instance.new("UICorner")
  7. local CloseButton = Instance.new("TextButton")
  8. local UserInputService = game:GetService("UserInputService")
  9. local Button1 = Instance.new("TextButton")
  10. local Button2 = Instance.new("TextButton")
  11. local Button3 = Instance.new("TextButton")
  12. local Button4 = Instance.new("TextButton")
  13. local UICorner_1 = Instance.new("UICorner")
  14. local UICorner_2 = Instance.new("UICorner")
  15. local UICorner_3 = Instance.new("UICorner")
  16. local UICorner_4 = Instance.new("UICorner")
  17. local LP = game.Players.LocalPlayer
  18.  
  19. ScreenGui.Name = "ScreenGui"
  20. ScreenGui.Parent = game.CoreGui
  21. game.CoreGui.ScreenGui.Enabled = true
  22.  
  23. CoreFrame.Name = "CoreFrame"
  24. CoreFrame.Parent = ScreenGui
  25. CoreFrame.Position = UDim2.new(0.1, 0, 0.1, 0)
  26. CoreFrame.Size = UDim2.new(0.55, 0, 0.9, 0)
  27. CoreFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  28. CoreFrame.Image = "rbxassetid://16035728503"
  29.  
  30. CoreFrameUICorner.Parent = CoreFrame
  31.  
  32. CloseButton.Name = "CloseButton"
  33. CloseButton.Position = UDim2.new(0.93, 0, 0.02, 0)
  34. CloseButton.Parent = CoreFrame
  35. CloseButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  36. CloseButton.LayoutOrder = 1
  37. CloseButton.Size = UDim2.new(0, 25, 0, 25)
  38. CloseButton.AutoButtonColor = false
  39. CloseButton.Font = Enum.Font.SourceSansBold
  40. CloseButton.Text = "X"
  41. CloseButton.BorderSizePixel = 0
  42. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  43. CloseButton.TextSize = 30
  44.  
  45. CloseButton.MouseButton1Click:Connect(function()
  46. ScreenGui:Destroy()
  47. end)
  48.  
  49. Button1.Name = "Button1"
  50. Button1.Position = UDim2.new(0.03, 0, 0.1, 0)
  51. Button1.Parent = CoreFrame
  52. Button1.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  53. Button1.LayoutOrder = 1
  54. Button1.BackgroundTransparency = 0.7
  55. Button1.Size = UDim2.new(0, 250, 0, 100)
  56. Button1.AutoButtonColor = false
  57. Button1.Font = Enum.Font.SourceSansBold
  58. Button1.Text = "Anti AFK"
  59. Button1.BorderSizePixel = 0
  60. Button1.TextColor3 = Color3.fromRGB(255, 255, 255)
  61. Button1.TextSize = 30
  62.  
  63. local Button1AntiAfk = Button1.MouseButton1Click:Connect(function()
  64. local function ClearConnections(exception)
  65.     for i,v in pairs(getconnections(LP.Idled)) do
  66.         if v ~= exception then
  67.             v:Disable()
  68.         end
  69.     end
  70. end
  71. ClearConnections()
  72. local Connect
  73. Connect = LP.Idled:Connect(function()
  74.     ClearConnections(Connect)
  75.  
  76. end)
  77. Button1.Text = "Anti AFK Enabled"
  78. Button1AntiAfk:Disconnect()
  79. end)
  80.  
  81. UICorner_1.Parent = Button1
  82.  
  83. Button2.Name = "Button2"
  84. Button2.Position = UDim2.new(0.25, 0, 0.1, 0)
  85. Button2.Parent = CoreFrame
  86. Button2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  87. Button2.LayoutOrder = 1
  88. Button2.BackgroundTransparency = 0.7
  89. Button2.Size = UDim2.new(0, 250, 0, 100)
  90. Button2.AutoButtonColor = false
  91. Button2.Font = Enum.Font.SourceSansBold
  92. Button2.Text = "Auto Farm"
  93. Button2.BorderSizePixel = 0
  94. Button2.TextColor3 = Color3.fromRGB(255, 255, 255)
  95. Button2.TextSize = 30
  96.  
  97. Button2.MouseButton1Click:Connect(function()
  98. Amount = 99999999
  99. game.ReplicatedStorage.Remotes.SetSettings:FireServer("Money",99999999)
  100. end)
  101.  
  102. UICorner_2.Parent = Button2
  103.  
  104. Button3.Name = "Button3"
  105. Button3.Position = UDim2.new(0.03, 0, 0.25, 0)
  106. Button3.Parent = CoreFrame
  107. Button3.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  108. Button3.LayoutOrder = 1
  109. Button3.BackgroundTransparency = 0.7
  110. Button3.Size = UDim2.new(0, 250, 0, 100)
  111. Button3.AutoButtonColor = false
  112. Button3.Font = Enum.Font.SourceSansBold
  113. Button3.Text = "Auto Farm (loop)"
  114. Button3.BorderSizePixel = 0
  115. Button3.TextColor3 = Color3.fromRGB(255, 255, 255)
  116. Button3.TextSize = 30
  117.  
  118. Button3.MouseButton1Click:Connect(function()
  119. while wait() do
  120. Amount = 99999999
  121. game.ReplicatedStorage.Remotes.SetSettings:FireServer("Money",99999999)
  122. end
  123. end)
  124.  
  125. UICorner_3.Parent = Button3
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145. local gui = CoreFrame
  146.  
  147. local dragging
  148. local dragInput
  149. local dragStart
  150. local startPos
  151.  
  152.  
  153. local function update(input)
  154.     local delta = input.Position - dragStart
  155.     gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  156. end
  157.  
  158. gui.InputBegan:Connect(function(input)
  159.     if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  160.         dragging = true
  161.         dragStart = input.Position
  162.         startPos = gui.Position
  163.  
  164.         input.Changed:Connect(function()
  165.             if input.UserInputState == Enum.UserInputState.End then
  166.                 dragging = false
  167.             end
  168.         end)
  169.     end
  170. end)
  171.  
  172. gui.InputChanged:Connect(function(input)
  173.     if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  174.         dragInput = input
  175.     end
  176. end)
  177.  
  178. UserInputService.InputChanged:Connect(function(input)
  179.     if input == dragInput and dragging then
  180.         update(input)
  181.     end
  182. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement