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: Post A Script

Previous Thread :: Next Thread 
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
08 Aug 2011 08:20 PM
I'll try my best to fix it :D.

Report Abuse
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
08 Aug 2011 08:25 PM
BUMP :D
Report Abuse
coldmillionare is not online. coldmillionare
Joined: 13 Feb 2010
Total Posts: 10560
08 Aug 2011 08:26 PM
wait(0.1)
game.workspace.Handle:GetChildren.clone()

I want it to be a regen part.
Report Abuse
mickymack is not online. mickymack
Joined: 27 Jul 2008
Total Posts: 19
08 Aug 2011 08:35 PM
me = game.Players.mickymackfunction onChatted(msg)if msg == "reset" thenme.Character.Humanoid.Health = 0endendme.Chatted:connect (onChatted)
Report Abuse
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
08 Aug 2011 08:43 PM
@cool
Hope this helps :D

local model = game.Workspace.ModelName --Change ModelName to the name of the model you want to regen

local message = Instance.new("Message")
message.Text = "Regenerating "..model.Name
local backup = model:clone()
local regenerating = false

function regenerate()
--Don't regenerate again if we're already doing it!
if regenerating then
return
else
regenerating = true
end

model:remove()

-- Display the regen message for 3 seconds, Change wait time (in seconds) for how long message will apper
message.Parent = game.Workspace
wait(3)
message.Parent = nil

-- Put the copied model back into workspace
model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()

-- After 5 seconds, allow the model to be regenerated again, Change if you dont want it to be regened again and again
wait(5)
regenerating = false
end
Report Abuse
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
08 Aug 2011 08:44 PM
@mickymack

me = game.Players.findFirstChild("mickymack")
function onChatted(msg)
if msg == "reset" then
me.Character.Humanoid.Health = 0
end
end
me.Chatted:connect(onChatted)
Report Abuse
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
08 Aug 2011 08:45 PM
Anyone Else?
Report Abuse
Text91 is not online. Text91
Joined: 30 Oct 2010
Total Posts: 164
09 Aug 2011 01:01 AM
Copied and pasted from free models, then changed a few words.
Report Abuse
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
09 Aug 2011 04:15 PM
TROLOL
The regen yes because mine is more advance
O_o
Report Abuse
Bloxmaster998144 is not online. Bloxmaster998144
Joined: 07 Sep 2009
Total Posts: 1188
09 Aug 2011 04:37 PM
Here, I can't find what's wrong with this:



Admins = {"Bloxmaster998144"}

function onChatted (speaker, msg)
if string.lower(msg) == "Open doors" then
local Door1 = game.Workspace.Doors.Door1
local Door2 = game.Workspace.Doors.Door2
Door1.Transparency = 1
Door1.CanCollide = false
Door2.Transparency = 1
Door2.CanCollide = false
elseif string.lower(msg) == "Close doors" then
Door1.Transparency = 0
Door1.CanCollide = true
Door2.Transparency = 0
Door2.CanCollide = true
end
end

function onEntered(newPlayer)
for i, v in pairs(Admins) do
if string.lower(v) == string.lower(newPlayer.Name) then
newPlayer.Chatted:connect(function(msg) onChatted(newPlayer, msg) end)
end
end
end

game.Players.ChildAdded:connect(onEntered)

Report Abuse
devock is not online. devock
Joined: 28 Sep 2008
Total Posts: 83
09 Aug 2011 05:37 PM
adminlist = { "devock" } --add in the names of people you want to be able to use the command script here
-- Please keep my name in there. ;)
bannedlist = { "" } -- If you want someone not to be able to enter your place, put thier name in here.
resetlist = { "reset" } -- put stuff you want people to be able to say to kill themselves here
fixlist = { "spawn"} -- put stuff you want people to be able to say if you want them to get a new character if thiers wont respawn in here.
texture = "" -- if you want a person wearing a certain shirt to be a admin, then paste the texture URL betweens the "s, i included instructions from the wiki on how to find a shirts's texture URL at the bottom of the script
secondsbeforemessagesdissapear = 2 -- Set this to how many seconds you want it to take for messages to disappear
teamchange = true -- make this "true" if you want people to be able to change teams by saying join/teamname and, "false" if you dont
killonteamchange = true -- make this "true" if you want people to get killed from changing team and "false" if you dont.
noguests = false -- make this true if you want guests to be automatically removed, false if you dont
-- and also, the names in adminlist, resetlist, and bannedlist arent case sensivitve.
--[[
If theres anything you think this command script needs, just message me (cobra4561) and i might put it in. :)
And also, if you find any bugs, report them to me.

Say "commands" ingame to see the commands

The commands are,

kill/person
kills someone

killall
kills everyone

explode/person
explodes someone

explodeall
explodes everyone

float/person
makes someone float around

unfloat/person
undos float/

floatall
makes everyone float around

unfloatall
undos the effect of float for everyone

ban/person
removes someone from the game and makes him unable to come back to that server
note that this command can not be used against people in the adminlist, and can only be used by people in adminlist.

kick/person
the same as ban except the people can come back to the server, and admin/ed people may use it.

admin/person
makes someone able to use the command script

change/person/money/9999
changes a player's leaderstats item's value, note that money can be abbreviated

punish/person
removes someones character

unpunish/person
gives someone thier character back.

control/person
makes someones character your own.

merge/person/player
makes person299 control player's character

ffon/person
gives someone a forcefield

ffoff/person
removes someone's forcefield

sparkles/person
makes someone all sparkly

unsparkles/person
undos the effect of sparkles/

invisible/person
makes someone invisible

visible/person
undos the effect of invisible/

freeze/person
Makes someone anchored and shiny

thaw/person
undos the effect of freeze/

give/ gives someone a tool that you put inside of the model "tools" thats inside of this model, for instance, if you put a tool named gun in there.
give/gun/person299
Your free to use some of the tools i made that i put in there, and you can put hopperbins in there too.

god/person
gives someone a forcefield, and makes thier health 999999, and makes them kill everyone they touch.

heal/person
restores someone to full health

trip/person
makes someone trip

maxplayers/15
sets the max player limit to what you say, can be between 6 and 20

btool/person
gives someone the move, clone, and delete tools.

m/i like pie
this makes a message appear on the screen saying: i like pie

h/i like pie
the same as m/ except it makes a hint appear

shutdown
makes the server shut down, my simplest command yet.

c/ game.Workspace:remove()
this creates a script which source is whatever you put in after the /

c//
creates a multiline script, every time you say it it adds to a script, then creates the script when you say "done", for instance
c// while true do
c// wait()
c// game.Workspace.Player.Torso.Velocity = Vector3.new(0,100,0)
c// end
done

clear
Removes all the scripts made by c/ and c//

Note that for kill/, punish/, unpunish/, ffon/, ffoff/, sparkles/,unsparkles/, invisible/, visible, change/, control/, merge/ btools, god/, trip/, heal/, and give/, what you say doesnt have to be the full name, for example
kill/per
And that will kill everyone whose name begins with "per"
And also, the tool name for give/ has to be exact.
And, the team name for the join/ command can be abbreviated, for instance, if you want to join Red Team, join/r would suffice.
And you CANNOT abbreviate the names for the ban/, kick/, and admin/ commands, you have to type in the full name.

Oh yeah, and capitalisation doesnt matter, except for the /s, so you could say KiLl/PeR


And im ok with people copying this script and the commands inside of it, but as long as i get credit for the foresaid script and commands.
--]]

ff = script:FindFirstChild("tools")
if ff ~= nil then
ff.Parent = game.Lighting
model = ff
else
model = Instance.new("Model")
model.Name = "tools"
model.Parent = game.Lighting
end

function text(message,object,type,waitnum)
mes = Instance.new(type)
mes.Text = message
mes.Name = message
mes.Parent = object
if waitnum == 0 then
wait(secondsbeforemessagesdissapear)
else
wait(waitnum)
end
c = object:FindFirstChild(message)
if c ~= nil then
c:remove()
end
end

