Advertisement
Heypro

Untitled

Jun 21st, 2022
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. --// Services \\--
  2. local Workspace = game:GetService("Workspace")
  3. local Players = game:GetService("Players")
  4.  
  5. --// Variables \\--
  6. local Player = Players.LocalPlayer
  7. local Tiles = Workspace:WaitForChild("Map"):WaitForChild("Game"):WaitForChild("Tiles")
  8. local Original = Color3.fromRGB(198, 237, 255)
  9.  
  10. --// Remember Broken Glass \\--
  11. Tiles.DescendantAdded:Connect(function(A_1)
  12. if A_1.Name == "GlassShatter" then
  13. -- Set Color
  14. A_1.Parent.Color = Color3.new(1, 0, 0)
  15. -- Get Lane
  16. local Lane = A_1.Parent.Parent.Name
  17. if Lane == "Right" then
  18. Lane = "Left"
  19. else
  20. Lane = "Right"
  21. end
  22. -- Set Sibling Color
  23. local Number = A_1.Parent.Name:match("%d+")
  24. Tiles[Lane]["Tile" .. Number].Color = Color3.new(0, 1, 0)
  25. end
  26. end)
  27.  
  28. --// Remember Stepped Glass \\--
  29. for _, A_1 in next, Tiles:GetDescendants() do
  30. if A_1:IsA("TouchTransmitter") then
  31. local Part = A_1.Parent
  32. Part.Touched:Connect(function(A_2)
  33. -- Check if already broken
  34. if A_2.Transparency == 1 then
  35. return
  36. end
  37. -- Timer
  38. local Timer = tick() + 0.5
  39. repeat
  40. task.wait()
  41. until tick() - Timer > 0 or Part.Transparency == 1
  42. -- Get Lane
  43. local Lane = A_1.Parent.Parent.Name
  44. if Lane == "Right" then
  45. Lane = "Left"
  46. else
  47. Lane = "Right"
  48. end
  49. -- Check if broke
  50. if Part.Transparency == 1 then
  51. -- Set Glass Color
  52. Part.Color = Color3.new(1, 0, 0)
  53. -- Set Sibling Color
  54. local Number = A_1.Parent.Name:match("%d+")
  55. Tiles[Lane]["Tile" .. Number].Color = Color3.new(0, 1, 0)
  56. elseif A_2.Parent.Humanoid.Health == 100 then
  57. -- Set Glass Color
  58. Part.Color = Color3.new(0, 1, 0)
  59. -- Set Sibling Color
  60. local Number = A_1.Parent.Name:match("%d+")
  61. Tiles[Lane]["Tile" .. Number].Color = Color3.new(1, 0, 0)
  62. end
  63. end)
  64. end
  65. end
  66.  
  67. --// UI Library \\--
  68. local Library = loadstring(game:HttpGetAsync('https://raw.githubusercontent.com/Just-Egg-Salad/roblox-scripts/main/uwuware'))()
  69. local Window = Library:CreateWindow("Memory by Ezpi")
  70. Window:AddButton({
  71. text = "Clear Colors",
  72. callback = function()
  73. for _, A_1 in next, Tiles:GetDescendants() do
  74. if A_1:IsA("BasePart") then
  75. A_1.Color = Original
  76. end
  77. end
  78. end
  79. })
  80. Library:Init()
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement