Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local clonegui = Instance.new("ScreenGui")
- local main = Instance.new("Frame")
- local ammount = Instance.new("TextBox")
- local text = Instance.new("TextLabel")
- local go = Instance.new("TextButton")
- local settingsbut = Instance.new("TextButton")
- local settings_2 = Instance.new("Frame")
- local sizetxt = Instance.new("TextBox")
- local colortxt = Instance.new("TextBox")
- local label = Instance.new("TextLabel")
- local colorlab = Instance.new("TextLabel")
- local Sizelab = Instance.new("TextLabel")
- local onoff_1 = Instance.new("BoolValue")
- local onoff_2 = Instance.new("BoolValue")
- local onoff_3 = Instance.new("BoolValue")
- local onoff_4 = Instance.new("BoolValue")
- local Playerlab = Instance.new("TextLabel")
- local Playertxt = Instance.new("TextBox")
- local transtxt = Instance.new("TextBox")
- local Translab = Instance.new("TextLabel")
- local Colidetgl = Instance.new("TextButton")
- local colidelab = Instance.new("TextLabel")
- local Delaylab = Instance.new("TextLabel")
- local Delaytgl = Instance.new("TextButton")
- local Anchorlab = Instance.new("TextLabel")
- local Anchortgl = Instance.new("TextButton")
- local Delaytxt = Instance.new("TextBox")
- local Delay2lab = Instance.new("TextLabel")
- local offlab = Instance.new("TextLabel")
- local offtxt = Instance.new("TextBox")
- local Anchor2tgl = Instance.new("TextButton")
- local Anchortxt = Instance.new("TextBox")
- local Anchorlab3 = Instance.new("TextLabel")
- local Anchor2lab = Instance.new("TextLabel")
- --[[
- Properties:
- --]]
- Anchor2tgl.Name = "Anchor2tgl"
- Anchor2tgl.Parent = settings_2
- Anchor2tgl.BackgroundColor3 = Color3.fromRGB(126, 126, 126)
- Anchor2tgl.BorderSizePixel = 0
- Anchor2tgl.Position = UDim2.new(0.373584896, 0, 0.79296875, 0)
- Anchor2tgl.Size = UDim2.new(0, 118, 0, 22)
- Anchor2tgl.Font = Enum.Font.SourceSans
- Anchor2tgl.Text = "Toggle"
- Anchor2tgl.TextColor3 = Color3.fromRGB(0, 0, 0)
- Anchor2tgl.TextScaled = true
- Anchor2tgl.TextSize = 14.000
- Anchor2tgl.TextWrapped = true
- Anchortxt.Name = "Anchortxt"
- Anchortxt.Parent = settings_2
- Anchortxt.BackgroundColor3 = Color3.fromRGB(126, 126, 126)
- Anchortxt.BorderSizePixel = 0
- Anchortxt.Position = UDim2.new(0.0247336328, 0, 0.798042297, 0)
- Anchortxt.Size = UDim2.new(0, 115, 0, 24)
- Anchortxt.Font = Enum.Font.SourceSans
- Anchortxt.Text = "0.2"
- Anchortxt.TextColor3 = Color3.fromRGB(0, 0, 0)
- Anchortxt.TextScaled = true
- Anchortxt.TextSize = 14.000
- Anchortxt.TextWrapped = true
- Anchorlab3.Name = "Anchorlab3"
- Anchorlab3.Parent = settings_2
- Anchorlab3.BackgroundColor3 = Color3.fromRGB(126, 126, 126)
- Anchorlab3.BorderSizePixel = 0
- Anchorlab3.Position = UDim2.new(0.0441116057, 0, 0.916718006, 0)
- Anchorlab3.Size = UDim2.new(0, 93, 0, 13)
- Anchorlab3.Font = Enum.Font.SourceSans
- Anchorlab3.Text = "Anchor collide"
- Anchorlab3.TextColor3 = Color3.fromRGB(0, 0, 0)
- Anchorlab3.TextSize = 14.000
- Anchor2lab.Name = "Anchor2lab"
- Anchor2lab.Parent = settings_2
- Anchor2lab.BackgroundColor3 = Color3.fromRGB(126, 126, 126)
- Anchor2lab.BorderColor3 = Color3.fromRGB(27, 42, 53)
- Anchor2lab.BorderSizePixel = 0
- Anchor2lab.Position = UDim2.new(0.393869996, 0, 0.916773677, 0)
- Anchor2lab.Size = UDim2.new(0, 95, 0, 12)
- Anchor2lab.Font = Enum.Font.SourceSans
- Anchor2lab.Text = "Anchor collide on"
- Anchor2lab.TextColor3 = Color3.fromRGB(0, 0, 0)
- Anchor2lab.TextSize = 14.000
- offlab.Name = "offlab"
- offlab.Parent = settings_2
- offlab.BackgroundColor3 = Color3.fromRGB(126, 126, 126)
- offlab.BorderSizePixel = 0
- offlab.Position = UDim2.new(0.710339606, 0, 0.478028893, 0)
- offlab.Size = UDim2.new(0, 103, 0, 15)
- offlab.Font = Enum.Font.SourceSans
- offlab.Text = "Offset"
- offlab.TextColor3 = Color3.fromRGB(0, 0, 0)
- offlab.TextSize = 14.000
- offtxt.Name = "offtxt"
- offtxt.Parent = settings_2
- offtxt.BackgroundColor3 = Color3.fromRGB(126, 126, 126)
- offtxt.BorderSizePixel = 0
- offtxt.Position = UDim2.new(0.690771341, 0, 0.356636107, 0)
- offtxt.Size = UDim2.new(0, 126, 0, 26)
- offtxt.Font = Enum.Font.SourceSans
- offtxt.Text = "0,0,0"
- offtxt.TextColor3 = Color3.fromRGB(0, 0, 0)
- offtxt.TextScaled = true
- offtxt.TextSize = 14.000
- offtxt.TextWrapped = true
- clonegui.Name = "clone"
- clonegui.Parent = game:GetService("Players").LocalPlayer.PlayerGui
- clonegui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- main.Name = "main"
- main.Parent = clonegui
- main.BackgroundColor3 = Color3.new(0.258824, 0.258824, 0.258824)
- main.BorderSizePixel = 0
- main.Draggable = true
- main.Position = UDim2.new(0.0451713204, 0, 0.396721303, 0)
- main.Size = UDim2.new(0, 105, 0, 125)
- ammount.Name = "ammount"
- ammount.Parent = main
- ammount.BackgroundColor3 = Color3.new(0.490196, 0.490196, 0.490196)
- ammount.BorderSizePixel = 0
- ammount.Position = UDim2.new(0.161904767, 0, 0.206270248, 0)
- ammount.Size = UDim2.new(0, 72, 0, 20)
- ammount.Font = Enum.Font.SourceSans
- ammount.Text = "10"
- ammount.TextColor3 = Color3.new(0, 0, 0)
- ammount.TextSize = 14
- text.Name = "text"
- text.Parent = main
- text.BackgroundColor3 = Color3.new(1, 1, 1)
- text.BackgroundTransparency = 1
- text.BorderSizePixel = 0
- text.Position = UDim2.new(0.152380884, 0, 0.050090082, 0)
- text.Size = UDim2.new(0, 73, 0, 20)
- text.Font = Enum.Font.SourceSans
- text.Text = "ammount"
- text.TextColor3 = Color3.new(0, 0, 0)
- text.TextSize = 14
- go.Name = "go"
- go.Parent = main
- go.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- go.BorderSizePixel = 0
- go.Position = UDim2.new(0.161904767, 0, 0.429549515, 0)
- go.Size = UDim2.new(0, 72, 0, 27)
- go.Font = Enum.Font.SourceSans
- go.Text = "GO!"
- go.TextColor3 = Color3.new(0, 0, 0)
- go.TextScaled = true
- go.TextSize = 14
- go.TextWrapped = true
- settingsbut.Name = "settingsbut"
- settingsbut.Parent = main
- settingsbut.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- settingsbut.BorderSizePixel = 0
- settingsbut.Position = UDim2.new(0.161904767, 0, 0.70154953, 0)
- settingsbut.Size = UDim2.new(0, 72, 0, 27)
- settingsbut.Font = Enum.Font.SourceSans
- settingsbut.Text = "Settings"
- settingsbut.TextColor3 = Color3.new(0, 0, 0)
- settingsbut.TextScaled = true
- settingsbut.TextSize = 14
- settingsbut.TextWrapped = true
- settingsbut.MouseButton1Click:Connect(function()
- if settings_2.Visible == true then
- settings_2.Visible = false
- elseif settings_2.Visible == false then
- settings_2.Visible = true
- end
- end)
- settings_2.Name = "settings"
- settings_2.Parent = clonegui
- settings_2.BackgroundColor3 = Color3.new(0.258824, 0.258824, 0.258824)
- settings_2.BorderColor3 = Color3.new(1, 1, 1)
- settings_2.BorderSizePixel = 0
- settings_2.Position = UDim2.new(0.433800638, 0, 0.249180332, 0)
- settings_2.Size = UDim2.new(0, 530, 0, 256)
- settings_2.Visible = false
- sizetxt.Name = "sizetxt"
- sizetxt.Parent = settings_2
- sizetxt.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- sizetxt.BorderSizePixel = 0
- sizetxt.Position = UDim2.new(0.0171864927, 0, 0.348823607, 0)
- sizetxt.Size = UDim2.new(0, 126, 0, 26)
- sizetxt.Font = Enum.Font.SourceSans
- sizetxt.Text = "2,1,2"
- sizetxt.TextColor3 = Color3.new(0, 0, 0)
- sizetxt.TextScaled = true
- sizetxt.TextSize = 14
- sizetxt.TextWrapped = true
- colortxt.Name = "colortxt"
- colortxt.Parent = settings_2
- colortxt.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- colortxt.BorderSizePixel = 0
- colortxt.Position = UDim2.new(0.0189499594, 0, 0.0885646939, 0)
- colortxt.Size = UDim2.new(0, 126, 0, 26)
- colortxt.Font = Enum.Font.SourceSans
- colortxt.Text = "85,85,85"
- colortxt.TextColor3 = Color3.new(0, 0, 0)
- colortxt.TextScaled = true
- colortxt.TextSize = 14
- colortxt.TextWrapped = true
- label.Name = "label"
- label.Parent = settings_2
- label.BackgroundColor3 = Color3.new(1, 1, 1)
- label.BackgroundTransparency = 1
- label.Position = UDim2.new(0.366611928, 0, 0, 0)
- label.Size = UDim2.new(0, 141, 0, 23)
- label.Font = Enum.Font.SourceSans
- label.Text = "Settings"
- label.TextColor3 = Color3.new(0, 0, 0)
- label.TextSize = 25
- colorlab.Name = "colorlab"
- colorlab.Parent = settings_2
- colorlab.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- colorlab.BorderSizePixel = 0
- colorlab.Position = UDim2.new(0.0367547125, 0, 0.215885162, 0)
- colorlab.Size = UDim2.new(0, 103, 0, 15)
- colorlab.Font = Enum.Font.SourceSans
- colorlab.Text = "color"
- colorlab.TextColor3 = Color3.new(0, 0, 0)
- colorlab.TextSize = 14
- Sizelab.Name = "Sizelab"
- Sizelab.Parent = settings_2
- Sizelab.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Sizelab.BorderSizePixel = 0
- Sizelab.Position = UDim2.new(0.0367547125, 0, 0.470216393, 0)
- Sizelab.Size = UDim2.new(0, 103, 0, 15)
- Sizelab.Font = Enum.Font.SourceSans
- Sizelab.Text = "Size"
- Sizelab.TextColor3 = Color3.new(0, 0, 0)
- Sizelab.TextSize = 14
- Playerlab.Name = "Playerlab"
- Playerlab.Parent = settings_2
- Playerlab.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Playerlab.BorderSizePixel = 0
- Playerlab.Position = UDim2.new(0.0383407101, 0, 0.715437651, 0)
- Playerlab.Size = UDim2.new(0, 103, 0, 15)
- Playerlab.Font = Enum.Font.SourceSans
- Playerlab.Text = "Player"
- Playerlab.TextColor3 = Color3.new(0, 0, 0)
- Playerlab.TextSize = 14
- Playertxt.Name = "Playertxt"
- Playertxt.Parent = settings_2
- Playertxt.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Playertxt.BorderSizePixel = 0
- Playertxt.Position = UDim2.new(0.0171864927, 0, 0.591011107, 0)
- Playertxt.Size = UDim2.new(0, 126, 0, 26)
- Playertxt.Font = Enum.Font.SourceSans
- Playertxt.Text = "me"
- Playertxt.TextColor3 = Color3.new(0, 0, 0)
- Playertxt.TextScaled = true
- Playertxt.TextSize = 14
- Playertxt.TextWrapped = true
- transtxt.Name = "transtxt"
- transtxt.Parent = settings_2
- transtxt.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- transtxt.BorderSizePixel = 0
- transtxt.Position = UDim2.new(0.366119772, 0, 0.0885646939, 0)
- transtxt.Size = UDim2.new(0, 126, 0, 26)
- transtxt.Font = Enum.Font.SourceSans
- transtxt.Text = "0"
- transtxt.TextColor3 = Color3.new(0, 0, 0)
- transtxt.TextScaled = true
- transtxt.TextSize = 14
- transtxt.TextWrapped = true
- Translab.Name = "Translab"
- Translab.Parent = settings_2
- Translab.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Translab.BorderSizePixel = 0
- Translab.Position = UDim2.new(0.387698114, 0, 0.215885162, 0)
- Translab.Size = UDim2.new(0, 103, 0, 15)
- Translab.Font = Enum.Font.SourceSans
- Translab.Text = "Transparency"
- Translab.TextColor3 = Color3.new(0, 0, 0)
- Translab.TextSize = 14
- Colidetgl.Name = "Colidetgl"
- Colidetgl.Parent = settings_2
- Colidetgl.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Colidetgl.BorderSizePixel = 0
- Colidetgl.Position = UDim2.new(0.366037726, 0, 0.36328125, 0)
- Colidetgl.Size = UDim2.new(0, 126, 0, 26)
- Colidetgl.Font = Enum.Font.SourceSans
- Colidetgl.Text = "Toggle"
- Colidetgl.TextColor3 = Color3.new(0, 0, 0)
- Colidetgl.TextScaled = true
- Colidetgl.TextSize = 14
- Colidetgl.TextWrapped = true
- colidelab.Name = "colidelab"
- colidelab.Parent = settings_2
- colidelab.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- colidelab.BorderSizePixel = 0
- colidelab.Position = UDim2.new(0.387698114, 0, 0.501041412, 0)
- colidelab.Size = UDim2.new(0, 103, 0, 15)
- colidelab.Font = Enum.Font.SourceSans
- colidelab.Text = "Collide on"
- colidelab.TextColor3 = Color3.new(0, 0, 0)
- colidelab.TextSize = 14
- Delaylab.Name = "Delaylab"
- Delaylab.Parent = settings_2
- Delaylab.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Delaylab.BorderSizePixel = 0
- Delaylab.Position = UDim2.new(0.385811329, 0, 0.727603912, 0)
- Delaylab.Size = UDim2.new(0, 103, 0, 15)
- Delaylab.Font = Enum.Font.SourceSans
- Delaylab.Text = "Dellay off"
- Delaylab.TextColor3 = Color3.new(0, 0, 0)
- Delaylab.TextSize = 14
- Delaytgl.Name = "Delaytgl"
- Delaytgl.Parent = settings_2
- Delaytgl.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Delaytgl.BorderSizePixel = 0
- Delaytgl.Position = UDim2.new(0.364150941, 0, 0.58984375, 0)
- Delaytgl.Size = UDim2.new(0, 126, 0, 26)
- Delaytgl.Font = Enum.Font.SourceSans
- Delaytgl.Text = "Toggle"
- Delaytgl.TextColor3 = Color3.new(0, 0, 0)
- Delaytgl.TextScaled = true
- Delaytgl.TextSize = 14
- Delaytgl.TextWrapped = true
- Anchorlab.Name = "Anchorlab"
- Anchorlab.Parent = settings_2
- Anchorlab.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Anchorlab.BorderSizePixel = 0
- Anchorlab.Position = UDim2.new(0.714113235, 0, 0.727603912, 0)
- Anchorlab.Size = UDim2.new(0, 103, 0, 15)
- Anchorlab.Font = Enum.Font.SourceSans
- Anchorlab.Text = "Anchor off"
- Anchorlab.TextColor3 = Color3.new(0, 0, 0)
- Anchorlab.TextSize = 14
- Anchortgl.Name = "Anchortgl"
- Anchortgl.Parent = settings_2
- Anchortgl.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Anchortgl.BorderSizePixel = 0
- Anchortgl.Position = UDim2.new(0.692452788, 0, 0.58984375, 0)
- Anchortgl.Size = UDim2.new(0, 126, 0, 26)
- Anchortgl.Font = Enum.Font.SourceSans
- Anchortgl.Text = "Toggle"
- Anchortgl.TextColor3 = Color3.new(0, 0, 0)
- Anchortgl.TextScaled = true
- Anchortgl.TextSize = 14
- Anchortgl.TextWrapped = true
- Delaytxt.Name = "Delaytxt"
- Delaytxt.Parent = settings_2
- Delaytxt.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Delaytxt.BorderSizePixel = 0
- Delaytxt.Position = UDim2.new(0.691, 0,0.089, 0)
- Delaytxt.Size = UDim2.new(0, 126, 0, 26)
- Delaytxt.Font = Enum.Font.SourceSans
- Delaytxt.Text = "1"
- Delaytxt.TextColor3 = Color3.new(0, 0, 0)
- Delaytxt.TextScaled = true
- Delaytxt.TextSize = 14
- Delaytxt.TextWrapped = true
- Delay2lab.Name = "Delay2lab"
- Delay2lab.Parent = settings_2
- Delay2lab.BackgroundColor3 = Color3.new(0.494118, 0.494118, 0.494118)
- Delay2lab.BorderSizePixel = 0
- Delay2lab.Position = UDim2.new(0.712, 0,0.216, 0)
- Delay2lab.Size = UDim2.new(0, 103,0, 15)
- Delay2lab.Text = "Delay time"
- Delay2lab.TextColor3 = Color3.new(0, 0, 0)
- Delay2lab.TextScaled = true
- Delay2lab.TextSize = 14
- Delay2lab.TextWrapped = true
- onoff_1.Name = "on/off"
- onoff_1.Parent = Anchortgl
- onoff_1.Value = false
- onoff_2.Name = "on/off"
- onoff_2.Parent = Colidetgl
- onoff_2.Value = true
- onoff_3.Name = "on/off"
- onoff_3.Parent = Delaytgl
- onoff_3.Value = false
- onoff_4.Name = "on/off"
- onoff_4.Parent = Anchor2tgl
- onoff_4.Value = true
- --scripts
- local config = settings_2
- local char = game:GetService("Players").LocalPlayer.Character
- local hat = char:FindFirstChildOfClass("Accessory")
- local collide = true
- local Dellay = false
- local Anchor = false
- local Anchor2 = true
- Colidetgl.MouseButton1Click:Connect(function()
- if onoff_2.Value == true then
- colidelab.Text = "Collide off"
- collide = false
- onoff_2.Value = false
- elseif onoff_2.Value == false then
- colidelab.Text = "Collide on"
- collide = true
- onoff_2.Value = true
- end
- end)
- Delaytgl.MouseButton1Click:Connect(function()
- if onoff_3.Value == true then
- Delaylab.Text = "Dellay off"
- Dellay = false
- onoff_3.Value = false
- elseif onoff_3.Value == false then
- Delaylab.Text = "Dellay on"
- Dellay = true
- onoff_3.Value = true
- end
- end)
- config.Anchortgl.MouseButton1Click:Connect(function()
- if onoff_1.Value == true then
- Anchorlab.Text = "Anchor off"
- Anchor = false
- onoff_1.Value = false
- elseif onoff_1.Value == false then
- Anchorlab.Text = "Anchor on"
- Anchor = true
- onoff_1.Value = true
- end
- end)
- Anchor2tgl.MouseButton1Click:Connect(function()
- if onoff_4.Value == true then
- Anchor2lab.Text = "Anchor collide off"
- Anchor2 = false
- onoff_4.Value = false
- elseif onoff_4.Value == false then
- Anchor2lab.Text = "Anchor collide on"
- Anchor2 = true
- onoff_4.Value = true
- end
- end)
- go.MouseButton1Click:Connect(function()
- local Player = Playertxt
- local actPlayer = nil
- if Player.Text == "me" then
- actPlayer = char.Name
- else
- actPlayer = Player.Text
- end
- local rgb = string.split(colortxt.Text, ",")
- local red = tonumber(rgb[1])
- local green = tonumber(rgb[2])
- local blue = tonumber(rgb[3])
- local xyz = string.split(sizetxt.Text, ",")
- local X = tonumber(xyz[1])
- local Y = tonumber(xyz[2])
- local Z = tonumber(xyz[3])
- local offxyz= string.split(offtxt.Text, ",")
- local offX = tonumber(offxyz[1])
- local offY = tonumber(offxyz[2])
- local offZ = tonumber(offxyz[3])
- local cloning = 0
- for cloning = 1, ammount.Text do
- if Dellay == true then
- wait(Delaytxt.Text / 10)
- end
- local transparency = (config.transtxt.Text / 100)
- local color = Color3.new(red,green,blue)
- local size = Vector3.new(X,Y,Z)
- local Anchor3 = tonumber(Anchortxt.Text)
- local pos = game:GetService("Players")[actPlayer].Character.Head.CFrame - Vector3.new(offX,offY,offZ)
- pos = pos + game:GetService("Players")[actPlayer].Character.Head.CFrame.LookVector
- local info = {transparency , color, size, collide, Anchor, pos, Anchor2, Anchor3}
- game.ReplicatedStorage.SpawnBrick:FireServer(unpack(info))
- end
- end)
- local UserInputService = game:GetService("UserInputService")
- local gui = settings_2
- 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)
- local UserInputService = game:GetService("UserInputService")
- local gui = main
- 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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement