Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://youtu.be/VvZHJOXxOSw
- local Players = game:GetService("Players")
- local function onPlayerChatted(player, message)
- message = message:lower() -- Make the command case-insensitive
- if message == "!hello" then
- print("Hello, " .. player.Name .. "! Welcome to the game.")
- end
- end
- Players.PlayerAdded:Connect(function(player)
- player.Chatted:Connect(function(message)
- onPlayerChatted(player, message)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement