TheHeckingDeveloper

ExampleOfBadCode

Jul 17th, 2021
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.33 KB | None | 0 0
  1. -- BAD CODE. TERRIBLE CODE. --
  2.  
  3. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  4.  
  5. ReplicatedStorage.ButtonPressed.OnServerEvent:Connect(function(Player, TheButtonsText)
  6.     if TheButtonsText == "1" then
  7.         ReplicatedStorage.DaAllClients:FireAllClients(Player.Name.. " Pressed one.")
  8.     elseif TheButtonsText == "2" then
  9.         ReplicatedStorage.DaAllClients:FireAllClients(Player.Name.. " Pressed two.")
  10.     elseif TheButtonsText == "3" then
  11.         ReplicatedStorage.DaAllClients:FireAllClients(Player.Name.. " Pressed three.")
  12.     elseif TheButtonsText == "4" then
  13.         ReplicatedStorage.DaAllClients:FireAllClients(Player.Name.. " Pressed four.")
  14.     elseif TheButtonsText == "5" then
  15.         ReplicatedStorage.DaAllClients:FireAllClients(Player.Name.. " Pressed five.")
  16.     elseif TheButtonsText == "6" then
  17.         ReplicatedStorage.DaAllClients:FireAllClients(Player.Name.. " Pressed six.")
  18.     elseif TheButtonsText == "7" then
  19.         ReplicatedStorage.DaAllClients:FireAllClients(Player.Name.. " Pressed seven.")
  20.     elseif TheButtonsText == "8" then
  21.         ReplicatedStorage.DaAllClients:FireAllClients(Player.Name.. " Pressed eight.")
  22.     elseif TheButtonsText == "9" then
  23.         ReplicatedStorage.DaAllClients:FireAllClients(Player.Name.. " Pressed nine.")
  24.     elseif TheButtonsText == "10" then
  25.         ReplicatedStorage.DaAllClients:FireAllClients(Player.Name.. " Pressed ten.")
  26.     end
  27. end)
Advertisement
Add Comment
Please, Sign In to add comment