SY573M_404

Untitled

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