Deviliishh

fly/noclip Gui {Repost}

Aug 24th, 2019
138
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. local Toggle = Instance.new("ScreenGui")
  4. local Drag = Instance.new("TextButton")
  5. local Background = Instance.new("ImageLabel")
  6. local Fly = Instance.new("TextButton")
  7. local Noclip = Instance.new("TextButton")
  8. local LP = game.Players.LocalPlayer
  9. local Mouse = LP:GetMouse()
  10. local flydab = false
  11.  
  12. function noclip(plr)
  13. admintag = Instance.new("BoolValue")
  14.     admintag.Parent = game.Players[plr]
  15.     admintag.Value = true
  16.     admintag.Name = "noclip"
  17. end
  18.  
  19.  
  20. FLYING = false
  21. iyflyspeed = 1
  22. function sFLY() -- from rocky2u cmdscript
  23.     repeat wait() until LP and LP.Character and LP.Character:FindFirstChild('HumanoidRootPart') and LP.Character:FindFirstChild('Humanoid')
  24.     repeat wait() until Mouse
  25.    
  26.     local T = LP.Character.HumanoidRootPart
  27.     local CONTROL = {F = 0, B = 0, L = 0, R = 0}
  28.     local lCONTROL = {F = 0, B = 0, L = 0, R = 0}
  29.     local SPEED = 0
  30.    
  31.     local function FLY()
  32.         FLYING = true
  33.         local BG = Instance.new('BodyGyro', T)
  34.         local BV = Instance.new('BodyVelocity', T)
  35.         BG.P = 9e4
  36.         BG.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  37.         BG.cframe = T.CFrame
  38.         BV.velocity = Vector3.new(0, 0.1, 0)
  39.         BV.maxForce = Vector3.new(9e9, 9e9, 9e9)
  40.         spawn(function()
  41.         repeat wait()
  42.         LP.Character.Humanoid.PlatformStand = true
  43.         if CONTROL.L + CONTROL.R ~= 0 or CONTROL.F + CONTROL.B ~= 0 then
  44.         SPEED = 50
  45.         elseif not (CONTROL.L + CONTROL.R ~= 0 or CONTROL.F + CONTROL.B ~= 0) and SPEED ~= 0 then
  46.         SPEED = 0
  47.         end
  48. if (CONTROL.L + CONTROL.R) ~= 0 or (CONTROL.F + CONTROL.B) ~= 0 then
  49. BV.velocity = ((workspace.CurrentCamera.CoordinateFrame.lookVector * (CONTROL.F + CONTROL.B)) + ((workspace.CurrentCamera.CoordinateFrame * CFrame.new(CONTROL.L + CONTROL.R, (CONTROL.F + CONTROL.B) * 0.2, 0).p) - workspace.CurrentCamera.CoordinateFrame.p)) * SPEED
  50. lCONTROL = {F = CONTROL.F, B = CONTROL.B, L = CONTROL.L, R = CONTROL.R}
  51. elseif (CONTROL.L + CONTROL.R) == 0 and (CONTROL.F + CONTROL.B) == 0 and SPEED ~= 0 then
  52. BV.velocity = ((workspace.CurrentCamera.CoordinateFrame.lookVector * (lCONTROL.F + lCONTROL.B)) + ((workspace.CurrentCamera.CoordinateFrame * CFrame.new(lCONTROL.L + lCONTROL.R, (lCONTROL.F + lCONTROL.B) * 0.2, 0).p) - workspace.CurrentCamera.CoordinateFrame.p)) * SPEED
  53. else
  54. BV.velocity = Vector3.new(0, 0.1, 0)
  55. end
  56.     BG.cframe = workspace.CurrentCamera.CoordinateFrame
  57.             until not FLYING
  58.             CONTROL = {F = 0, B = 0, L = 0, R = 0}
  59.             lCONTROL = {F = 0, B = 0, L = 0, R = 0}
  60.             SPEED = 0
  61.             BG:destroy()
  62.             BV:destroy()
  63.             LP.Character.Humanoid.PlatformStand = false
  64.         end)
  65.     end
  66.     Mouse.KeyDown:connect(function(KEY)
  67.         if KEY:lower() == 'w' then
  68.             CONTROL.F = iyflyspeed
  69.         elseif KEY:lower() == 's' then
  70.             CONTROL.B = -iyflyspeed
  71.         elseif KEY:lower() == 'a' then
  72.             CONTROL.L = -iyflyspeed
  73.         elseif KEY:lower() == 'd' then
  74.             CONTROL.R = iyflyspeed
  75.         end
  76.     end)
  77.     Mouse.KeyUp:connect(function(KEY)
  78.         if KEY:lower() == 'w' then
  79.             CONTROL.F = 0
  80.         elseif KEY:lower() == 's' then
  81.             CONTROL.B = 0
  82.         elseif KEY:lower() == 'a' then
  83.             CONTROL.L = 0
  84.         elseif KEY:lower() == 'd' then
  85.             CONTROL.R = 0
  86.         end
  87.     end)
  88.     FLY()
  89. end
  90.  
  91.  
  92. function NOFLY()
  93.     FLYING = false
  94.     LP.Character.Humanoid.PlatformStand = false
  95. end
  96.  
  97.  
  98.  
  99. Toggle.Name = "Toggle"
  100. Toggle.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  101.  
  102. Drag.Name = "Drag"
  103. Drag.Parent = Toggle
  104. Drag.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  105. Drag.BackgroundTransparency = 0.9990000128746
  106. Drag.BorderColor3 = Color3.new(1, 1, 1)
  107. Drag.Position = UDim2.new(0.788501024, 0, 0.366223931, 0)
  108. Drag.Size = UDim2.new(0, 190, 0, 190)
  109. Drag.Font = Enum.Font.ArialBold
  110. Drag.Text = ""
  111. Drag.TextColor3 = Color3.new(1, 1, 1)
  112. Drag.TextSize = 14
  113. Drag.TextWrapped = true
  114. Drag.Draggable = true
  115.  
  116. Background.Name = "Background"
  117. Background.Parent = Drag
  118. Background.BackgroundColor3 = Color3.new(1, 1, 1)
  119. Background.Position = UDim2.new(0.00235599279, 0, -0.0012384057, 0)
  120. Background.Size = UDim2.new(0, 190, 0, 190)
  121. Background.ZIndex = 0
  122. Background.Image = "rbxassetid://0&hash=12ed3f0fdc0764ab01645b356df12dc3"
  123.  
  124. Fly.Name = "Fly"
  125. Fly.Parent = Background
  126. Fly.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  127. Fly.BackgroundTransparency = 0.80000001192093
  128. Fly.BorderColor3 = Color3.new(1, 1, 1)
  129. Fly.Position = UDim2.new(0.0473684222, 0, 0.0894736871, 0)
  130. Fly.Size = UDim2.new(0, 174, 0, 79)
  131. Fly.ZIndex = 2
  132. Fly.Font = Enum.Font.ArialBold
  133. Fly.Text = "Toggle Fly"
  134. Fly.TextColor3 = Color3.new(1, 1, 1)
  135. Fly.TextSize = 14
  136. Fly.TextWrapped = true
  137.  
  138. Noclip.Name = "Noclip"
  139. Noclip.Parent = Background
  140. Noclip.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  141. Noclip.BackgroundTransparency = 0.80000001192093
  142. Noclip.BorderColor3 = Color3.new(1, 1, 1)
  143. Noclip.Position = UDim2.new(0.0473684222, 0, 0.547368407, 0)
  144. Noclip.Size = UDim2.new(0, 174, 0, 69)
  145. Noclip.ZIndex = 2
  146. Noclip.Font = Enum.Font.ArialBold
  147. Noclip.Text = "Toggle Noclip"
  148. Noclip.TextColor3 = Color3.new(1, 1, 1)
  149. Noclip.TextSize = 14
  150.  
  151. Fly.MouseButton1Click:connect(function()
  152.    
  153.  
  154.     if flydab == false then
  155.         sFLY()
  156.         flydab = true
  157.  
  158.     elseif flydab == true then
  159.         NOFLY()
  160.             flydab = false
  161.     end
  162. end)
  163.  
  164. Noclip.MouseButton1Click:connect(function()
  165.     if game.Players.LocalPlayer:FindFirstChild("noclip") then
  166.     game.Players.LocalPlayer.noclip:Destroy()
  167.     else
  168.  
  169.                     noclip(game.Players.LocalPlayer.Name)
  170.        
  171.                
  172.                
  173.                                         game:GetService('RunService').Stepped:connect(function()
  174.                     if game.Players.LocalPlayer:FindFirstChild("noclip") then
  175.                     game.Players.LocalPlayer.Character.Head.CanCollide = false
  176.                     game.Players.LocalPlayer.Character.Torso.CanCollide = false
  177.                     end
  178.                         end)
  179.     end
  180. end)
RAW Paste Data