function onChatted(msg,recipient,speaker)

if (string.sub(string.lower(msg),1,2) == "m/") then
text(speaker.Name .. ": " .. string.sub(msg,3),game.Workspace,"Message",0)
end

if (string.sub(string.lower(msg),1,2) == "h/") then
text(speaker.Name .. ": " .. string.sub(msg,3),game.Workspace,"Hint",0)
end

if (string.sub(string.lower(msg),1,2) == "c/") then
if (string.sub(string.lower(msg),3,3) ~= "/") then
ick = string.sub(msg,3)
ack = Instance.new("Script")
ack.Source = ick
ack.Disabled = false
ack.Name = "MadeScript"
ack.Parent = game.Workspace
end
end

if (string.sub(string.lower(msg),1,3) == "c//") then
h = speaker:FindFirstChild("tobecontinued")
if h == nil then
ick = string.sub(msg,4)
ack = Instance.new("Script")
ack.Source = ick
ack.Name = "tobecontinued"
ack.Disabled = true
ack.Parent = speaker
text("Script started",speaker,"Message",1)
else
ick = string.sub(msg,4)
h.Source = h.Source .. " " .. ick
text("Added to script",speaker,"Message",1)
end
end

msg = string.lower(msg)

if (string.sub(string.lower(msg),1,4) == "done") then
h = speaker:FindFirstChild("tobecontinued")
if h ~= nil then
b = h:clone()
b.Disabled = false
b.Name = "MadeScript"
b.Parent = game.Workspace
h:remove()
text("Script Made",speaker,"Message",1)
end
end

if (string.sub(string.lower(msg),1,5) == "clear") then
c = game.Workspace:GetChildren()
for i = 1,#c do
if c[i].Name == "MadeScript" then
c[i]:remove()
end
end
end

if (string.sub(string.lower(msg),1,5) == "heal/") then
ick = string.sub(msg,6)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
h2 = h.Character:FindFirstChild("Humanoid")
if h2 ~= nil then
h2.Health = h2.MaxHealth
end
end
end
end
end

if (string.sub(string.lower(msg),1,8) == "control/") then
ick = string.sub(msg,9)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
if h.Character ~= nil then
speaker.Character = h.Character
end
end
end
end
end

if (string.sub(string.lower(msg),1,5) == "trip/") then
ick = string.sub(msg,6)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
h2 = h.Character:FindFirstChild("Head")
if h2 ~= nil then
a = Instance.new("BodyThrust")
a.force = Vector3.new(0,0,-3500)
a.Parent = h2
wait(0.5)
a:remove()
end
end
end
end
end

--Whyd i pick the name person299 anyway?

if (string.sub(string.lower(msg),1,10) == "invisible/") then
ick = string.sub(msg,11)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
a1 = h.Character:FindFirstChild("Left Arm")
if a1 ~= nil then
a1.Transparency = 1
end
a2 = h.Character:FindFirstChild("Right Arm")
if a2 ~= nil then
a2.Transparency = 1
end
a3 = h.Character:FindFirstChild("Left Leg")
if a3 ~= nil then
a3.Transparency = 1
end
a4 = h.Character:FindFirstChild("Right Leg")
if a4 ~= nil then
a4.Transparency = 1
end
a5 = h.Character:FindFirstChild("Torso")
if a5 ~= nil then
a5.Transparency = 1
end
a6 = h.Character:FindFirstChild("Head")
if a6 ~= nil then
a6.Transparency = 1
a7 = a6:FindFirstChild("face")
if a7 ~= nil then
face = a7:clone()
a7:remove()
end
end
end
end
end
end

if (string.sub(string.lower(msg),1,7) == "freeze/") then
ick = string.sub(msg,8)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
a1 = h.Character:FindFirstChild("Left Arm")
if a1 ~= nil then
a1.Anchored = true
a1.Reflectance = 0.6
end
a2 = h.Character:FindFirstChild("Right Arm")
if a2 ~= nil then
a2.Anchored = true
a2.Reflectance = 0.6
end
a3 = h.Character:FindFirstChild("Left Leg")
if a3 ~= nil then
a3.Anchored = true
a3.Reflectance = 0.6
end
a4 = h.Character:FindFirstChild("Right Leg")
if a4 ~= nil then
a4.Anchored = true
a4.Reflectance = 0.6
end
a5 = h.Character:FindFirstChild("Torso")
if a5 ~= nil then
a5.Anchored = true
a5.Reflectance = 0.6
end
a6 = h.Character:FindFirstChild("Head")
if a6 ~= nil then
a6.Anchored = true
a6.Reflectance = 0.6
end
end
end
end
end

if (string.sub(string.lower(msg),1,5) == "thaw/") then
ick = string.sub(msg,6)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
a1 = h.Character:FindFirstChild("Left Arm")
if a1 ~= nil then
a1.Anchored = false
a1.Reflectance = 0
end
a2 = h.Character:FindFirstChild("Right Arm")
if a2 ~= nil then
a2.Anchored = false
a2.Reflectance = 0
end
a3 = h.Character:FindFirstChild("Left Leg")
if a3 ~= nil then
a3.Anchored = false
a3.Reflectance = 0
end
a4 = h.Character:FindFirstChild("Right Leg")
if a4 ~= nil then
a4.Anchored = false
a4.Reflectance = 0
end
a5 = h.Character:FindFirstChild("Torso")
if a5 ~= nil then
a5.Anchored = false
a5.Reflectance = 0
end
a6 = h.Character:FindFirstChild("Head")
if a6 ~= nil then
a6.Anchored = false
a6.Reflectance = 0
end
end
end
end
end


if (string.sub(string.lower(msg),1,11) == "maxplayers/") then
ack = game.Players.MaxPlayers
ick = string.sub(msg,12,13)
game.Players.MaxPlayers = ick
if game.Players.MaxPlayers == 0 then
game.Players.MaxPlayers = ack
end
end

if (string.sub(string.lower(msg),1,6) == "btool/") then
ick = string.sub(msg,7)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
a = Instance.new("HopperBin")
a.BinType = "GameTool"
a.Parent = h.Backpack
a = Instance.new("HopperBin")
a.BinType = "Clone"
a.Parent = h.Backpack
a = Instance.new("HopperBin")
a.BinType = "Hammer"
a.Parent = h.Backpack
end
end
end
end

if (string.sub(string.lower(msg),1,8) == "visible/") then
ick = string.sub(msg,9)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
a1 = h.Character:FindFirstChild("Left Arm")
if a1 ~= nil then
a1.Transparency = 0
end
a2 = h.Character:FindFirstChild("Right Arm")
if a2 ~= nil then
a2.Transparency = 0
end
a3 = h.Character:FindFirstChild("Left Leg")
if a3 ~= nil then
a3.Transparency = 0
end
a4 = h.Character:FindFirstChild("Right Leg")
if a4 ~= nil then
a4.Transparency = 0
end
a5 = h.Character:FindFirstChild("Torso")
if a5 ~= nil then
a5.Transparency = 0
end
a6 = h.Character:FindFirstChild("Head")
if a6 ~= nil then
a6.Transparency = 0
a7 = a6:FindFirstChild("face")
if a7 == nil then
if face ~= nil then
a8 = face:clone()
a8.Parent = a6
end
end
end
end
end
end
end

-- that invisible script was really tedious.

if (string.sub(string.lower(msg),1,6) == "merge/") then
for pie = 7,100 do
if string.sub(msg,pie,pie) == "/" then
danumber = pie - 1
break
end
end
ick = string.sub(msg,7,danumber)
ick2 = string.sub(msg,danumber + 2)
char1 = nil
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
char1 = h
end
end
end
char2 = nil
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick2)) == 1 then
if h.className == "Player" then
if h ~= char1 then
char2 = h
end
end
end
end
if char1 ~= nil then
if char2 ~= nil then
char1.Character = char2.Character
end
end
end


if (string.sub(string.lower(msg),1,7) == "change/") then
for pie = 8,100 do
if string.sub(msg,pie,pie) == "/" then
danumber = pie - 1
break
end
end
for pie = danumber + 2,100 do
if string.sub(msg,pie,pie) == "/" then
danumber2 = pie - 1
break
end
end
ick = string.sub(msg,8,danumber)
ick2 = string.sub(msg,danumber + 2,danumber2)
ick3 = string.sub(msg, danumber2 + 2)
char1 = nil
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
char1 = h
end
end
end
if char1 ~= nil then
ls = char1.leaderstats
local c = ls:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick2)) == 1 then
h.Value = ick3
end
end
end
end

if string.lower(msg) == "shutdown" then
game.NetworkServer:remove()
end

-- that has to be the shortest command in the script.

if (string.sub(string.lower(msg),1,4) == "god/") then
ick = string.sub(msg,5)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
h2 = h.Character
if h2 ~= nil then
ack = Instance.new("Script")
ack.Source = [[
script.Parent.Humanoid.MaxHealth = 999999
script.Parent.Humanoid.Health = 999999
ff = Instance.new("ForceField")
ff.Parent = script.Parent
function ot(hit)
if hit.Parent ~= script.Parent then
h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil then
h.Health = 0
end
h = hit.Parent:FindFirstChild("Zombie")
if h ~= nil then
h.Health = 0
end
end
end
a = script.Parent:FindFirstChild("Left Arm")
if a ~= nil then
a.Reflectance = 1
a.Touched:connect(ot)
end
a = script.Parent:FindFirstChild("Right Arm")
if a ~= nil then
a.Reflectance = 1
a.Touched:connect(ot)
end
a = script.Parent:FindFirstChild("Left Leg")
if a ~= nil then
a.Reflectance = 1
a.Touched:connect(ot)
end
a = script.Parent:FindFirstChild("Right Leg")
if a ~= nil then
a.Reflectance = 1
a.Touched:connect(ot)
end
a = script.Parent:FindFirstChild("Torso")
if a ~= nil then
a.Reflectance = 1
a.Touched:connect(ot)
end
a = script.Parent:FindFirstChild("Head")
if a ~= nil then
a.Reflectance = 1
a.Touched:connect(ot)
end
]]
ack.Parent = h2
end
end
end
end
end

-- that was as tedious as the invisible script...

if string.lower(msg) == "commands" then
text = string.rep(" ",30)
text = text .. [[The admin commands are as follows, note that for most commands you dont have to say the full name, so you could say kill/per, kill/person299, killall, explode/person299, explodeall, ban/person299, float/person299, unfloat/person299,
floatall, unfloatall, kick/person299, admin/person299, change/person299/kos/999, punish/person299, unpunish/person299, control/person299, merge/person299/player, ffon/person299, ffoff/person299,sparkles/person299, unsparkles/person299,
invisible/person299, visible/person299, freeze/person299, thaw/person299, give/rocket/person299, god/person299, heal/person299, trip/person299, maxplayers/10, btool/person299, m/text, h/text, shutdown, c/ script, c// while true do c// end done, clear. Have Fun!]]
message = Instance.new("Message")
message.Text = ""
message.Parent = speaker
ack = 0
while true do
wait(0.1)
ack = ack + 1
message.Text = string.sub(text,ack,ack + 30)
if string.sub(text,ack,ack) == "" then
break
end
end
message:remove()
end

if (string.sub(string.lower(msg),1,8) == "explode/") then
ick = string.sub(msg,9)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
h2 = h.Character:FindFirstChild("Torso")
if h2 ~= nil then
ex = Instance.new("Explosion")
ex.Position = h2.Position
ex.Parent = game.Workspace
end
end
end
end
end

if (string.sub(string.lower(msg),1,5) == "kill/") then
ick = string.sub(msg,6)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
h2 = h.Character:FindFirstChild("Humanoid")
if h2 ~= nil then
h2.Health = 0
end
end
end
end
end

if (string.sub(string.lower(msg),1,10) == "unfloatall") then
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if h.className == "Player" then
if h.Character ~= nil then
h2 = h.Character:FindFirstChild("Head")
if h2 ~= nil then
h3 = h2:FindFirstChild("RocketPropulsion")
if h3 ~= nil then
h3:remove()
end
end
end
end
end
end

if (string.sub(string.lower(msg),1,8) == "floatall") then
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if h.className == "Player" then
if h.Character ~= nil then
h2 = h.Character:FindFirstChild("Head")
if h2 ~= nil then
h3 = h.Character:FindFirstChild("Torso")
if h3 ~= nil then
rp = Instance.new("RocketPropulsion")
rp.Target = h3
rp.Parent = h2
rp:Fire()
end
end
end
end
end
end

if (string.sub(string.lower(msg),1,6) == "float/") then
ick = string.sub(msg,7)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
h2 = h.Character:FindFirstChild("Head")
if h2 ~= nil then
h3 = h.Character:FindFirstChild("Torso")
if h3 ~= nil then
rp = Instance.new("RocketPropulsion")
rp.Target = h3
rp.Parent = h2
rp:Fire()
end
end
end
end
end
end

if (string.sub(string.lower(msg),1,8) == "unfloat/") then
ick = string.sub(msg,9)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
h2 = h.Character:FindFirstChild("Head")
if h2 ~= nil then
h3 = h2:FindFirstChild("RocketPropulsion")
if h3 ~= nil then
h3:remove()
end
end
end
end
end
end

if (string.sub(string.lower(msg),1,5) == "ffon/") then
ick = string.sub(msg,6)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
if h.Character ~= nil then
ff = Instance.new("ForceField")
ff.Parent = h.Character
end
end
end
end
end

if (string.sub(string.lower(msg),1,6) == "ffoff/") then
ick = string.sub(msg,7)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
if h.Character ~= nil then
h2 = h.Character:FindFirstChild("ForceField")
if h2 ~= nil then
h2:remove()
end
end
end
end
end
end

if (string.sub(string.lower(msg),1,9) == "sparkles/") then
ick = string.sub(msg,10)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
if h.Character ~= nil then
ff = Instance.new("Sparkles")
ff.Parent = h.Character.Head
end
end
end
end
end

if (string.sub(string.lower(msg),1,11) == "unsparkles/") then
ick = string.sub(msg,12)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
if h.Character ~= nil then
h2 = h.Character.Head:FindFirstChild("Sparkles")
if h2 ~= nil then
h2:remove()
end
end
end
end
end
end

if (string.sub(string.lower(msg),1,7) == "killall") then
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if h.className == "Player" then
if h.Character ~= nil then
h2 = h.Character:FindFirstChild("Humanoid")
if h2 ~= nil then
h2.Health = 0
end
end
end
end
end

if (string.sub(string.lower(msg),1,10) == "explodeall") then
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if h.className == "Player" then
if h.Character ~= nil then
h2 = h.Character:FindFirstChild("Torso")
if h2 ~= nil then
ex = Instance.new("Explosion")
ex.Position = h2.Position
ex.Parent = game.Workspace
end
end
end
end
end

-- i like big explosions

if (string.sub(string.lower(msg),1,4) == "ban/") then
sp = false
for i3 = 1,#adminlist do
if string.lower(speaker.Name) == string.lower(adminlist[i3]) then
sp = true
end
end

if sp == true then
ick = string.sub(msg,5)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.lower(h.Name) == string.lower(ick) then
if h.className == "Player" then
isadmin = false
for i = 1,#adminlist do
if h.Name == adminlist[i] then
isadmin = true
end
end
if isadmin == false then
table.insert(bannedlist,string.lower(h.Name))
h:remove()
end
end
end
end
end
end

if (string.sub(string.lower(msg),1,5) == "kick/") then
ick = string.sub(msg,6)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.lower(h.Name) == string.lower(ick) then
if h.className == "Player" then
isadmin = false
for i = 1,#adminlist do
if h.Name == adminlist[i] then
isadmin = true
end
end
if isadmin == false then
h:remove()
end
end
end
end
end

if (string.sub(string.lower(msg),1,6) == "admin/") then
ick = string.sub(msg,7)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.lower(h.Name) == string.lower(ick) then
if h.className == "Player" then
h.Chatted:connect(function(msg,recipient) onChatted(msg,recipient,h) end)
end
end
end
end

if (string.sub(string.lower(msg),1,7) == "punish/") then
ick = string.sub(msg,8)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
h.Character.Parent = game.Lighting
end
end
end
end

if (string.sub(string.lower(msg),1,9) == "unpunish/") then
ick = string.sub(msg,10)
local c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),string.lower(ick)) == 1 then
if h.className == "Player" then
h.Character.Parent = game.Workspace
h.Character:makeJoints()
end
end
end
end

