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
 

Script Builder - Share your epic scripts!

Previous Thread :: Next Thread 
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
09 Aug 2012 06:52 PM
Do you have an epic script that pwns? Post it!
Report Abuse
Destroyer48aus is not online. Destroyer48aus
Joined: 30 Apr 2009
Total Posts: 423
09 Aug 2012 06:53 PM
game.Workspace:Destroy()
Report Abuse
littleAU999 is not online. littleAU999
Joined: 15 Jan 2011
Total Posts: 1375
09 Aug 2012 07:06 PM
game:service'Players'. michael1784:Destroy''; -- umad
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
09 Aug 2012 07:20 PM
im going to take a shot at this, a team maker :1
local Instance.new("Team").Parent = game.Teams
game.Teams.Team.TeamName = "[Name Here]" -- is that correct? :P
end
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
09 Aug 2012 07:22 PM
game.Players.LittleAU99:Destroy() -- UJelly?
Report Abuse
iAdobe is not online. iAdobe
Joined: 22 May 2011
Total Posts: 367
09 Aug 2012 07:25 PM
@OP Yew is stewpid


local Team_service = game:GetService("Teams")

local New_Team = Instance.new("Team",Team_service)

That'll work better
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
09 Aug 2012 07:28 PM
Hehe.
Whats OP mean...?
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
10 Aug 2012 07:35 PM
Bump
Report Abuse
Dekot is not online. Dekot
Joined: 16 Jul 2010
Total Posts: 259
10 Aug 2012 07:38 PM
OP = Original Poster(Topic Creator)

--

local e, r = game:service("Teams"), Instance.new("Team", e)
r.Parent = e
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
10 Aug 2012 07:49 PM
@dekot
Instance.new('Team', game:service('Teams')).Name = 'Name here'
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
10 Aug 2012 08:54 PM
Thats what I thought it meant...
Anyways, does any one have teh Bow script, or sith? Lol
And I dont have a computer, only a phone, so dont think Im stealing your scripts, yet... xD
Report Abuse
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
10 Aug 2012 08:55 PM
Micheal, idiots like you ruin SB :c
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
10 Aug 2012 09:20 PM
Shutup, no I dont. And spell my name right.
Report Abuse
Raphael7 is not online. Raphael7
Joined: 03 Dec 2008
Total Posts: 2479
10 Aug 2012 10:03 PM
print("1337")
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
10 Aug 2012 10:28 PM
while true do end
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
10 Aug 2012 10:28 PM
Nice eyes!!!!!! xD xD xD xD
Report Abuse
orangegreenblue is not online. orangegreenblue
Joined: 04 Sep 2010
Total Posts: 10906
10 Aug 2012 10:30 PM
Instance.new("ManualSurfaceJointInstance")

-orangegreenblue, the Lua Noob
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
11 Aug 2012 03:49 PM
xD
Report Abuse
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
11 Aug 2012 04:45 PM
gaved away 108 scripts with many rares!

http://www.roblox.com/TheRedAngels-SB-Gift-3-NEW-SCRIPTS-item?id=88063410#CommentaryTab
Report Abuse
bob354293 is not online. bob354293
Joined: 26 Oct 2008
Total Posts: 2609
11 Aug 2012 04:47 PM
since nobody posted me a good one so far so here goes...

print 'Hello world!'

p = game.Players:GetChildren()
s = game.Workspace.Spawnbrick
dead = 0

function winner()
dead = 0
for _, Player in pairs(game.Players:GetPlayers()) do
local Bux1 = Player.Alive
Bux1.Value = true
end
if game.Workspace.hardness.Value == "easy" then
game.Workspace.hardness.Value = "medium"
elseif game.Workspace.hardness.Value == "medium" then
game.Workspace.hardness.Value = "hard"
elseif game.Workspace.hardness.Value == "hard" then
game.Workspace.hardness.Value = "easy"
else
game.Workspace.hardness.Value = "easy"
end
print("Winner")
wait(1)
print("CONGRATULATIONS")
game.Workspace.Round.Value = 0
game.Workspace.Time.Value = 30
game.Workspace.TimeLeft.Value = 60
if game.Workspace:findFirstChild("Terrain1") then
game.Workspace.Terrain1:remove()
elseif game.Workspace:findFirstChild("Terrain2") then
game.Workspace.Terrain2:remove()
elseif game.Workspace:findFirstChild("Terrain3") then
game.Workspace.Terrain3:remove()
elseif game.Workspace:findFirstChild("Terrain4") then
game.Workspace.Terrain4:remove()
elseif game.Workspace:findFirstChild("Terrain5") then
game.Workspace.Terrain5:remove()
else
end
end

function death()
game.Workspace.hardness.Value = "easy"
if game.Workspace:findFirstChild("Terrain1") then
game.Workspace.Terrain1:remove()
elseif game.Workspace:findFirstChild("Terrain2") then
game.Workspace.Terrain2:remove()
elseif game.Workspace:findFirstChild("Terrain3") then
game.Workspace.Terrain3:remove()
elseif game.Workspace:findFirstChild("Terrain4") then
game.Workspace.Terrain4:remove()
elseif game.Workspace:findFirstChild("Terrain5") then
game.Workspace.Terrain5:remove()
else
end
game.Workspace.Round.Value = 0
local p = game.Players:GetChildren()
for k, v in pairs(p) do
if not v then return end
if not v.Character then return end
if not v.Character.Humanoid then return end
v.Character.Humanoid.Health = 0
wait(1)
for _, Player in pairs(game.Players:GetPlayers()) do
local Bux1 = Player.Alive
Bux1.Value = true
dead = 0
end
end
end

----------------------------------------------------------------------------
function round10()
game.Workspace.Won.Value = false
game.Workspace.TimeLeft.Value = 150
game.Workspace.Time.Value = 10
game.Workspace.Gui.Value = 0
game.Workspace.Round.Value = 10
wait(1)
game.Workspace.Gui.Value = 1
wait(1)
game.Workspace.Gui.Value = 0
repeat
wait(1)
game.Workspace.Time.Value = game.Workspace.Time.Value - 1
until game.Workspace.Time.Value == 0
game.Workspace.Gui.Value = 2
wait(1)
game.Workspace.Gui.Value = 0
----------------------------
clone = game.Lighting:findFirstChild(game.Workspace.hardness.Value).Dude10:clone()
clone.Parent = game.Workspace
clone:MakeJoints()
repeat
wait(1)
game.Workspace.TimeLeft.Value = game.Workspace.TimeLeft.Value - 1
Players = game.Players:GetChildren()
for i = 1, #Players do
if Players[i]:findFirstChild("Alive").Value ~= true then
print("Dead")
dead = dead + 1
end
if dead == #Players then
game.Workspace.TimeLeft.Value = 0
dead = 0
end
end
if game.Workspace.Won.Value == true then
game.Workspace.Dude10:remove()
game.Workspace.TimeLeft.Value = 0
-------------------------------------------------------MODIFY BELOW
for i,v in pairs(game.Players:GetPlayers()) do
if v.Alive.Value == true then
game.Workspace.TimeLeft.Value = 0
local Bux = v.leaderstats.Bux
Bux.Value = (Bux.Value + 1000)
end
end
end
---------------------------------------------------- MODIFY ABOVE
until game.Workspace.TimeLeft.Value == 0
if game.Workspace.TimeLeft.Value == 0 and game.Workspace.Won.Value == false then
game.Workspace.Dude10:remove()
print("Death")
death()
else
print("Winnerzzzzzzzzzz")
winner()
end
end
---------------------------------------------------------------------------------------------------------------
function round9()
game.Workspace.TimeLeft.Value = 100
game.Workspace.Time.Value = 10
game.Workspace.Gui.Value = 0
game.Workspace.Round.Value = 9
game.Workspace.Won.Value = false
wait(1)
game.Workspace.Gui.Value = 1
wait(1)
game.Workspace.Gui.Value = 0
repeat
wait(1)
game.Workspace.Time.Value = game.Workspace.Time.Value - 1
until game.Workspace.Time.Value == 0
game.Workspace.Gui.Value = 2
wait(1)
game.Workspace.Gui.Value = 0
----------------------------
clone = game.Lighting:findFirstChild(game.Workspace.hardness.Value).Dude9:clone()
clone.Parent = game.Workspace
clone:MakeJoints()
repeat
wait(1)
game.Workspace.TimeLeft.Value = game.Workspace.TimeLeft.Value - 1
Players = game.Players:GetChildren()
for i = 1, #Players do
if Players[i]:findFirstChild("Alive").Value ~= true then
print("Dead")
dead = dead + 1
end
if dead == #Players then
game.Workspace.TimeLeft.Value = 0
dead = 0
end
end
if game.Workspace.Won.Value == true then
game.Workspace.Dude9:remove()
game.Workspace.TimeLeft.Value = 0
-------------------------------------------------------MODIFY BELOW
for i,v in pairs(game.Players:GetPlayers()) do
if v.Alive.Value == true then
game.Workspace.TimeLeft.Value = 0
local Bux = v.leaderstats.Bux
Bux.Value = (Bux.Value + 900)
end
end
end
---------------------------------------------------- MODIFY ABOVE
until game.Workspace.TimeLeft.Value == 0
if game.Workspace.TimeLeft.Value == 0 and game.Workspace.Won.Value == false then
game.Workspace.Dude8:remove()
print("Death")
death()
else
round10()
print("run round 10")
end
end

---------------------------------------------------------------------------------------------------------------
function round8()
game.Workspace.TimeLeft.Value = 95
game.Workspace.Time.Value = 10
game.Workspace.Gui.Value = 0
game.Workspace.Round.Value = 8
game.Workspace.Won.Value = false
wait(1)
game.Workspace.Gui.Value = 1
wait(1)
game.Workspace.Gui.Value = 0
repeat
wait(1)
game.Workspace.Time.Value = game.Workspace.Time.Value - 1
until game.Workspace.Time.Value == 0
game.Workspace.Gui.Value = 2
wait(1)
game.Workspace.Gui.Value = 0
----------------------------
clone = game.Lighting:findFirstChild(game.Workspace.hardness.Value).Dude8:clone()
clone.Parent = game.Workspace
clone:MakeJoints()
repeat
wait(1)
game.Workspace.TimeLeft.Value = game.Workspace.TimeLeft.Value - 1
Players = game.Players:GetChildren()
for i = 1, #Players do
if Players[i]:findFirstChild("Alive").Value ~= true then
print("Dead")
dead = dead + 1
end
if dead == #Players then
game.Workspace.TimeLeft.Value = 0
dead = 0
end
end
if game.Workspace.Won.Value == true then
game.Workspace.Dude8:remove()
game.Workspace.TimeLeft.Value = 0
-------------------------------------------------------MODIFY BELOW
for i,v in pairs(game.Players:GetPlayers()) do
if v.Alive.Value == true then
game.Workspace.TimeLeft.Value = 0
local Bux = v.leaderstats.Bux
Bux.Value = (Bux.Value + 800)
end
end
end
---------------------------------------------------- MODIFY ABOVE
until game.Workspace.TimeLeft.Value == 0
if game.Workspace.TimeLeft.Value == 0 and game.Workspace.Won.Value == false then
game.Workspace.Dude8:remove()
print("Death")
death()
else
round9()
print("run round 9")
end
end

