Advertisement
ERROR_CODE

Open close Searcher Button

Dec 20th, 2023 (edited)
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. local UIGui = Instance.new("ScreenGui")
  2. local OpenCloseSearcherButton = Instance.new("TextButton")
  3. local OpenCloseSearcherButtonUICorner = Instance.new("UICorner")
  4.  
  5. UIGui.Parent = game.CoreGui
  6. game.CoreGui.TopBarApp.TopBarFrame.LeftFrame.ChatIcon.Size = UDim2.new(0, 32, 1, 0)
  7.  
  8. OpenCloseSearcherButton.Parent = UIGui
  9. OpenCloseSearcherButton.Size = UDim2.new(0, 32, 0, 32)
  10. OpenCloseSearcherButton.Position = UDim2.new(0, 105, 0, -32)
  11. OpenCloseSearcherButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  12. OpenCloseSearcherButton.BackgroundTransparency = 0.5
  13. OpenCloseSearcherButton.Text = "🔎"
  14. OpenCloseSearcherButton.TextColor3 = Color3.fromRGB(200, 200, 200)
  15. OpenCloseSearcherButton.Font = 'Code'
  16. OpenCloseSearcherButton.TextSize = 20
  17.  
  18. OpenCloseSearcherButton.MouseButton1Click:Connect(function()
  19. if OpenCloseSearcherButton.Text == "🔎" then
  20. OpenCloseSearcherButton.Text = " 🔎 "
  21. print("On")
  22. else
  23. if OpenCloseSearcherButton.Text == " 🔎 " then
  24. OpenCloseSearcherButton.Text = "🔎"
  25. print("off")
  26. end
  27. end
  28. end)
  29.  
  30. OpenCloseSearcherButtonUICorner.Parent = OpenCloseSearcherButton
  31. OpenCloseSearcherButtonUICorner.CornerRadius = UDim.new(0, 8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement