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
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Chat command not working

Previous Thread :: Next Thread 
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
01 Jan 2013 01:54 AM
activate = false

print("Activate is false")

Game.Players.CodyTheBuildingKid.Chatted:connect(function(chat)
print("Chat function is good")
if chat:sub(1,14) == "Luna, power on" then
print("Chat recieved")
msg = Instance.new("Message", Game.Workspace)
print("Message made")
msg.Text = "Power on"
print("Message text edited")
wait(3)
msg:Destroy()

if chat:sub(1,7) == "Sign in" then
print("Recieved")
local p = "Parent"
local s = "ss"
local c = "code"
msg.Text = p..s..c.." needed"
wait(3)
msg:Destroy()

if chat:sub(1,13) == "for i = 1, 10" then
print("Recieved")
msg.Text = "Sign in complete"
wait(3)
msg.Text = "What would you like to do?"
wait(3)
msg:Destroy()

if chat:sub(1,16) == "Activate antiban" then
print("Recieved, activate is true")
activate = true
msg.Text = "Antiban activated"
wait(3)
msg:Destroy()

elseif chat:sub(1,18) == "Deactivate antiban" then
print("Recieved, activate is false")
activate = false
msg.Text = "Antiban deactivated"
wait(3)
msg:Destroy()
end
end
end
end
end)
---------------------
I'm not sure how I would make a sequence as in:
Me: Hi
Other: Hello
Me: Sign in
Other: Log in
Me: xxxx
Other: Logged in

How would one do this?
Report Abuse
noah is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
01 Jan 2013 02:04 AM
game.Players.noob.Chatted:connect(function(chat)
if chat == "Hello" then
msg = Instance.new("Message")
msg.Parent = game.Workspace
msg.Text = "Hi"
wait(2)
msg.Text = ""
if msg.Text == "" and chat == "Sign in" then
msg.Text = "Log in"
wait(2)
if msg.Text == "Log in" and chat == "xxxx" then
msg.Text = "Log out"
wait(2)
msg:Destroy()
end
end
end
end)

very inefficent lolol and mite not wurk but ok
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
01 Jan 2013 02:07 AM
idc about efficiency rite nao
Report Abuse
noah is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
01 Jan 2013 02:12 AM
;o did it wurk?
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
01 Jan 2013 02:15 AM
nu
qq
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
01 Jan 2013 02:28 AM
qq how u do this
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