Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1.  
  2. -- [ CONFIG ]
  3. _G.hotKey = "n"
  4. _G.fullRemove = false -- Enable this if you'd rather the parts be removed entirely, and not be replaceable!
  5.  
  6. -- [ MISC ]
  7. _G.playerVersion = 03 -- DO NOT CHANGE THIS, THIS IS SO THE SCRIPT CAN CHECK WHAT VERSION YOU'RE RUNNING AND NOTIFY YOU IF NEW CONFIG OPTIONS ARE REQUIRED!
  8.  
  9. -- [ SCRIPT ]
  10.  
  11.  
  12.  
  13. -- [ STATIC VARIABLES ]
  14. local players = game:GetService('Players')
  15. local context = game:GetService('ContextActionService')
  16. local lplayer = players.LocalPlayer
  17. local mouse = lplayer:GetMouse()
  18. local serverVersion = 03
  19. local requiredVersion = 01
  20.  
  21. -- [ DYNAMIC VARIABLES ]
  22. local enabled = false
  23. local runScript = false
  24. local parts = {}
  25.  
  26. -- [ NOTIFY FUNCTIONS ]
  27. local function notify(Title,Body,But1,But2,duration)
  28. if not But1 then
  29. But1 = false
  30. end
  31. if not But2 then
  32. But2 = false
  33. end
  34. if not duration then
  35. duration = 120
  36. end
  37. game.StarterGui:SetCore("SendNotification", {
  38. Title = Title,
  39. Text = Body,
  40. Icon = "",
  41. Duration = duration,
  42. Callback = bindableFunction,
  43. Button1 = But1,
  44. Button2 = But2
  45. })
  46. end
  47.  
  48. -- [ VERSION CHECK ]
  49. if _G.playerVersion == serverVersion then
  50. runScript = true
  51. notify("Version Notification","You are running the most recent version, welcome!","Understood")
  52. elseif _G.playerVersion >= requiredVersion then
  53. runScript = true
  54. notify("Version Notification","WARNING: You are running an outdated version, grab an updated version on the original thread else yours may break soon.","I will update soon")
  55. else
  56. notify("Version Notification","Your version is too outdated, therefor the script cannot run, please update.","I will go update now")
  57. end
  58.  
  59. repeat wait(1) until runScript == true
  60.  
  61. -- [ INPUT FUNCTIONS ]
  62. local function mouse1Down()
  63. local part = mouse.Target
  64. if enabled then
  65. if not _G.fullRemove then
  66. if part.Name ~= "walkthrough_active" and part.Parent ~= workspace["Safety Folder"] then
  67. table.insert(parts,{part, part.Transparency, part.Name, part.CanCollide})
  68. part.Name = "walkthrough_active"
  69. part.CanCollide = false
  70. part.Transparency = 0.75
  71. elseif part.Parent == workspace["Safety Folder"] then
  72. part.Parent = game.Lighting["Safety Folder"]
  73. else
  74. for i,tpart in pairs(parts) do
  75. if tpart[1] == part then
  76. part.Name = tpart[3]
  77. part.CanCollide = tpart[4]
  78. part.Transparency = tpart[2]
  79. table.remove(parts,i)
  80. end
  81. end
  82. end
  83. else
  84. part.Parent = game.Lighting["Safety Folder"]
  85. end
  86. end
  87. end
  88.  
  89. local function mouse2Down()
  90. local part = mouse.Target
  91. if enabled then
  92. local newPart = Instance.new("Part")
  93. newPart.Anchored = true
  94. newPart.CFrame = mouse.Hit
  95. newPart.Size = Vector3.new(10,1,10)
  96. newPart.Orientation = Vector3.new(0,0,0)
  97. newPart.Transparency = 0.2
  98. newPart.Parent = workspace["Safety Folder"]
  99. end
  100. end
  101.  
  102. local function keypress(action,state,object)
  103. if state == Enum.UserInputState.Begin then
  104. enabled = not enabled
  105. if enabled then
  106. notify("Remove state changed","You've enabled removing & creating!",nil,nil,5)
  107. else
  108. notify("Remove state changed","You've disabled removing & creating!",nil,nil,5)
  109. end
  110. end
  111. end
  112.  
  113. -- [ EVENTS ]
  114. mouse.Button1Down:Connect(mouse1Down)
  115. mouse.Button2Down:Connect(mouse2Down)
  116. context:BindAction("keypress", keypress, false, _G.hotKey)
  117.  
  118. local LsafetyFolder = Instance.new("Folder")
  119. LsafetyFolder.Parent = game.Lighting
  120. LsafetyFolder.Name = "Safety Folder"
  121.  
  122. local WsafetyFolder = Instance.new("Folder")
  123. WsafetyFolder.Parent = workspace
  124. WsafetyFolder.Name = "Safety Folder"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement