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