---------------------------------------------------------------------------------------------------------------

function round7()
game.Workspace.TimeLeft.Value = 90
game.Workspace.Time.Value = 10
game.Workspace.Gui.Value = 0
game.Workspace.Round.Value = 7
game.Workspace.Won.Value = false
wait(1)
game.Workspace.Gui.Value = 1
wait(1)
game.Workspace.Gui.Value = 0
repeat
wait(1)
game.Workspace.Time.Value = game.Workspace.Time.Value - 1
until game.Workspace.Time.Value == 0
game.Workspace.Gui.Value = 2
wait(1)
game.Workspace.Gui.Value = 0
----------------------------
clone = game.Lighting:findFirstChild(game.Workspace.hardness.Value).Dude7:clone()
clone.Parent = game.Workspace
clone:MakeJoints()
repeat
wait(1)
game.Workspace.TimeLeft.Value = game.Workspace.TimeLeft.Value - 1
Players = game.Players:GetChildren()
for i = 1, #Players do
if Players[i]:findFirstChild("Alive").Value ~= true then
print("Dead")
dead = dead + 1
end
if dead == #Players then
game.Workspace.TimeLeft.Value = 0
dead = 0
end
end
if game.Workspace.Won.Value == true then
game.Workspace.Dude7:remove()
game.Workspace.TimeLeft.Value = 0
-------------------------------------------------------MODIFY BELOW
for i,v in pairs(game.Players:GetPlayers()) do
if v.Alive.Value == true then
game.Workspace.TimeLeft.Value = 0
local Bux = v.leaderstats.Bux
Bux.Value = (Bux.Value + 700)
end
end
end
---------------------------------------------------- MODIFY ABOVE
until game.Workspace.TimeLeft.Value == 0
if game.Workspace.TimeLeft.Value == 0 and game.Workspace.Won.Value == false then
game.Workspace.Dude7:remove()
print("Death")
death()
else
round8()
print("run round 8")
end
end
---------------------------------------------------------------------------------------------------------------

function round6()
game.Workspace.TimeLeft.Value = 85
game.Workspace.Time.Value = 10
game.Workspace.Gui.Value = 0
game.Workspace.Round.Value = 6
game.Workspace.Won.Value = false
wait(1)
game.Workspace.Gui.Value = 1
wait(1)
game.Workspace.Gui.Value = 0
repeat
wait(1)
game.Workspace.Time.Value = game.Workspace.Time.Value - 1
until game.Workspace.Time.Value == 0
game.Workspace.Gui.Value = 2
wait(1)
game.Workspace.Gui.Value = 0
----------------------------
clone = game.Lighting:findFirstChild(game.Workspace.hardness.Value).Dude6:clone()
clone.Parent = game.Workspace
clone:MakeJoints()
repeat
wait(1)
game.Workspace.TimeLeft.Value = game.Workspace.TimeLeft.Value -
Players = game.Players:GetChildren()
for i = 1, #Players do
if Players[i]:findFirstChild("Alive").Value ~= true then
print("Dead")
dead = dead + 1
end
if dead == #Players then
game.Workspace.TimeLeft.Value = 0
dead = 0
end
end
if game.Workspace.Won.Value == true then
game.Workspace.Dude6:remove()
game.Workspace.TimeLeft.Value = 0
-------------------------------------------------------MODIFY BELOW
for i,v in pairs(game.Players:GetPlayers()) do
if v.Alive.Value == true then
game.Workspace.TimeLeft.Value = 0
local Bux = v.leaderstats.Bux
Bux.Value = (Bux.Value + 600)
end
end
end
---------------------------------------------------- MODIFY ABOVE
until game.Workspace.TimeLeft.Value == 0
if game.Workspace.TimeLeft.Value == 0 and game.Workspace.Won.Value == false then
game.Workspace.Dude6:remove()
print("Death")
death()
else
round7()
print("run round 7")
end
end


----------------------------------------------------------------------------------------------------------------
function round5()
game.Lighting.Terrain.Terrain5:clone().Parent = game.Workspace
game.Workspace.TimeLeft.Value = 80
game.Workspace.Time.Value = 10
game.Workspace.Gui.Value = 0
game.Workspace.Round.Value = 5
game.Workspace.Won.Value = false
wait(1)
game.Workspace.Gui.Value = 1
wait(1)
game.Workspace.Gui.Value = 0
repeat
wait(1)
game.Workspace.Time.Value = game.Workspace.Time.Value - 1
until game.Workspace.Time.Value == 0
game.Workspace.Gui.Value = 2
wait(1)
game.Workspace.Gui.Value = 0
----------------------------
clone = game.Lighting:findFirstChild(game.Workspace.hardness.Value).Dude5:clone()
clone.Parent = game.Workspace
clone:MakeJoints()
repeat
wait(1)
game.Workspace.TimeLeft.Value = game.Workspace.TimeLeft.Value - 1
Players = game.Players:GetChildren()
for i = 1, #Players do
if Players[i]:findFirstChild("Alive").Value ~= true then
print("Dead")
dead = dead + 1
end
if dead == #Players then
game.Workspace.TimeLeft.Value = 0
dead = 0
end
end
if game.Workspace.Won.Value == true then
game.Workspace.Dude5:remove()
game.Workspace.TimeLeft.Value = 0
-------------------------------------------------------MODIFY BELOW
for i,v in pairs(game.Players:GetPlayers()) do
if v.Alive.Value == true then
game.Workspace.TimeLeft.Value = 0
local Bux = v.leaderstats.Bux
Bux.Value = (Bux.Value + 500)
end
end
end
---------------------------------------------------- MODIFY ABOVE
until game.Workspace.TimeLeft.Value == 0
if game.Workspace.TimeLeft.Value == 0 and game.Workspace.Won.Value == false then
game.Workspace.Dude5:remove()
print("Death")
if game.Workspace:findFirstChild("Terrain5") then
game.Workspace.Terrain5:remove()
end
death()
else
if game.Workspace:findFirstChild("Terrain5") then
game.Workspace.Terrain5:remove()
end
round6()
print("run round 6")
end
end


---------------------------------------------------------173 SECONDS

function round4()
game.Lighting.Terrain.Terrain4:clone().Parent = game.Workspace
game.Workspace.TimeLeft.Value = 75
game.Workspace.Time.Value = 10
game.Workspace.Gui.Value = 0
game.Workspace.Round.Value = 4
game.Workspace.Won.Value = false
wait(1)
game.Workspace.Gui.Value = 1
wait(1)
game.Workspace.Gui.Value = 0
repeat
wait(1)
game.Workspace.Time.Value = game.Workspace.Time.Value - 1
until game.Workspace.Time.Value == 0
game.Workspace.Gui.Value = 2
wait(1)
game.Workspace.Gui.Value = 0
----------------------------
clone = game.Lighting:findFirstChild(game.Workspace.hardness.Value).Dude4:clone()
clone.Parent = game.Workspace
clone:MakeJoints()
repeat
wait(1)
game.Workspace.TimeLeft.Value = game.Workspace.TimeLeft.Value - 1
Players = game.Players:GetChildren()
for i = 1, #Players do
if Players[i]:findFirstChild("Alive").Value ~= true then
print("Dead")
dead = dead + 1
end
if dead == #Players then
game.Workspace.TimeLeft.Value = 0
dead = 0
end
end
if game.Workspace.Won.Value == true then
game.Workspace.Dude4:remove()
game.Workspace.TimeLeft.Value = 0
-------------------------------------------------------MODIFY BELOW
for i,v in pairs(game.Players:GetPlayers()) do
if v.Alive.Value == true then
game.Workspace.TimeLeft.Value = 0
local Bux = v.leaderstats.Bux
Bux.Value = (Bux.Value + 400)
end
end
end
---------------------------------------------------- MODIFY ABOVE
until game.Workspace.TimeLeft.Value == 0
if game.Workspace.TimeLeft.Value == 0 and game.Workspace.Won.Value == false then
game.Workspace.Dude4:remove()
print("Death")
if game.Workspace:findFirstChild("Terrain4") then
game.Workspace.Terrain4:remove()
end
death()
else
if game.Workspace:findFirstChild("Terrain4") then
game.Workspace.Terrain4:remove()
end
round5()
print("run round 5")
end
end


------------------------------------------------
function round3()
game.Lighting.Terrain.Terrain3:clone().Parent = game.Workspace
game.Workspace.TimeLeft.Value = 70
game.Workspace.Time.Value = 10
game.Workspace.Gui.Value = 0
game.Workspace.Round.Value = 3
game.Workspace.Won.Value = false
wait(1)
game.Workspace.Gui.Value = 1
wait(1)
game.Workspace.Gui.Value = 0
repeat
wait(1)
game.Workspace.Time.Value = game.Workspace.Time.Value - 1
until game.Workspace.Time.Value == 0
game.Workspace.Gui.Value = 2
wait(1)
game.Workspace.Gui.Value = 0
----------------------------
clone = game.Lighting:findFirstChild(game.Workspace.hardness.Value).Dude3:clone()
clone.Parent = game.Workspace
clone:MakeJoints()
repeat
wait(1)
game.Workspace.TimeLeft.Value = game.Workspace.TimeLeft.Value - 1
Players = game.Players:GetChildren()
for i = 1, #Players do
if Players[i]:findFirstChild("Alive").Value ~= true then
print("Dead")
dead = dead + 1
end
if dead == #Players then
game.Workspace.TimeLeft.Value = 0
dead = 0
end
end
if game.Workspace.Won.Value == true then
game.Workspace.Dude3:remove()
game.Workspace.TimeLeft.Value = 0
-------------------------------------------------------MODIFY BELOW
for i,v in pairs(game.Players:GetPlayers()) do
if v.Alive.Value == true then
game.Workspace.TimeLeft.Value = 0
local Bux = v.leaderstats.Bux
Bux.Value = (Bux.Value + 300)
end
end
end
---------------------------------------------------- MODIFY ABOVE
until game.Workspace.TimeLeft.Value == 0
if game.Workspace.TimeLeft.Value == 0 and game.Workspace.Won.Value == false then
game.Workspace.Dude3:remove()
print("Death")
death()
if game.Workspace:findFirstChild("Terrain3") then
game.Workspace.Terrain3:remove()
end
else
if game.Workspace:findFirstChild("Terrain3") then
game.Workspace.Terrain3:remove()
end
round4()
print("run round 4")
end
end
--------------------------------------------------
function round2()
game.Lighting.Terrain.Terrain2:clone().Parent = game.Workspace
game.Workspace.TimeLeft.Value = 65
game.Workspace.Time.Value = 10
game.Workspace.Gui.Value = 0
game.Workspace.Round.Value = 2
game.Workspace.Won.Value = false
wait(1)
game.Workspace.Gui.Value = 1
wait(1)
game.Workspace.Gui.Value = 0
repeat
wait(1)
game.Workspace.Time.Value = game.Workspace.Time.Value - 1
until game.Workspace.Time.Value == 0
game.Workspace.Gui.Value = 2
wait(1)
game.Workspace.Gui.Value = 0
----------------------------
clone = game.Lighting:findFirstChild(game.Workspace.hardness.Value).Dude2:clone()
clone.Parent = game.Workspace
clone:MakeJoints()
repeat
wait(1)
game.Workspace.TimeLeft.Value = game.Workspace.TimeLeft.Value - 1
Players = game.Players:GetChildren()
for i = 1, #Players do
if Players[i]:findFirstChild("Alive").Value ~= true then
print("Dead")
dead = dead + 1
end
if dead == #Players then
game.Workspace.TimeLeft.Value = 0
dead = 0
end
end
if game.Workspace.Won.Value == true then
game.Workspace.Dude2:remove()
game.Workspace.TimeLeft.Value = 0
-------------------------------------------------------MODIFY BELOW
for i,v in pairs(game.Players:GetPlayers()) do
if v.Alive.Value == true then
game.Workspace.TimeLeft.Value = 0
local Bux = v.leaderstats.Bux
Bux.Value = (Bux.Value + 200)
end
end
end
---------------------------------------------------- MODIFY ABOVE
until game.Workspace.TimeLeft.Value == 0
if game.Workspace.TimeLeft.Value == 0 and game.Workspace.Won.Value == false then
game.Workspace.Dude2:remove()
print("Death")
if game.Workspace:findFirstChild("Terrain2") then
game.Workspace.Terrain2:remove()
end
death()
else
if game.Workspace:findFirstChild("Terrain2") then
game.Workspace.Terrain2:remove()
end
round3()
print("run round 3")
end
end
--------------------------------------------------

function round1()
game.Lighting.Terrain.Terrain1:clone().Parent = game.Workspace
game.Workspace.TimeLeft.Value = 60
game.Workspace.Time.Value = 20
game.Workspace.Gui.Value = 0
game.Workspace.Round.Value = 1
game.Workspace.Won.Value = false
wait(1)
game.Workspace.Gui.Value = 1
wait(1)
game.Workspace.Gui.Value = 0
repeat
wait(1)
game.Workspace.Time.Value = game.Workspace.Time.Value - 1
until game.Workspace.Time.Value == 0
for _, Player in pairs(game.Players:GetPlayers()) do
local Bux1 = Player.Alive
Bux1.Value = true
end
----------------------------------------------------- TELEPORT
p = game.Players:GetChildren()
for i = 1, #p do
if game.Workspace:findFirstChild(p[i].Name) then
p[i].Character.Torso.CFrame = s.CFrame * CFrame.new(math.random(-3,3),8,math.random(-3,3))
wait(5)
end
end
------------------------------------------------------ TELEPORT
game.Workspace.Gui.Value = 2
wait(1)
game.Workspace.Gui.Value = 0
----------------------------
clone = game.Lighting:findFirstChild(game.Workspace.hardness.Value).Dude1:clone()
clone.Parent = game.Workspace
clone:MakeJoints()
repeat
wait(1)
game.Workspace.TimeLeft.Value = game.Workspace.TimeLeft.Value - 1
Players = game.Players:GetChildren()
for i = 1, #Players do
if Players[i]:findFirstChild("Alive").Value ~= true then
print("Dead")
dead = dead + 1
end
if dead == #Players then
game.Workspace.TimeLeft.Value = 0
dead = 0
else
end
end
if game.Workspace.Won.Value == true then
game.Workspace.Dude1:remove()
game.Workspace.TimeLeft.Value = 0
-------------------------------------------------------MODIFY BELOW
for i,v in pairs(game.Players:GetPlayers()) do
if v.Alive.Value == true then
game.Workspace.TimeLeft.Value = 0
local Bux = v.leaderstats.Bux
Bux.Value = (Bux.Value + 100)
end
end
end
---------------------------------------------------- MODIFY ABOVE
until game.Workspace.TimeLeft.Value == 0
if game.Workspace.TimeLeft.Value == 0 and game.Workspace.Won.Value == false then
game.Workspace.Dude1:remove()
print("Death")
if game.Workspace:findFirstChild("Terrain1") then
game.Workspace.Terrain1:remove()
end
death()
else
if game.Workspace:findFirstChild("Terrain1") then
game.Workspace.Terrain1:remove()
end
round2()
print("run round 2")
end
end



while true do
wait(1)
if game.Workspace.Round.Value == 0 then
round1()
else
wait()
end
end
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
11 Aug 2012 05:25 PM
Umg... Nice, yet long xD
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
11 Aug 2012 05:28 PM
@Michael: lol...

@Bob: Lol so are we just saying random scripts now for the fun of it?

Here's the script to my new bread factory (all in 1 script, from the train to conveyor to admin commands):

local clearOutput = true;
local admins = {"player", "dr01d3k4", "yrreb", "coxyoo", "steven1411"};
local banned = { };
local uncookedColor = BrickColor.new("Pastel brown"); -- Or nougat
local cookedColor = BrickColor.new("Reddish brown");
local trainReal, trainClone;
local trainEngines = { };
local engVel = 9.9e+005; -- 990,000
local trainDir = 0;
local trainGui, plrGui = script.DriveGui, nil;
local breadDoor, breadDoorOpen;
local breadDeposit, breadCount, countHint;

-- Admin controllable stuff
local crazyY = false;
local breadMachinesOn = true;
local breadDoorOn = true;
local trainEngineOn = true;
local convSpeed = {10, 10}; -- First is current, second is original
local trainSpeed = {60, 60};
local breadMakeSpeed = {1, 1}; -- Debounce time

-- Shows a message to the workspace
function message(txt)
local m = Instance.new("Message", workspace);
m.Text = txt;
delay(5, function () m:Destroy(); end);
end

-- Checks whether string "sq" is in table tbl - used like isInTable(admins, "dr01d3k4")
function isInTable(tbl, sq)
for _, a in pairs(tbl) do
if (sq:lower() == a:lower()) then return true; end
end
return false;
end

-- Same as above but the table is game.Players:GetChildren() and checks name
function isInPlayers(sq)
for _, a in pairs(game.Players:GetChildren()) do
if (sq:lower() == a.Name:lower()) then return true; end
end
return false;
end

-- Used for unbanning and unadmining
function removeFromTable(tbl, sq)
for i, a in pairs(tbl) do
if (sq:lower() == a:lower()) then tbl[i] = ""; end
end
end

-- Checks whether table tbl is found at all in string sq - spaces removed
function isInString(tbl, sq)
for _, a in pairs(tbl) do
if (sq:lower() == a:lower()) then return true; end
if (sq:lower():find(a:lower())) then return true; end
if (sq:lower():gsub(" ", ""):find(a:lower():gsub(" ", ""))) then return; end
end
return false;
end

-- Called when there are no admins left in the game
function resetDefaultGame()
lockAll(workspace);
convSpeed[1] = convSpeed[2];
trainSpeed[1] = trainSpeed[2];
crazyY = false;
breadMachinesOn = true;
breadDoorOn = false;
trainEngineOn = false;
updateConveyors(convSpd);
changeTrainDir(trainDir, true);
end

-- Locks everything in the workspace apart from bread
function lockAll(par)
for _, p in pairs(par:GetChildren()) do
if (p:IsA("BasePart")) then p.Locked = not (p.Name == "Bread"); end
if (p:IsA("Model")) then lockAll(p); end
end
end

-- Sets the speed of all the conveyor belts. If crazyY is true, then adds vertical velocity as well.
function updateConveyors()
for _, p in pairs(workspace:GetChildren()) do
if ((p:IsA("BasePart")) and (p.Name == "ConveyorBelt")) then
local dir = p.Direction.Value;
if (crazyY) then dir = Vector3.new(dir.x, 1, dir.y); end
p.Velocity = dir * convSpeed[1];
p.Friction = 0.3;
p.Elasticity = 0;
p.FrontSurface = "Smooth";
end
end
end

-- Finds all bread makers, resets the OrigBread, function for making bread
function setUpBreadMachines()
for _, breadMaker in pairs(workspace:GetChildren()) do
if ((breadMaker:IsA("Model")) and (breadMaker.Name == "BreadMaker")) then
local origBread = breadMaker.OrigBread;
origBread.Anchored = true;
origBread.Locked = true;
origBread.CanCollide = false;
origBread.BrickColor = uncookedColor;
origBread.Transparency = 1;
origBread.Name = "OrigBread";
breadMaker.MakeBread.Touched:connect(function (p)
if (not p.Parent:findFirstChild("Humanoid")) then return; end -- Not a player
if (not breadMachinesOn) then return; end -- Machine off
if (breadMaker.Debounce.Value) then return; end -- Debounce
breadMaker.Debounce.Value = true;
local newBread = origBread:Clone();
newBread.Name = "Bread";
newBread.CFrame = origBread.CFrame * CFrame.new(0, -2, 0);
newBread.CanCollide = true;
newBread.BrickColor = uncookedColor;
newBread.Locked = false;
newBread.Anchored = false;
newBread.Transparency = 0;
newBread.Friction = 0.3;
newBread.Elasticity = 0;
newBread.Parent = workspace;
-- newBread.RotVelocity = Vector3.new(math.random(1, 10) / 5, math.random(1, 10) / 5, math.random(1, 10) / 5);
wait(breadMakeSpeed[1]);
breadMaker.Debounce.Value = false;
end);
end
end
end

-- Sets up the red cooking part in the oven to colour bread
function setUpOven()
local oven = workspace:findFirstChild("Oven");
if (oven == nil) then return; end
local c = oven.Cooker;
c.BrickColor = BrickColor.new("Bright red");
c.Transparency = 0;
c.Reflectance = 0.5;
c.CanCollide = false;
local fc = oven.FakeCooker;
fc.BrickColor = c.BrickColor;
fc.Transparency = c.Transparency;
fc.Reflectance = c.Reflectance;
fc.CanCollide = c.CanCollide;
c.Touched:connect(function (p)
if (p.Name == "Bread") then p.BrickColor = cookedColor;
elseif (p.Parent:findFirstChild("Humanoid")) then p.BrickColor = BrickColor.random(); end
end);
end

-- Opens/closes the bread door
function toggleBreadDoor(newOpen)
breadDoorOpen = newOpen;
if (not breadDoorOn) then breadDoorOpen = false; end
breadDoor.CanCollide = not breadDoorOpen;
breadDoor.Transparency = breadDoorOpen and 1 or 0;
end

-- Sets up the bread door to be at the default transparency
function setUpBreadDoor()
breadDoor = workspace.BreadDoor;
breadDoor.BrickColor = BrickColor.new("Black");
breadDoor.Reflectance = 0.2;
toggleBreadDoor(true);
end

-- Sets up the bread deposit (counts the amount of bread delivered)
function setUpBreadDeposit()
breadDeposit = workspace.BreadDeposit;
breadCount = 0;
countHint = Instance.new("Hint", workspace);
countHint.Text = breadCount.." loaves of bread delivered."
breadDeposit.BrickColor = BrickColor.new("Black");
breadDeposit.CanCollide = false;
breadDeposit.Touched:connect(function (part)
if (part.Name ~= "Bread") then return; end
if (part.BrickColor ~= cookedColor) then return; end
breadCount = breadCount + 1;
countHint.Text = breadCount.." "..((breadCount == 1) and "loaf" or "loaves").." of bread delivered."
delay(5, function () part:Destroy(); end);
end);
end

-- The teleports that allow you to go between the factory and deposit
function setUpTeleports()
local tele = workspace.Teleports;
local p1 = tele.Pad1;
local p2 = tele.Pad2;
p1.Name = "To Bread Deposit";
p2.Name = "To Factory";
local padDb = false;
local function teleTouched(p, pad, oth)
if (not p.Parent:findFirstChild("Humanoid")) then return; end
if (padDB) then return; end
padDB = true;
pad.BrickColor = BrickColor.new("Black");
oth.BrickColor = BrickColor.new("Black");
p.Parent.Torso.CFrame = oth.CFrame * CFrame.new(0, 3, 0);
wait(1);
pad.BrickColor = BrickColor.new("White");
oth.BrickColor = BrickColor.new("White");
padDB = false;
end
p1.Head.Touched:connect(function (p) teleTouched(p, p1.Head, p2.Head); end);
p2.Head.Touched:connect(function (p) teleTouched(p, p2.Head, p1.Head); end);
end

-- Clones the original train for regenning
function setUpTrain()
trainReal = workspace.Train;
trainClone = trainReal:Clone();
trainReal:Destroy();
wait(1);
regenTrain();
end

-- Changes the direction of the train and the velocity of engines
function changeTrainDir(newDir, adminChanging)
if (trainReal == nil) then return; end
if (trainEngines == { }) then return; end
if ((not trainEngineOn) and (not adminChanging)) then return; end -- This means that if it's locked, only admins can change
trainDir = newDir;
for _, eng in pairs(trainEngines) do
if (eng:findFirstChild("BodyVelocity")) then
eng.BodyVelocity.velocity = Vector3.new(trainSpeed[1] * trainDir, 0, 0);
end
end
end

-- Regenerates the train and sets it up - unanchors everything, gets the engines, adds bodyvelocity, connects the events
function regenTrain()
if (trainReal) then trainReal:Destroy(); end
if (plrGui) then plrGui:Destroy(); plrGui = nil; end
trainDir = 0;
trainEngines = { };
wait();
trainReal = trainClone:Clone();
trainReal.Parent = workspace;
trainReal:MakeJoints();
for _, p in pairs(trainReal:GetChildren()) do
if (p:IsA("BasePart")) then
p.Anchored = false;
end
if (p.Name == "Engine") then
trainEngines[#trainEngines + 1] = p;
p.Elasticity = 0;
p.Friction = 0;
end
if (p.Name == "FakeEngine") then
p.Elasticity = 0;
p.Friction = 0;
end
end
trainReal:MakeJoints();
for _, eng in pairs(trainEngines) do
local bv = Instance.new("BodyVelocity", eng);
bv.Name = "BodyVelocity";
bv.P = engVel;
bv.maxForce = Vector3.new(engVel, 0, 0);
bv.velocity = Vector3.new(0, 0, 0);
end
local drivSeat = trainReal.DriverSeat;
drivSeat.ChildAdded:connect(function (obj)
if (not obj:IsA("Weld")) then return; end
local tors = obj.Part1;
local plr = game.Players:findFirstChild(tors.Parent.Name);
if (plr == nil) then return; end
if (plrGui ~= nil) then plrGui:Destroy(); plrGui = nil; end
plrGui = trainGui:Clone();
plrGui.Parent = plr.PlayerGui;
plrGui.Buttons.Forward.MouseButton1Click:connect(function ()
changeTrainDir(1, false);
end);
plrGui.Buttons.Stop.MouseButton1Click:connect(function ()
changeTrainDir(0, false);
end);
plrGui.Buttons.Reverse.MouseButton1Click:connect(function ()
changeTrainDir(-1, false);
end);
end);
drivSeat.ChildRemoved:connect(function (obj)
if (not obj:IsA("Weld")) then return; end
if (plrGui ~= nil) then
plrGui:Destroy();
plrGui = nil;
end
changeTrainDir(0);
end);
end

-- Player added to game - when their character resets, recolour it, and connect the chatted event
game.Players.ChildAdded:connect(function (newPlayer)
if (isInTable(banned, newPlayer.Name)) then
newPlayer:Destroy();
return;
end
newPlayer.CharacterAdded:connect(function ()
wait(1);
local char = newPlayer.Character;
repeat wait(0.1); until (char:findFirstChild("Body Colors"));
wait(5);
local col = char:findFirstChild("Body Colors");
local parts = {"Head", "Torso", "Left Arm", "Right Arm", "Left Leg", "Right Leg"};
for _, p in pairs(parts) do
local colName = (p:gsub(" ", "")).."Color";
if (char[p]) then
char[p].BrickColor = col[colName];
end
end
end);
newPlayer.Chatted:connect(function (message)
local msg = message:lower();
if (isInString({"/open", "/door", "/opendoor", "/close", "/closedoor"}, msg)) then
toggleBreadDoor(not breadDoorOpen);
end
if (isInString({"/regentrain"}, msg)) then
regenTrain();
end
if (msg:gsub(" ", ""):sub(1, 7) == "/killme") then
if (newPlayer.Character) then newPlayer.Character.Humanoid.Health = 0; end
end
if (isInTable(admins, newPlayer.Name)) then -- Admin commands :D
if (isInString({"/crazyy"}, msg)) then
if (isInString({"on", "yes"}, msg)) then
message("Enabling crazy Y bread");
crazyY = true;
end
if (isInString({"off", "no"}, msg)) then
message("Disabling crazy Y bread");
crazyY = false;
end
updateConveyors();
end
if (isInString({"/conveyorspeed", "/convspeed", "/convspd", "/conveyorspd"}, msg)) then
local spd = msg:gsub(" ", ""):match("%d+");
if (spd ~= nil) then
if (tonumber(spd) ~= nil) then
convSpeed[1] = tonumber(spd);
message("Conveyor belt speed changed to "..convSpeed[1]);
updateConveyors();
end
end
end
if (isInString({"/trainspeed", "/trainspd"}, msg)) then
local spd = msg:gsub(" ", ""):match("%d+");
if (spd ~= nil) then
if (tonumber(spd) ~= nil) then
trainSpeed[1] = tonumber(spd);
message("Train speed changed to "..trainSpeed[1]);
changeTrainDir(trainDir, true);
end
end
end
if (isInString({"/traindirection", "/traindir"}, msg)) then
if (isInString({"forward", "go", "1"}, msg)) then
message("Train direction: forward");
changeTrainDir(1, true);
end
if (isInString({"stop", "0"}, msg)) then
message("Train direction: stopped");
changeTrainDir(0, true);
end
if (isInString({"reverse", "backwards", "-1"}, msg)) then
message("Train direction: reverse");
changeTrainDir(-1, true);
end
end
if (isInString({"/breadmachine"}, msg)) then
if (isInString({"on", "yes"}, msg)) then
message("Turning bread machines on");
breadMachinesOn = true;
end
if (isInString({"off", "no"}, msg)) then
message("Turning bread machines off");
breadMachinesOn = false;
end
end
if (isInString({"/breaddoor"}, msg)) then
if (isInString({"on", "yes"}, msg)) then
message("Unlocking door");
breadDoorOn = false;
end
if (isInString({"off", "no"}, msg)) then
message("Locking door");
breadDoorOn = true;
toggleBreadDoor(false);
end
end
if (isInString({"/traineng", "/trainengine"}, msg)) then
if (isInString({"on", "yes"}, msg)) then
message("Unlocking train controls");
trainEngineOn = true;
end
if (isInString({"off", "no"}, msg)) then
message("Locking train controls");
trainEngineOn = false;
end
end
if (msg:sub(1, 4) == "/ban") then
local plrNm = msg:sub(6);
if ((isInPlayers(game.Players:GetChildren(), plrNm)) and (not isInTable(admins, plrNm))) then -- Can't ban admins!
print("Banning player \""..plrNm.."\"");
for _, p in pairs(game.Players:GetChildren()) do
if (p.Name:lower() == plrNm) then
p:Destroy();
end
end
banned[#banned + 1] = plrNm;
end
end
if (msg:sub(1, 6) == "/admin") then
local plrNm = msg:sub(8);
if ((isInPlayers(game.Players:GetChildren(), plrNm)) and (not isInTable(admins, plrNm))) then -- Not already in table, but in game
print("Admining player \""..plrNm.."\"");
admins[#admins + 1] = plrNm;
end
end
if (msg:sub(1, 6) == "/unban") then
local plrNm = msg:sub(8);
removeFromTable(banned, plrNm);
end
if (msg:sub(1, 9) == "/unadmin") then
local plrNm = msg:sub(11);
if (plrNm == "dr01d3k4") then return; end -- Can't unadmin me ^0^
removeFromTable(admin, plrNm);
end
end
end);
end);

-- This is to check when there are no admins left and the game should reset to default values
game.Players.ChildRemoved:connect(function (oldPlayer)
local adminAmount = 0;
for _, p in pairs(game.Players:GetChildren()) do
if (isInTable(admins, p.Name, false)) then adminAmount = adminAmount + 1; end
end
if (adminAmount == 0) then
resetDefaultGame();
end
end);

wait(1);
if (clearOutput) then
for a = 1, 250 do print() end
wait(2);
end
print("Loading up the factory");
lockAll(workspace);
updateConveyors();
setUpBreadMachines();
setUpOven();
setUpBreadDoor();
setUpBreadDeposit();
setUpTeleports();
setUpTrain();
workspace.InvisibleStop.Transparency = 1;
for _, r in pairs(workspace.Rails:GetChildren()) do
r.Elasticity = 0;
r.Friction = 0;
end
Report Abuse
ServerLabs is not online. ServerLabs
Joined: 29 Dec 2010
Total Posts: 2263
11 Aug 2012 05:29 PM
There's already a post like this by ArticunoX (I think that's his name)

Get out.
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
11 Aug 2012 05:37 PM
He says to just share scripts. I say share epic scripts. xD
Umad?
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
11 Aug 2012 05:39 PM
No.
Umad?


【MᴀssɪᴠᴇGᴍᴀɴ】 -Paradoxical
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 2Go to page: [1], 2 Next
 
 
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