SY573M_404

Untitled

Jun 18th, 2023
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. local string = "You have been corrupted by piglin virus"
  2. local corrupted_symbols = "!@#$%^&*()"
  3.  
  4. while true do
  5. local corrupted_string = string
  6.  
  7. for i = 1, string.len(corrupted_string) do
  8. local do_corrupt = math.random() * i / corrupted_symbols > 0.3
  9.  
  10. if do_corrupt then
  11. local symbol_index = math.floor(math.random() * (string.len(corrupted_symbols) - 1) + 1.5)
  12. local symbol = corrupted_symbols[symbol_index]
  13.  
  14. corrupted_string[i] = symbol
  15. end
  16. end
  17.  
  18. print(corrupted_string)
  19. break
  20. end
  21.  
Advertisement
Add Comment
Please, Sign In to add comment