Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.2
- -- Instances:
- local TheGui = Instance.new("ScreenGui")
- local WholeThing = Instance.new("Frame")
- local Apple = Instance.new("TextButton")
- local Pie = Instance.new("TextButton")
- local Pizza = Instance.new("TextButton")
- local Topbar = Instance.new("Frame")
- --Properties:
- TheGui.Name = "TheGui"
- TheGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- TheGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- WholeThing.Name = "WholeThing"
- WholeThing.Parent = TheGui
- WholeThing.BackgroundColor3 = Color3.fromRGB(170, 0, 127)
- WholeThing.Position = UDim2.new(0.138734743, 0, 0.286282301, 0)
- WholeThing.Size = UDim2.new(0, 589, 0, 179)
- Apple.Name = "Apple"
- Apple.Parent = WholeThing
- Apple.BackgroundColor3 = Color3.fromRGB(85, 0, 127)
- Apple.Position = UDim2.new(0.490124196, 0, 0.280695707, 0)
- Apple.Size = UDim2.new(0, 200, 0, 50)
- Apple.Font = Enum.Font.SourceSans
- Apple.Text = "Give apple"
- Apple.TextColor3 = Color3.fromRGB(0, 0, 0)
- Apple.TextScaled = true
- Apple.TextSize = 14.000
- Apple.TextWrapped = true
- Pie.Name = "Pie"
- Pie.Parent = WholeThing
- Pie.BackgroundColor3 = Color3.fromRGB(85, 0, 127)
- Pie.Position = UDim2.new(0.109284326, 0, 0.280695707, 0)
- Pie.Size = UDim2.new(0, 200, 0, 50)
- Pie.Font = Enum.Font.SourceSans
- Pie.Text = "Give pie"
- Pie.TextColor3 = Color3.fromRGB(0, 0, 0)
- Pie.TextScaled = true
- Pie.TextSize = 14.000
- Pie.TextWrapped = true
- Pizza.Name = "Pizza"
- Pizza.Parent = WholeThing
- Pizza.BackgroundColor3 = Color3.fromRGB(85, 0, 127)
- Pizza.Position = UDim2.new(0.489429057, 0, 0.648255706, 0)
- Pizza.Size = UDim2.new(0, 200, 0, 50)
- Pizza.Font = Enum.Font.SourceSans
- Pizza.Text = "Give pizza"
- Pizza.TextColor3 = Color3.fromRGB(0, 0, 0)
- Pizza.TextScaled = true
- Pizza.TextSize = 14.000
- Pizza.TextWrapped = true
- Topbar.Name = "Topbar"
- Topbar.Parent = TheGui
- Topbar.BackgroundColor3 = Color3.fromRGB(0, 85, 127)
- Topbar.Position = UDim2.new(0.138734743, 0, 0.204393759, 0)
- Topbar.Size = UDim2.new(0, 589, 0, 40)
- -- Scripts:
- local function ZAXT_fake_script() -- Apple.LocalScript
- local script = Instance.new('LocalScript', Apple)
- script.Parent.MouseButton1Click:Connect(function()
- local args = {
- [1] = "Apple",
- }
- game:GetService("ReplicatedStorage").RemoteEvents.GiveTool:FireServer(unpack(args))
- end)
- end
- coroutine.wrap(ZAXT_fake_script)()
- local function MFUJ_fake_script() -- Pie.LocalScript
- local script = Instance.new('LocalScript', Pie)
- script.Parent.MouseButton1Click:Connect(function()
- local args = {
- [1] = "Pie",
- }
- game:GetService("ReplicatedStorage").RemoteEvents.GiveTool:FireServer(unpack(args))
- end)
- end
- coroutine.wrap(MFUJ_fake_script)()
- local function VTSRSS_fake_script() -- Pizza.LocalScript
- local script = Instance.new('LocalScript', Pizza)
- script.Parent.MouseButton1Click:Connect(function()
- local args = {
- [1] = "Pizza3",
- }
- game:GetService("ReplicatedStorage").RemoteEvents.GiveTool:FireServer(unpack(args))
- end)
- end
- coroutine.wrap(VTSRSS_fake_script)()
- local function DCTIKV_fake_script() -- WholeThing.LocalScript
- local script = Instance.new('LocalScript', WholeThing)
- local UserInputService = game:GetService("UserInputService")
- local gui = script.Parent
- local dragging
- local dragInput
- local dragStart
- local startPos
- local function update(input)
- local delta = input.Position - dragStart
- gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- gui.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = gui.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- gui.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
- end
- coroutine.wrap(DCTIKV_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment