game.Players.PlayerAdded:connect(function(plr)
local cmds = {
walks = function() plr.Character.Humanoid.WalkToPoint = plr.Character.Torso.Position+Vector3.new(math.random(-10,10),0,math.random(-10,10)) end,
sits = function() plr.Character.Humanoid.Sit = true end,
jumps = function() plr.Character.Humanoid.Jump = true end,
dies = function() plr.Character.Humanoid.PlatformStand = true end,
}
local ChatService = game:GetService("Chat")
plr.Chatted:connect(function(msg,Targ)
local first = string.sub(msg, 1,3)
if first == "/me" then
if plr.Character.Head:FindFirstChild("Emote") then
plr.Character.Head.Emote:Destroy()
end
local FilteredText = ChatService:FilterStringAsync(msg, plr, plr)
local gui = Instance.new("BillboardGui", plr.Character.Head)
gui.Name = "Emote"
gui.Size = UDim2.new(6,0,1.5,0)
gui.StudsOffset = Vector3.new(0,2.5,0)
local label = Instance.new("TextLabel", gui)
label.Text = "*"..string.sub(FilteredText, 5, string.len(FilteredText)).."*"
label.BackgroundTransparency = 1
label.Size = UDim2.new(1,0,1,0)
label.Font = "SourceSansBold"
label.FontSize = "Size24"
label.TextScaled = true
label.TextWrapped = true
label.TextStrokeTransparency = 0
label.TextColor3 = Color3.new(107/107,0/50,124/124)
for i,v in pairs(cmds) do
if msg == "/me "..i then
cmds[i]()
end
end
wait(5)
if gui then
gui:Destroy()
end
end
end)
end)
COMMUNITY QUESTION
How would I get this script to put the players name first then what they did?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.
