Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.2
- -- Instances:
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local TextButton = Instance.new("TextButton")
- local TextLabel = Instance.new("TextLabel")
- --Properties:
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Frame.Position = UDim2.new(0.343030304, 0, 0.340220392, 0)
- Frame.Size = UDim2.new(0, 406, 0, 195)
- TextButton.Parent = Frame
- TextButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- TextButton.Position = UDim2.new(0.252503991, 0, 0.457702816, 0)
- TextButton.Size = UDim2.new(0, 200, 0, 50)
- TextButton.Font = Enum.Font.PatrickHand
- TextButton.Text = "Useless button"
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextScaled = true
- TextButton.TextSize = 14.000
- TextButton.TextWrapped = true
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.Size = UDim2.new(0, 406, 0, 50)
- TextLabel.Font = Enum.Font.PatrickHand
- TextLabel.Text = "The Useless GUI"
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- -- Scripts:
- local function QINCQHY_fake_script() -- TextButton.LocalScript
- local script = Instance.new('LocalScript', TextButton)
- script.Parent.MouseButton1Click:Connect(function()
- game.Players.LocalPlayer:Kick("Useless GUI has Kicked you for being Useless (Joke)")
- end)
- end
- coroutine.wrap(QINCQHY_fake_script)()
- local function GONWGND_fake_script() -- Frame.LocalScript
- local script = Instance.new('LocalScript', Frame)
- local UIS = game:GetService("UserInputService")
- function dragify(Frame)
- dragToggle = nil
- local dragSpeed = 0
- dragInput = nil
- dragStart = nil
- local dragPos = nil
- function updateInput(input)
- local Delta = input.Position - dragStart
- local Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
- game:GetService("TweenService"):Create(Frame, TweenInfo.new(0.25), {Position = Position}):Play()
- end
- Frame.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and UIS:GetFocusedTextBox() == nil then
- dragToggle = true
- dragStart = input.Position
- startPos = Frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- Frame.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- game:GetService("UserInputService").InputChanged:Connect(function(input)
- if input == dragInput and dragToggle then
- updateInput(input)
- end
- end)
- end
- dragify(script.Parent)
- end
- coroutine.wrap(GONWGND_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement