Advertisement
tturley23

OP Customisable Noclip Script

May 14th, 2018
3,023
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.32 KB | None | 0 0
  1. -- made by tturley23
  2.  
  3. --[[ Thank you for choosing this noclip script!
  4.    
  5.     The noclip will be enabled automatically, please enter the values below - mode, hitpart according the the instructions.
  6.     Want to disable the noclip? Type "noclip disable" in chat.
  7.     Want to re-enable the noclip? Type "noclip enable" in chat.
  8.  
  9.     If you are going to share this etc please give credit :)
  10.    
  11. --]]
  12.  
  13. local plr = game.Players.LocalPlayer -- Player
  14.  
  15. local mode = ""
  16.  
  17. --[[ MODE:
  18.    
  19.     The mode is what mode the noclip script is on. You must enter one of these values. CASE SENSITIVE.
  20.    
  21.     tempnoclip - Will allow you to walk through touched objects for 3 seconds before making them solid again. While you can walk through them they are semi-transparent
  22.     destroy - Will permanently destroy any touched objects
  23.     noclip - Will Allow you to walk through any touched object permanently
  24.     invis - Will make any touched object invisible.
  25.    
  26. --]]
  27.  
  28. local HitPart = ""
  29.  
  30. --[[ HITPART
  31.    
  32.     This Value is what part of your character will activate the noclip mode. You must enter one of the following values. CASE SENSITIVE.
  33.     BE AWARE OF WETHER YOU ARE PLAYING R15 OR R6 ANIMATED GAMES.
  34.    
  35.     Head - R15/R6
  36.     Torso - R6
  37.     HumanoidRootPart - R15 Torso
  38.     LeftLeg - R15
  39.     LeftFoot - R15
  40.     RightLeg - R15
  41.     RightFoot - R15
  42.    
  43. --]]
  44.  
  45. local enabled = true
  46.  
  47. if (plr ~= nil) then
  48.    
  49.     print("Activating NoClip...")
  50.     enabled = true
  51.    
  52.            
  53.     if (mode ~= "TEMPNOCLIP" and mode ~= "tempnoclip" and mode ~= "DESTROY" and mode ~= "destroy" and mode ~= "NOCLIP" and mode ~= "noclip" and mode ~= "INVIS" and mode ~= "invis") then
  54.         print ("Invalid mode! Setting to noclip by default!")
  55.         mode = "noclip"
  56.     else
  57.         print("Succesfully Changed Mode! Mode: " ..mode)       
  58.     end
  59.    
  60.     if (HitPart ~= "Head" and HitPart ~= "Torso" and HitPart ~= "HumanoidRootPart" and HitPart ~= "LeftHand" and HitPart ~= "LeftFoot" and HitPart ~= "RightFoot" and HitPart ~= "RightHand") then
  61.         print ("Invalid Hit Object! Setting to head by default!")
  62.         HitPart = "Head"
  63.     else
  64.         print ("Successfully Changed Hit Object! Object: " ..HitPart)
  65.     end
  66.    
  67.     print("Noclip succesfully activated!")
  68.    
  69. end
  70.  
  71. plr.Chatted:connect(function(msg)
  72.    
  73.     if (msg == string.lower("noclip disable")) then
  74.         print("Disabling noclip")
  75.         enabled = false    
  76.     end
  77.    
  78.     if (msg == string.lower("noclip enable")) then
  79.         print("Enabling noclip")
  80.         enabled = true
  81.     end
  82. end)
  83.  
  84. plr.Character[HitPart].Touched:connect(function(obj)
  85.    
  86.     if(obj:IsA("MeshPart") or obj:IsA("Part") or obj:IsA("WedgePart") or obj:IsA("UnionOperation")) then
  87.         if(obj.CanCollide == true) then
  88.            
  89.             if (mode == "TEMPNOCLIP" or mode == "tempnoclip") then 
  90.                
  91.                 if enabled == true then            
  92.                     local ogtransp = obj.Transparency
  93.                    
  94.                     obj.CanCollide = false
  95.                     obj.Transparency = 0.5
  96.                    
  97.                     wait(4)
  98.                    
  99.                     obj.CanCollide = true
  100.                     obj.Transparency = ogtransp
  101.                 end
  102.                
  103.             end
  104.            
  105.            
  106.             if (mode == "DESTROY" or mode == "destroy") then
  107.                 if enabled == true then
  108.                     obj:remove()
  109.                 end
  110.             end
  111.            
  112.             if (mode == "NOCLIP" or mode == "noclip") then
  113.                 if enabled == true then
  114.                     obj.CanCollide = false
  115.                 end
  116.             end
  117.            
  118.             if (mode == "INVIS" or mode == "invis") then
  119.                 if enabled == true then
  120.                     obj.Transparency = 0.8
  121.                     else
  122.                 end
  123.             end
  124.            
  125.         end
  126.        
  127.     else
  128.         print("Not Available obj")
  129.     end
  130.    
  131. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement