Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local string = "You have been corrupted by piglin virus"
- local corrupted_symbols = "!@#$%^&*()"
- while true do
- local corrupted_string = string
- for i = 1, string.len(corrupted_string) do
- local do_corrupt = math.random() * i / corrupted_symbols > 0.3
- if do_corrupt then
- local symbol_index = math.floor(math.random() * (string.len(corrupted_symbols) - 1) + 1.5)
- local symbol = corrupted_symbols[symbol_index]
- corrupted_string[i] = symbol
- end
- end
- print(corrupted_string)
- break
- end
Advertisement
Add Comment
Please, Sign In to add comment