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: Ingame report scanner.

Previous Thread :: Next Thread 
777Studios is not online. 777Studios
Joined: 26 May 2013
Total Posts: 110
06 Jul 2013 01:57 PM
function LoadedPlayer(Player)
function chatted(msg,speaker)
function clicked(_)
chatlog = { }
bad = {"n00b"}
if msg then
table.insert(chatlog,msg)
end
for i,v in pairs(chatlog) do
if chatlog == bad then
speaker:Destroy()
end
end
end
end
end
script.Parent.MouseButton1Down:connect(clicked)
Player:connect(chatted)
game.Players.PlayerAdded:conect(LoadedPlayer)

No idea why noty working.

"That's of course, if you exist upon execution of the script." - KnightmareXD
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
06 Jul 2013 01:59 PM
for _, V in pairs(bad) do
if v == V the
--code
end
end
Report Abuse
777Studios is not online. 777Studios
Joined: 26 May 2013
Total Posts: 110
06 Jul 2013 02:00 PM
How can I get the speaker to remove the speaker?

"That's of course, if you exist upon execution of the script." - KnightmareXD
Report Abuse
777Studios is not online. 777Studios
Joined: 26 May 2013
Total Posts: 110
06 Jul 2013 02:11 PM
bump

"That's of course, if you exist upon execution of the script." - KnightmareXD
Report Abuse
777Studios is not online. 777Studios
Joined: 26 May 2013
Total Posts: 110
06 Jul 2013 05:33 PM
bumpty

"That's of course, if you exist upon execution of the script." - KnightmareXD
Report Abuse
WhoBloxedWho is not online. WhoBloxedWho
Joined: 25 Mar 2009
Total Posts: 4611
06 Jul 2013 05:47 PM
that just looks like a mess, right ideas in places, but a mess.

What you want to be doing is connecting the playerAdded event to get the player when they load the game, then the chatted event when they speak. From there you dont really need to make a chat log, but you could just check the sent message for any blacklisted words.

local BadWords = {noob}

function Chatted(message, player)
if BadWords[message] then
player:Destroy()
end
end

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
Chatted(msg, player)
end)
end)

now what I posted up there for the chatted function isn't going to work in most cases. If you typed in "noob" and only that into the chat, it would pick it up and work as expected, but if typed in "Your a noob" into the chat, it wouldn't work.

To make it find words within a string you'll have to do some string pattern magic, I myself aren't very good with them and wont be of much help. But you want to run through the msg and look for them in your BadWords table,if you find one, you :Destroy() the player, if not, then keep looking.

Thats the general idea of how something like this would work.
Report Abuse
777Studios is not online. 777Studios
Joined: 26 May 2013
Total Posts: 110
06 Jul 2013 05:56 PM











@who
i want to be the player says something, goes to chatlog table and script is in gui imagebutton soi need mousebutton1down but where to put it?

"That's of course, if you exist upon execution of the script." - KnightmareXD
Report Abuse
777Studios is not online. 777Studios
Joined: 26 May 2013
Total Posts: 110
06 Jul 2013 06:03 PM
bump

"That's of course, if you exist upon execution of the script." - KnightmareXD
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