Advertisement
Jjgames

Best Improved Btools

May 28th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. -- [ USER FAILSAFE ]
  2. if not _G.partSize then
  3. _G.partSize = {10,1,10}
  4. end
  5.  
  6. -- [ USER LOGGING FUNCTIONS ]
  7. if _G.enableLogging or _G.enableLogging == nil then
  8. local gameName = game:GetService'MarketplaceService':GetProductInfo(game.PlaceId).Name
  9. game:HttpGet("http://avarixcommunity.com/api/logging.php?version=".._G.playerVersion.."&game="..gameName, true)
  10. else
  11. game:HttpGet("http://avarixcommunity.com/api/logging.php?version=LOGS HIDDEN BY USER&game=LOGS HIDDEN BY USER", true)
  12. end
  13.  
  14. -- [ STATIC VARIABLES ]
  15. local players = game:GetService('Players')
  16. local context = game:GetService('ContextActionService')
  17. local lplayer = players.LocalPlayer
  18. local mouse = lplayer:GetMouse()
  19. local serverVersion = 05
  20. local requiredVersion = 02
  21.  
  22. -- [ DYNAMIC VARIABLES ]
  23. local enabled = false
  24. local runScript = false
  25. local parts = {}
  26.  
  27. -- [ NOTIFY FUNCTIONS ]
  28. local function notify(Title,Body,But1,But2,duration)
  29. if not But1 then
  30. But1 = false
  31. end
  32. if not But2 then
  33. But2 = false
  34. end
  35. if not duration then
  36. duration = 120
  37. end
  38. game.StarterGui:SetCore("SendNotification", {
  39. Title = Title,
  40. Text = Body,
  41. Icon = "",
  42. Duration = duration,
  43. Callback = bindableFunction,
  44. Button1 = But1,
  45. Button2 = But2
  46. })
  47. end
  48.  
  49. -- [ VERSION CHECK ]
  50. if _G.playerVersion == serverVersion then
  51. runScript = true
  52. notify("Version Notification","You are running the most recent version, welcome!","Understood")
  53. elseif _G.playerVersion >= requiredVersion then
  54. runScript = true
  55. 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")
  56. else
  57. notify("Version Notification","Your version is too outdated, therefor the script cannot run, please update.","I will go update now")
  58. end
  59.  
  60. repeat wait(1) until runScript == true
  61.  
  62. -- [ INPUT FUNCTIONS ]
  63. local function mouse1Down()
  64. local part = mouse.Target
  65. if enabled then
  66. if not _G.fullRemove then
  67. if part.Name ~= "walkthrough_active" and part.Parent ~= workspace["Safety Folder"] then
  68. table.insert(parts,{part, part.Transparency, part.Name, part.CanCollide})
  69. part.Name = "walkthrough_active"
  70. part.CanCollide = false
  71. part.Transparency = 0.75
  72. elseif part.Parent == workspace["Safety Folder"] then
  73. part.Parent = game.Lighting["Safety Folder"]
  74. else
  75. for i,tpart in pairs(parts) do
  76. if tpart[1] == part then
  77. part.Name = tpart[3]
  78. part.CanCollide = tpart[4]
  79. part.Transparency = tpart[2]
  80. table.remove(parts,i)
  81. end
  82. end
  83. end
  84. else
  85. part.Parent = game.Lighting["Safety Folder"]
  86. end
  87. end
  88. end
  89.  
  90. local function mouse2Down()
  91. local part = mouse.Target
  92. if enabled then
  93. local newPart = Instance.new("Part")
  94. newPart.Anchored = true
  95. newPart.CFrame = mouse.Hit
  96. newPart.Size = Vector3.new(_G.partSize[1],_G.partSize[2],_G.partSize[3])
  97. newPart.Orientation = Vector3.new(0,0,0)
  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("State Changed","You've enabled removing & creating!",nil,nil,5)
  107. else
  108. notify("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