|
| 08 Feb 2017 10:05 PM |
Hi! My developer is away for the 2 weeks and i don't know what to do.
Im trying to make a script where if someone says "!Verify" in the box it will execute some scripting stuff
Thank you, SuperSafe Systems Founder, WolfieTheDino |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 08 Feb 2017 10:21 PM |
'some scripting stuff'
what does this mean, you are way too general
that could mean
'run a function' 'run the code after it' 'run a script'
|
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2017 10:24 PM |
ThatThereGui = script.Parent; someOfDatDereScriptingStuff = function() print("DOOPY DOOPY DOOOOO"); end
ThatThereGui.FocusLost:connect(function(TheyDidMeanItTho) if TheyDidMeanItTho then someOfDatDereScriptingStuff() end end) |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 10:25 PM |
Oops. Sorry. Forgot a part
ThatThereGui = script.Parent; someOfDatDereScriptingStuff = function() print("DOOPY DOOPY DOOOOO"); end
ThatThereGui.FocusLost:connect(function(TheyDidMeanItTho) if TheyDidMeanItTho and ThatThereGui.Text:lower() == "!verify" then someOfDatDereScriptingStuff() end end) |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 10:26 PM |
if you have loadstring enabled or you have a compiler and virtual machine:
a_player.Chatted:connect( function( msg ) local script = msg:match("!verify (.+)") if script then loadstring( script )() end end) |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 10:27 PM |
or from gui
box.FocusLost:connect( function() local msg = box.Text local script = msg:match("!verify (.+)") if script then loadstring( script )() end end)
|
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 10:36 PM |
| Can you make it like this they say "!Verify" in the text box then it print("Hello") |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 10:37 PM |
if you put !verify print('hello') it will do that
but you can just change it to
if msg:match( "!Verify" ) then print('hello') end
match will make it work if it is put anywhere in the box though too |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 10:39 PM |
| Thank you Wunder_Wulfie your a Top Notch Dino C: |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2017 10:55 PM |
| Wait how do i make it if it does it even if its Lower cases or caps or like this !VERify |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 11:00 PM |
| msg:lower() and match to lowercase only |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 11:06 PM |
Wunder he obviously has no idea what you're talking about, I hardly even understand you. There's no need for all this "machine" garbage. Moreover there's no need to show off with the extra stuff, just give him what he wants.
@OP
if sring.lower(textbox.Text) == "!verify" then print("Yay!") end |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2017 11:14 PM |
So i have it like this
local plr = script.Parent.Parent.Parent.Parent.Parent local char = game.Workspace:FindFirstChild(plr.Name) local copy = script.RankGui:Clone() local box = script.Parent box.FocusLost:connect( function() local msg = box.Text if msg:match("!Verify") then script.RankGui.Frame.TextLabel.Text = plr:GetRoleInGroup(2795068) copy.Enabled = true copy.Parent = char.Head char.Head.RankGui.Frame.Visible = true char.Head.RankGui.Frame.Picture.Visible = true end end)
But it doesnt show it on top of the name, And i dont know how to do the lowercase thing
I want it to copy the script.RankGUI into the players head who executes the command |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 11:16 PM |
use copy instead of char.blah...., copy is still copy no matter what you parent it to
msg:lower():match("!verify") |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 11:18 PM |
| Ok i done that i have a RankGUI as the Child and i want it to duplicate it into the Players head who executed it |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 11:19 PM |
--before using in function local rank = script.RankGui rank.Parent = nil
--when giving (make sure everything is visible and on) rank:Clone().Parent = char.Head |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 11:27 PM |
| One more thing, Can you make it so it makes a gui Visible if your a Rank in group and you press ' on your keyboard |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2017 11:28 PM |
And verify doesnt work ill send the script
local plr = script.Parent.Parent.Parent.Parent.Parent local char = game.Workspace:FindFirstChild(plr.Name) local box = script.Parent box.FocusLost:connect( function() local msg = box.Text if msg:lower():match("!verify") then script.RankGui.Frame.TextLabel.Text = plr:GetRoleInGroup(2795068) local rank = script.RankGui script.RankGui.Parent = nil script.RankGui:Clone().Parent = char.Head end end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Feb 2017 12:02 AM |
local plr = script.Parent.Parent.Parent.Parent.Parent local char = game.Workspace:FindFirstChild(plr.Name) local box = script.Parent box.FocusLost:connect( function() local msg = box.Text if string.lower(msg) == "!verify" then script.RankGui.Frame.TextLabel.Text = plr:GetRoleInGroup(2795068) local rank = script.RankGui script.RankGui.Parent = nil script.RankGui:Clone().Parent = char.Head end end) |
|
|
| Report Abuse |
|
|