Advertisement
whileDo

roblox noclip script UI

May 2nd, 2025 (edited)
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.02 KB | Gaming | 0 0
  1. -- This script creates a draggable GUI with Noclip toggle and keybind support.
  2. -- Features:
  3. -- - Toggle button that switches between "Noclip: ON/OFF"
  4. -- - Customizable hotkey to activate Noclip
  5. -- - Draggable UI window
  6.  
  7. local Players = game:GetService("Players")
  8. local UIS = game:GetService("UserInputService")
  9. local RunService = game:GetService("RunService")
  10. local player = Players.LocalPlayer
  11. local character = player.Character or player.CharacterAdded:Wait()
  12. local humanoid = character:WaitForChild("Humanoid")
  13.  
  14. local noclip = false
  15. local noclipKey = Enum.KeyCode.V
  16.  
  17. local screenGui = Instance.new("ScreenGui")
  18. screenGui.Parent = game.CoreGui
  19.  
  20. local frame = Instance.new("Frame")
  21. frame.Size = UDim2.new(0, 200, 0, 100)
  22. frame.Position = UDim2.new(0.5, -100, 0.5, -50)
  23. frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  24. frame.Active = true
  25. frame.Draggable = true
  26. frame.Parent = screenGui
  27.  
  28. local noclipButton = Instance.new("TextButton")
  29. noclipButton.Size = UDim2.new(0, 180, 0, 40)
  30. noclipButton.Position = UDim2.new(0, 10, 0, 10)
  31. noclipButton.Text = "Noclip: OFF"
  32. noclipButton.Parent = frame
  33.  
  34. local bindText = Instance.new("TextLabel")
  35. bindText.Size = UDim2.new(0, 180, 0, 20)
  36. bindText.Position = UDim2.new(0, 10, 0, 60)
  37. bindText.Text = "Bind: "..tostring(noclipKey)
  38. bindText.Parent = frame
  39.  
  40. local function toggleNoclip()
  41.     noclip = not noclip
  42.     noclipButton.Text = "Noclip: "..(noclip and "ON" or "OFF")
  43. end
  44.  
  45. noclipButton.MouseButton1Click:Connect(toggleNoclip)
  46.  
  47. UIS.InputBegan:Connect(function(input, gameProcessed)
  48.     if input.KeyCode == noclipKey and not gameProcessed then
  49.         toggleNoclip()
  50.     end
  51. end)
  52.  
  53. RunService.Stepped:Connect(function()
  54.     if noclip and character then
  55.         for _, part in pairs(character:GetDescendants()) do
  56.             if part:IsA("BasePart") then
  57.                 part.CanCollide = false
  58.             end
  59.         end
  60.     end
  61. end)
  62.  
  63. player.CharacterAdded:Connect(function(newChar)
  64.     character = newChar
  65.     humanoid = character:WaitForChild("Humanoid")
  66. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement