Advertisement
Huhhh81

Blocks n' Props Script

Oct 7th, 2024
1,789
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. -- You can change the script but don't steal it :c
  2.  
  3. local scriptEnabled = true
  4.  
  5. local function toggleKillBrickProperties(enable)
  6. for _, part in pairs(workspace:GetDescendants()) do
  7. if part:IsA("BasePart") and part.Name == "KillBrick" then
  8. part.CanQuery = not enable
  9. part.CanTouch = not enable
  10. part.CanCollide = not enable
  11. end
  12. end
  13. end
  14.  
  15. local screenGui = Instance.new("ScreenGui")
  16. screenGui.ResetOnSpawn = false
  17. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  18.  
  19. local mainFrame = Instance.new("Frame")
  20. mainFrame.Size = UDim2.new(0, 170, 0, 70)
  21. mainFrame.Position = UDim2.new(0, 10, 0, 10)
  22. mainFrame.BackgroundTransparency = 1
  23. mainFrame.Parent = screenGui
  24.  
  25. mainFrame.Active = true
  26. mainFrame.Draggable = true
  27.  
  28. local cantDieButton = Instance.new("TextButton")
  29. cantDieButton.Size = UDim2.new(0, 100, 0, 50)
  30. cantDieButton.Position = UDim2.new(0, 0, 0, 0)
  31. cantDieButton.Text = "Can't Die: ON"
  32. cantDieButton.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
  33. cantDieButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  34. cantDieButton.Parent = mainFrame
  35.  
  36. local cantDieUICorner = Instance.new("UICorner")
  37. cantDieUICorner.CornerRadius = UDim.new(0, 10)
  38. cantDieUICorner.Parent = cantDieButton
  39.  
  40. local function toggleScript()
  41. scriptEnabled = not scriptEnabled
  42. if scriptEnabled then
  43. cantDieButton.Text = "Can't Die: ON"
  44. toggleKillBrickProperties(true)
  45. else
  46. cantDieButton.Text = "Can't Die: OFF"
  47. toggleKillBrickProperties(false)
  48. end
  49. end
  50.  
  51. cantDieButton.MouseButton1Click:Connect(toggleScript)
  52.  
  53. local player = game.Players.LocalPlayer
  54. local character = player.Character or player.CharacterAdded:Wait()
  55.  
  56. local function showNotification()
  57. game.StarterGui:SetCore("SendNotification", {
  58. Title = "!!!";
  59. Text = "Made By Dummy094";
  60. Duration = 3;
  61. })
  62. end
  63.  
  64. if player.Character then
  65. showNotification()
  66. else
  67. player.CharacterAdded:Connect(function()
  68. showNotification()
  69. end)
  70. end
  71.  
  72. player.CharacterAdded:Connect(function()
  73. screenGui.Parent = player:WaitForChild("PlayerGui")
  74. end)
  75.  
  76. toggleKillBrickProperties(true)
  77.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement