Advertisement
viown2

SmartBtools

Mar 3rd, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.32 KB | None | 0 0
  1. -- SmartBtools
  2. -- By vi#1606
  3.  
  4. local SmartBtools = Instance.new("ScreenGui")
  5. local notification = Instance.new("Frame")
  6. local message = Instance.new("TextLabel")
  7.  
  8.  
  9. SmartBtools.Name = "SmartBtools"
  10. SmartBtools.Parent = game.CoreGui
  11. SmartBtools.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  12.  
  13. notification.Name = "notification"
  14. notification.Parent = SmartBtools
  15. notification.BackgroundColor3 = Color3.fromRGB(34, 33, 33)
  16. notification.BorderSizePixel = 0
  17. notification.Position = UDim2.new(0.0153597416, 0, 0.969899654, -109)
  18. notification.Size = UDim2.new(0, 453, 0, 109)
  19. notification.Visible = false
  20.  
  21. message.Name = "message"
  22. message.Parent = notification
  23. message.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  24. message.BackgroundTransparency = 1.000
  25. message.Size = UDim2.new(0, 453, 0, 109)
  26. message.Font = Enum.Font.SourceSansSemibold
  27. message.Text = "{}"
  28. message.TextColor3 = Color3.fromRGB(255, 255, 255)
  29. message.TextSize = 27.000
  30.  
  31. local mode = "transparency";
  32. local disabled = false
  33. local items = {}
  34.  
  35.  
  36. local function AGVQI_fake_script()
  37.     local script = Instance.new('LocalScript', SmartBtools)
  38.    
  39.     local player = game.Players.LocalPlayer
  40.     local mouse = player:GetMouse()
  41.     local objects = game.Workspace:GetDescendants()
  42.     local boxes;
  43.    
  44.    
  45.     local function notify(message)
  46.         script.Parent.notification.Visible = true;
  47.         script.Parent.notification.message.Text = message
  48.         wait(5)
  49.         script.Parent.notification.Visible = false
  50.     end
  51.    
  52.     notify("SmartBtools by vi#1606\nCurrent mode: Transparency\nTo change modes press 'e'\nTo disable/enable press 'r'")
  53.    
  54.     local function refresh()
  55.         for i, object in pairs(objects) do
  56.             if object:IsA("Part") or object:IsA("MeshPart") then
  57.                 local mainHover = Instance.new("SelectionBox")
  58.                 mainHover.Name = "mainHover"
  59.                 table.insert(items, mainHover)
  60.                 local ClickDetector = Instance.new("ClickDetector")
  61.                 table.insert(items, ClickDetector)
  62.                 ClickDetector.Name = "mainDetect"
  63.                 mainHover.Parent = object
  64.                 mainHover.Adornee = object
  65.                 mainHover.Visible = false;
  66.                 ClickDetector.Parent = object;
  67.                 ClickDetector.MouseClick:Connect(function()
  68.                     if mode == "transparency" and disabled == false then
  69.                         if object.Transparency ~= 0.5 and object.CanCollide == true then
  70.                             object.Transparency = 0.5
  71.                             object.CanCollide = false
  72.                         else
  73.                             object.Transparency = 0;
  74.                             object.CanCollide = true
  75.                         end
  76.                     elseif mode == "destroy" and disabled == false then
  77.                         object:Destroy()
  78.                     end
  79.                 end)
  80.                 ClickDetector.MouseHoverEnter:Connect(function()
  81.                     mainHover.Visible = true
  82.                 end)
  83.                 ClickDetector.MouseHoverLeave:Connect(function()
  84.                     mainHover.Visible = false
  85.                 end)
  86.             end
  87.         end
  88.     end
  89.    
  90.     mouse.KeyDown:Connect(function(key)
  91.         if key == "e" then
  92.             if mode == "transparency" then
  93.                 mode = "destroy"
  94.                 notify("Mode changed to: Destroy")
  95.             elseif mode == "destroy" then
  96.                 mode = "transparency"
  97.                 notify("Mode changed to: Transparency")
  98.             end
  99.         elseif key == "r" then
  100.             if disabled == false then
  101.                 disabled = true
  102.                 notify("Disabled SmartBtools")
  103.                 for i,v in pairs(items) do
  104.                     v:Destroy()
  105.                 end
  106.                 items = {}
  107.             elseif disabled == true then
  108.                 disabled = false
  109.                 notify("Enabled SmartBtools")
  110.                 refresh()
  111.             end
  112.         end
  113.     end)
  114.     refresh()
  115. end
  116. coroutine.wrap(AGVQI_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement