|
| 20 Aug 2016 08:04 PM |
Code #1
make it DONT REMOVE WEAPONS, anything that removes the weapons pls remove that code
mapdata = game.Workspace.MapData
function checkGuis() local list = game.Workspace.MapData.GUIs:getChildren() local P = game.Players:getChildren() for i=1, #P do -- Player local G = P[i].PlayerGui:getChildren() for q=1, #G do -- Player's guis local found = false for w=1, #list do --Compare against game.Workspace.MapData.GUIs's children if G[q].Name == list[w].Name then found = true end end if found == true then G[q]:remove() end end end end
function ClearMap() mapdata.Model:ClearAllChildren() game.Lighting.None:clone().Parent = mapdata.Model game.StarterGui:ClearAllChildren() game.StarterPack:ClearAllChildren() local G = game.Workspace.StarterGui:GetChildren() for i=1, #G do G[i]:Clone().Parent = game.StarterGui end checkGuis() local P = game.Players:GetChildren() for i=1, #P do P[i].Backpack:ClearAllChildren() local Z = P[i].Character:getChildren() for z=1, #Z do if Z[z].ClassName == "Tool" then Z[z]:remove() end end end local lightChild = game.Lighting:getChildren() for i=1, #lightChild do if lightChild[i].ClassName == "Sky" then lightChild[i]:remove() end end Respawn() end
function Respawn() local Players = game.Players:getChildren() for i=1, #Players do if Players[i].TeamColor ~= BrickColor.new("White") then Players[i].TeamColor = BrickColor.new("White") Players[i]:LoadCharacter() end end local Teams = game.Teams:getChildren() for i=1, #Teams do if Teams[i].TeamColor ~= BrickColor.new("White") then Teams[i]:remove() else Teams[i].AutoAssignable = true end end end
ClearMap() script:remove()
same with code #2
newMap = script.mapVal mapdata = game.Workspace.MapData
function checkGuis() local list = game.Workspace.MapData.GUIs:getChildren() local P = game.Players:getChildren() for i=1, #P do -- Player local G = P[i].PlayerGui:getChildren() for q=1, #G do -- Player's guis local found = false for w=1, #list do --Compare against game.Workspace.MapData.GUIs's children if G[q].Name == list[w].Name then found = true end end if found == true then G[q]:remove() end end end end
function LoadMap() ClearMap() local NewMap = newMap.Value:clone() local NewMapChildren = NewMap:getChildren() for i=1, #NewMapChildren do local t = NewMapChildren[i] if t.ClassName == "Sky" then t.Parent = game.Lighting elseif t.ClassName == "Team" then t.Parent = game.Teams if game.Workspace.MapData.AutoAssign.Value == true then t.AutoAssignable = true else t.AutoAssignable = false end elseif t.ClassName == "ScreenGui" then t.Parent = game.StarterGui t:clone().Parent = game.Workspace.MapData.GUIs local P = game.Players:getChildren() for z=1, #P do local G = t:clone() G.Parent = P[z].PlayerGui end elseif t.ClassName == "Tool" then t.Parent = game.StarterPack local P = game.Players:getChildren() for z=1, #P do local G = t:clone() G.Parent = P[z].Backpack end end end
local T = game.Teams:GetChildren() if #T > 1 then for u=1, #T do if T[u].TeamColor == BrickColor.new("White") then if game.Workspace.MapData.AutoAssign.Value == true then T[u].AutoAssignable = false else T[u].AutoAssignable = true end end end else for u=1, #T do T[u].AutoAssignable = true end end NewMap.Parent = mapdata.Model end
function ClearMap() mapdata.Model:ClearAllChildren() game.StarterGui:ClearAllChildren() game.StarterPack:ClearAllChildren() local G = game.Workspace.StarterGui:GetChildren() for i=1, #G do G[i]:Clone().Parent = game.StarterGui end checkGuis() local P = game.Players:GetChildren() for i=1, #P do P[i].Backpack:ClearAllChildren() local Z = P[i].Character:getChildren() for z=1, #Z do if Z[z].ClassName == "Tool" then Z[z]:remove() end end end local lightChild = game.Lighting:getChildren() for i=1, #lightChild do if lightChild[i].ClassName == "Sky" then lightChild[i]:remove() end end Respawn() end
function Respawn() local Players = game.Players:getChildren() for i=1, #Players do if Players[i].TeamColor ~= BrickColor.new("White") then Players[i].TeamColor = BrickColor.new("White") Players[i]:LoadCharacter() end end local Teams = game.Teams:getChildren() for i=1, #Teams do if Teams[i].TeamColor ~= BrickColor.new("White") then Teams[i]:remove() else Teams[i].AutoAssignable = true end end end
LoadMap() script:remove()
THANK YOU!!!
Post to be on 40,000th post https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195345026 |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2016 08:06 PM |
pls
Post to be on 40,000th post https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195345026 |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2016 08:07 PM |
a
Post to be on 40,000th post https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195345026 |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2016 08:09 PM |
"if Z[z].ClassName == "Tool" then Z[z]:remove()" It's also usually better to use a :Destroy() call instead of a :remove().
"game.StarterPack:ClearAllChildren()"
|
|
|
| Report Abuse |
|
|
|
| 20 Aug 2016 08:10 PM |
can u rewrite the code and remove all the code like that pls
idk how to remove it properly cus the script might break
Post to be on 40,000th post https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195345026 |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Aug 2016 08:14 PM |
local P = game.Players:GetChildren() for i=1, #P do P[i].Backpack:ClearAllChildren() local Z = P[i].Character:getChildren() for z=1, #Z do if Z[z].ClassName == "Tool" then Z[z]:remove() end end end just remove that
that's it
if u can't figure it out then frick off
with Great Vengeance and Furious Anger |
|
|
| Report Abuse |
|
|
Veloric
|
  |
| Joined: 24 Jul 2013 |
| Total Posts: 12668 |
|
|
| 20 Aug 2016 08:15 PM |
sheesh thats unorganized as anything.
/Vel/ |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2016 08:41 PM |
mapdata = game.Workspace.MapData
function checkGuis() local list = game.Workspace.MapData.GUIs:getChildren() local P = game.Players:getChildren() for i=1, #P do -- Player local G = P[i].PlayerGui:getChildren() for q=1, #G do -- Player's guis local found = false for w=1, #list do --Compare against game.Workspace.MapData.GUIs's children if G[q].Name == list[w].Name then found = true end end if found == true then G[q]:remove() end end end end
function ClearMap() mapdata.Model:ClearAllChildren() game.Lighting.None:clone().Parent = mapdata.Model game.StarterGui:ClearAllChildren() local G = game.Workspace.StarterGui:GetChildren() for i=1, #G do G[i]:Clone().Parent = game.StarterGui end checkGuis() local P = game.Players:GetChildren() for i=1, #P do P[i].Backpack:ClearAllChildren() local Z = P[i].Character:getChildren() for z=1, #Z do if Z[z].ClassName == "Tool" then -- Z[z]:remove() end end end local lightChild = game.Lighting:getChildren() for i=1, #lightChild do if lightChild[i].ClassName == "Sky" then lightChild[i]:remove() end end Respawn() end
function Respawn() local Players = game.Players:getChildren() for i=1, #Players do if Players[i].TeamColor ~= BrickColor.new("White") then Players[i].TeamColor = BrickColor.new("White") Players[i]:LoadCharacter() end end local Teams = game.Teams:getChildren() for i=1, #Teams do if Teams[i].TeamColor ~= BrickColor.new("White") then Teams[i]:remove() else Teams[i].AutoAssignable = true end end end
ClearMap() script:remove()
same with code #2
newMap = script.mapVal mapdata = game.Workspace.MapData
function checkGuis() local list = game.Workspace.MapData.GUIs:getChildren() local P = game.Players:getChildren() for i=1, #P do -- Player local G = P[i].PlayerGui:getChildren() for q=1, #G do -- Player's guis local found = false for w=1, #list do --Compare against game.Workspace.MapData.GUIs's children if G[q].Name == list[w].Name then found = true end end if found == true then G[q]:remove() end end end end
function LoadMap() ClearMap() local NewMap = newMap.Value:clone() local NewMapChildren = NewMap:getChildren() for i=1, #NewMapChildren do local t = NewMapChildren[i] if t.ClassName == "Sky" then t.Parent = game.Lighting elseif t.ClassName == "Team" then t.Parent = game.Teams if game.Workspace.MapData.AutoAssign.Value == true then t.AutoAssignable = true else t.AutoAssignable = false end elseif t.ClassName == "ScreenGui" then t.Parent = game.StarterGui t:clone().Parent = game.Workspace.MapData.GUIs local P = game.Players:getChildren() for z=1, #P do local G = t:clone() G.Parent = P[z].PlayerGui end elseif t.ClassName == "Tool" then --[[t.Parent = game.StarterPack local P = game.Players:getChildren() for z=1, #P do local G = t:clone() G.Parent = P[z].Backpack end]] end end
local T = game.Teams:GetChildren() if #T > 1 then for u=1, #T do if T[u].TeamColor == BrickColor.new("White") then if game.Workspace.MapData.AutoAssign.Value == true then T[u].AutoAssignable = false else T[u].AutoAssignable = true end end end else for u=1, #T do T[u].AutoAssignable = true end end NewMap.Parent = mapdata.Model end
function ClearMap() mapdata.Model:ClearAllChildren() game.StarterGui:ClearAllChildren() --game.StarterPack:ClearAllChildren() local G = game.Workspace.StarterGui:GetChildren() for i=1, #G do G[i]:Clone().Parent = game.StarterGui end checkGuis() local P = game.Players:GetChildren() for i=1, #P do P[i].Backpack:ClearAllChildren() local Z = P[i].Character:getChildren() for z=1, #Z do if Z[z].ClassName == "Tool" then -- Z[z]:remove() end end end local lightChild = game.Lighting:getChildren() for i=1, #lightChild do if lightChild[i].ClassName == "Sky" then lightChild[i]:remove() end end Respawn() end
function Respawn() local Players = game.Players:getChildren() for i=1, #Players do if Players[i].TeamColor ~= BrickColor.new("White") then Players[i].TeamColor = BrickColor.new("White") Players[i]:LoadCharacter() end end local Teams = game.Teams:getChildren() for i=1, #Teams do if Teams[i].TeamColor ~= BrickColor.new("White") then Teams[i]:remove() else Teams[i].AutoAssignable = true end end end
LoadMap() script:remove()
|
|
|
| Report Abuse |
|
|