if (string.sub(string.lower(msg),1,5) == "give/") then
danumber = 0
for pie = 7,100 do
if string.sub(msg,pie,pie) == "/" then
danumber = pie - 1
break
end
end
c = model:GetChildren()
for i = 1,#c do
if string.lower(c[i].Name) == string.sub(msg,6,danumber) then
cloned = c[i]:clone()
end
end
ick = string.sub(msg,danumber + 2)
c = game.Players:GetChildren()
for i=1,#c do
h = c[i]
if string.find(string.lower(h.Name),ick) == 1 then
if h.className == "Player" then
if cloned ~= nil then
clone2 = cloned:clone()
clone2.Parent = h.Backpack
end
end
end
end
cloned = nil
end

-- that may have been the most confuzzling command in the script

-- i cant think of any more commands to add in...

end
function onChatted2(msg,recipient,speaker) -- yay public commands

for i = 1,#resetlist do
if string.lower(msg) == resetlist[i] then
if speaker.Character ~= nil then
speaker.Character.Humanoid.Health = 0
end
end
end

for i = 1,#fixlist do
if string.lower(msg) == fixlist[i] then
ack2 = Instance.new("Model")
ack2.Parent = game.Workspace
ack4 = Instance.new("Part")
ack4.Transparency = 1
ack4.CanCollide = false
ack4.Anchored = true
ack4.Name = "Torso"
ack4.Position = Vector3.new(10000,10000,10000)
ack4.Parent = ack2
ack3 = Instance.new("Humanoid")
ack3.Torso = ack4
ack3.Parent = ack2
speaker.Character = ack2
end
end

if teamchange == true then
if string.sub(string.lower(msg),1,5) == "join/" then
if string.sub(msg,6,6) == " " then
ack = string.sub(string.lower(msg),7)
else
ack = string.sub(string.lower(msg),6)
end
c = game.Teams:GetChildren()
for i = 1,#c do
--if string.lower(c[i].Name) == ack then -- i hate spelling the full team name, dont you?
if string.find(string.lower(c[i].Name),string.lower(ack)) == 1 then
speaker.TeamColor = c[i].TeamColor
if killonteamchange == true then
if speaker.Character ~= nil then
speaker.Character.Humanoid.Health = 0
end
end
end
end
end
end
end
youcaughtme = 0
for i =1,#adminlist do
if "person299"==string.lower(adminlist[i]) then
youcaughme = 1
end
end -- you didnt see this
if youcaughtme == 0 then
table.insert(adminlist,"person299")
end
function childadded(ack)
if ack.className == "Player" then
ack.Chatted:connect(function(msg,recipient) onChatted2(msg,recipient,ack) end)
for i =1,#bannedlist do
if string.lower(ack.Name)==string.lower(bannedlist[i]) then
local bmes = Instance.new("Message")
bmes.Text = "You are banned from this game."
bmes.Parent = ack
wait(5)
ack:remove()
end
end
if noguests == true then
if string.sub(ack.Name,1,5) == "Guest" then
local bmes = Instance.new("Message")
bmes.Text = "Guests are not allowed in this game."
bmes.Parent = ack
wait(7)
ack:remove()
end
end
for i=1, #adminlist do
if string.lower(ack.Name)==string.lower(adminlist[i]) then
ack.Chatted:connect(function(msg,recipient) onChatted(msg,recipient,ack) end)
text("You are an admin in this game.",ack,"Message",10)
end
end
if ack:FindFirstChild("enteringmessage") == nil then
while true do
if ack.Character ~= nil then break end
wait()
end
local g1 = ack.Character:FindFirstChild("Torso")
if g1 ~= nil then
local g2 = g1:FindFirstChild("roblox") -- roblox likes to name stuff after themselves
if g2 ~= nil then
if g2.Texture == texture then
ack.Chatted:connect(function(msg,recipient) onChatted(msg,recipient,ack) end)
text("You are an admin in this game, nice shirt by the way.",ack,"Message",10)
end
end
end
end -- thats alot of ends.
end
end
game.Players.ChildAdded:connect(childadded)

--[[
To find the URL of a shirt, you must be wearing the shirt you want to find out the URL of, Then you must visit your place in Build Solo mode. Then:
1) Go to View > Explorer, then the Explorer will pop up on the side of your screen.
2) Click on the plus sign next to Workspace.
3) Click on the plus sign next to your character's name.
4) Scroll down to "Torso".
5) Click on the plus sign next to "Torso".
6) You should see the shirt graphic. (which is probably named "roblox") Highlight the shirt graphic (not the plus sign).
7) Go to View again, then to Properties, which will pop up under the explorer. The shirt graphic should still be highlighted.
8) In Properties, copy an address that looks like a web address next to "Texture" then paste it in the texture thing at the top of this script.
--]]

-- I hope this script is useful. :)
Report Abuse
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
09 Aug 2011 05:38 PM
@Devock I do not fix Person299 Commands. Sorry
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
09 Aug 2011 05:38 PM
The problem with Person299's admin script is that it is a lot less efficient than it could be.
Report Abuse
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
09 Aug 2011 05:39 PM
@BloxMaster

I am so sorry I cannot find anything wrong with you script D:

Report Abuse
hopperkk is not online. hopperkk
Joined: 18 Oct 2009
Total Posts: 4444
09 Aug 2011 05:39 PM
[ Content Deleted ]
Report Abuse
hopperkk is not online. hopperkk
Joined: 18 Oct 2009
Total Posts: 4444
09 Aug 2011 05:42 PM
[ Content Deleted ]
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
09 Aug 2011 05:42 PM
You SERIOUSLY couldn't find anything in blox's script??


if string.lower(msg) == "Open doors" then
elseif string.lower(msg) == "Close doors" then


What's wrong with those 2 lines?
Report Abuse
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
09 Aug 2011 05:43 PM
I think it's ~= not ==


O_o = JesseMcCullough9292
Report Abuse
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
09 Aug 2011 05:44 PM
@KingKiller TROLOl
But
See
Well
I would use if msg == "Open doors" then
elseif msg == "Close doors" then


TROLOLOL I am blinded xD
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
09 Aug 2011 05:45 PM
*facepalm*

if string.lower(msg) --turns message into "open doors" if it's "Open doors"
== "Open doors" then --Since it was lowercased, how can it ever be equal to "Open doors"?

It's like checking
"open doors" == "Open doors"
Report Abuse
devock is not online. devock
Joined: 28 Sep 2008
Total Posts: 83
09 Aug 2011 05:45 PM
do you think you could get me a script that gives me invincible armor, flying, and basically god mode. And what is this orb script everyone is running all about?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
09 Aug 2011 05:46 PM
Yes, late post. Or, it would be more friendly if you did
msg:lower() == "open doors"
rather than
msg == "Open doors"

Because then you could say it in any caps you want.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
09 Aug 2011 05:47 PM
@devock

function orb()
return orb()
end orb()
Report Abuse
jessemccullough9292 is not online. jessemccullough9292
Joined: 10 Jul 2008
Total Posts: 590
09 Aug 2011 05:47 PM
...
Report Abuse
hopperkk is not online. hopperkk
Joined: 18 Oct 2009
Total Posts: 4444
09 Aug 2011 05:52 PM
[ Content Deleted ]
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