generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Reverse 26

Previous Thread :: Next Thread 
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
28 Jan 2014 01:52 AM
I want to make all characters the opisite from the letter in the alphabet in a string.
Exmaple:

A Z M
would turn into
Z A N
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
28 Jan 2014 01:53 AM
How would i go about doing this?
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
28 Jan 2014 02:26 AM
Rot13 basically? Do ascii stuff.
Get the ascii codes, add 13 to them, then turn them to characters.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
28 Jan 2014 07:01 AM
local char = "M"

function reverse(char)
if char:match("[A-Z]") then
return string.char(2 * 65 + 25 - char:byte())
elseif char:match("[a-z]") then
return string.char(2 * 97 + 25 - char:byte())
end
end

print(reverse(char))
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
28 Jan 2014 11:49 AM
^ogm witchcraft
thanks
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image