JacobRoblox

Untitled

Jun 12th, 2020
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.25 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local TheGui = Instance.new("ScreenGui")
  7. local WholeThing = Instance.new("Frame")
  8. local Apple = Instance.new("TextButton")
  9. local Pie = Instance.new("TextButton")
  10. local Pizza = Instance.new("TextButton")
  11. local Topbar = Instance.new("Frame")
  12.  
  13. --Properties:
  14.  
  15. TheGui.Name = "TheGui"
  16. TheGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  17. TheGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  18.  
  19. WholeThing.Name = "WholeThing"
  20. WholeThing.Parent = TheGui
  21. WholeThing.BackgroundColor3 = Color3.fromRGB(170, 0, 127)
  22. WholeThing.Position = UDim2.new(0.138734743, 0, 0.286282301, 0)
  23. WholeThing.Size = UDim2.new(0, 589, 0, 179)
  24.  
  25. Apple.Name = "Apple"
  26. Apple.Parent = WholeThing
  27. Apple.BackgroundColor3 = Color3.fromRGB(85, 0, 127)
  28. Apple.Position = UDim2.new(0.490124196, 0, 0.280695707, 0)
  29. Apple.Size = UDim2.new(0, 200, 0, 50)
  30. Apple.Font = Enum.Font.SourceSans
  31. Apple.Text = "Give apple"
  32. Apple.TextColor3 = Color3.fromRGB(0, 0, 0)
  33. Apple.TextScaled = true
  34. Apple.TextSize = 14.000
  35. Apple.TextWrapped = true
  36.  
  37. Pie.Name = "Pie"
  38. Pie.Parent = WholeThing
  39. Pie.BackgroundColor3 = Color3.fromRGB(85, 0, 127)
  40. Pie.Position = UDim2.new(0.109284326, 0, 0.280695707, 0)
  41. Pie.Size = UDim2.new(0, 200, 0, 50)
  42. Pie.Font = Enum.Font.SourceSans
  43. Pie.Text = "Give pie"
  44. Pie.TextColor3 = Color3.fromRGB(0, 0, 0)
  45. Pie.TextScaled = true
  46. Pie.TextSize = 14.000
  47. Pie.TextWrapped = true
  48.  
  49. Pizza.Name = "Pizza"
  50. Pizza.Parent = WholeThing
  51. Pizza.BackgroundColor3 = Color3.fromRGB(85, 0, 127)
  52. Pizza.Position = UDim2.new(0.489429057, 0, 0.648255706, 0)
  53. Pizza.Size = UDim2.new(0, 200, 0, 50)
  54. Pizza.Font = Enum.Font.SourceSans
  55. Pizza.Text = "Give pizza"
  56. Pizza.TextColor3 = Color3.fromRGB(0, 0, 0)
  57. Pizza.TextScaled = true
  58. Pizza.TextSize = 14.000
  59. Pizza.TextWrapped = true
  60.  
  61. Topbar.Name = "Topbar"
  62. Topbar.Parent = TheGui
  63. Topbar.BackgroundColor3 = Color3.fromRGB(0, 85, 127)
  64. Topbar.Position = UDim2.new(0.138734743, 0, 0.204393759, 0)
  65. Topbar.Size = UDim2.new(0, 589, 0, 40)
  66.  
  67. -- Scripts:
  68.  
  69. local function ZAXT_fake_script() -- Apple.LocalScript
  70. local script = Instance.new('LocalScript', Apple)
  71.  
  72. script.Parent.MouseButton1Click:Connect(function()
  73. local args = {
  74. [1] = "Apple",
  75. }
  76.  
  77. game:GetService("ReplicatedStorage").RemoteEvents.GiveTool:FireServer(unpack(args))
  78. end)
  79. end
  80. coroutine.wrap(ZAXT_fake_script)()
  81. local function MFUJ_fake_script() -- Pie.LocalScript
  82. local script = Instance.new('LocalScript', Pie)
  83.  
  84. script.Parent.MouseButton1Click:Connect(function()
  85. local args = {
  86. [1] = "Pie",
  87. }
  88.  
  89. game:GetService("ReplicatedStorage").RemoteEvents.GiveTool:FireServer(unpack(args))
  90. end)
  91. end
  92. coroutine.wrap(MFUJ_fake_script)()
  93. local function VTSRSS_fake_script() -- Pizza.LocalScript
  94. local script = Instance.new('LocalScript', Pizza)
  95.  
  96. script.Parent.MouseButton1Click:Connect(function()
  97. local args = {
  98. [1] = "Pizza3",
  99. }
  100.  
  101. game:GetService("ReplicatedStorage").RemoteEvents.GiveTool:FireServer(unpack(args))
  102. end)
  103. end
  104. coroutine.wrap(VTSRSS_fake_script)()
  105. local function DCTIKV_fake_script() -- WholeThing.LocalScript
  106. local script = Instance.new('LocalScript', WholeThing)
  107.  
  108. local UserInputService = game:GetService("UserInputService")
  109.  
  110. local gui = script.Parent
  111.  
  112. local dragging
  113. local dragInput
  114. local dragStart
  115. local startPos
  116.  
  117. local function update(input)
  118. local delta = input.Position - dragStart
  119. gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  120. end
  121.  
  122. gui.InputBegan:Connect(function(input)
  123. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  124. dragging = true
  125. dragStart = input.Position
  126. startPos = gui.Position
  127.  
  128. input.Changed:Connect(function()
  129. if input.UserInputState == Enum.UserInputState.End then
  130. dragging = false
  131. end
  132. end)
  133. end
  134. end)
  135.  
  136. gui.InputChanged:Connect(function(input)
  137. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  138. dragInput = input
  139. end
  140. end)
  141.  
  142. UserInputService.InputChanged:Connect(function(input)
  143. if input == dragInput and dragging then
  144. update(input)
  145. end
  146. end)
  147. end
  148. coroutine.wrap(DCTIKV_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment