|
| 18 Jan 2017 07:46 PM |
Hi,
I want to know how to allow a game to look for a specific string of text for example "1234ROBLOX" so that I can make a "hacking" mini game. Thanks! |
|
|
| Report Abuse |
|
|
iSymon
|
  |
| Joined: 19 Nov 2011 |
| Total Posts: 1023 |
|
|
| 18 Jan 2017 07:53 PM |
| ### = "1234ROBLOX" text = "RandomString1234ROBLOXxyz" a, b = string.find(text, #### if a and b then sub = text:sub(a, b) print(sub) end > 1234ROBLOX There may/will be other ways of doing this lol. |
|
|
| Report Abuse |
|
|
iSymon
|
  |
| Joined: 19 Nov 2011 |
| Total Posts: 1023 |
|
|
| 18 Jan 2017 07:54 PM |
Sorry for the format:
local f = "1234ROBLOX" local t = "RandomString1234ROBLOXxyz"
local a,b = string.find(text, f)
if a and b then print(text:sub(a, b)) end
> 1234ROBLOX
|
|
|
| Report Abuse |
|
|
iSymon
|
  |
| Joined: 19 Nov 2011 |
| Total Posts: 1023 |
|
|
| 18 Jan 2017 07:55 PM |
Another error lol, in the previous post switch "text" with the variable t. I had text clarified in my first post and forgot to change it in the previous post.
|
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 06:15 PM |
| Thank You for that script, but how would i get the text to display on a computer object, and have the player type that on the computer. |
|
|
| Report Abuse |
|
|
| |
|