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: How many ends and where do they belong in this script?

Previous Thread :: Next Thread 
DevToTo129RBLX is not online. DevToTo129RBLX
Joined: 26 Feb 2010
Total Posts: 1971
08 Jun 2014 08:12 AM
Ouch my fingers hurt actually. 45 Minutes worth it

local forever = 0
local gt = game.ScreenGui.MessageBox
local color1 = game.Workspace.Colors1
repeat
local inter = 0
repeat
wait(1)
gt.Text = "Intermission."
wait(1) --Inall this is 3 seconds per repeat.9 Inall seconds intermission.
gt.Text = "Intermission.."
wait(1)
gt.Text = "Intermission..."
inter = inter + 1
until inter==3
gt.Text = "Choosing Map..."
wait(3)
local gamemap = math.random(1,2) --2 Maps to chose from
if gamemap==1 then
local clone1 = game.Lighting.Colors1:Clone()
clone1.Parent = game.Workspace
gt.Text = "Map Chosen : #1"
wait(3)
target = CFrame.new(16.9, 59.8, 85.8) --Teleport all players to the map.
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = target + Vector3.new(0, i * 2, 0)
wait(2)
gt.Text = "Get ready to begin!!!"
wait(2)
gt.Text = "Go!!!"
local times = 0
local color1 = game.Workspace.Colors1
repeat
times = times+1
local a = math.random(1,2) --Green Or Other
if a==1 then
gt.Text = "Green"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
else
local b = math.random(1,2) --Blue or Other
if b==1 then
gt.Text = "Blue"
wait(4)
color1.Green.CanCollide = false
color1.Orange.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Green.CanCollide = true
color1.Orange.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
else
local c = math.random(1,2) --Orange or Other
if c==1 then
gt.Text = "Orange"
wait(4)
color1.Blue.CanCollide = false
color1.Green.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Green.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
else
local d = math.random(1,2) --Purple or Other
if d==1 then
gt.Text = "Purple"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
else
local e = math.random(1,2) --Red or Yellow
if e==1 then
gt.Text = "Red"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Purple.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Purple.CanCollide = true
color1.Yellow.CanCollide = true
else
gt.Text = "Yellow"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Red.CanCollide = false
color1.Purple.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Red.CanCollide = true
color1.Purple.CanCollide = true
until times==10
local a = math.random(1,2) --Green Or Other
if a==1 then
gt.Text = "Green"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Green
else
local b = math.random(1,2) --Blue or Other
if b==1 then
gt.Text = "Blue"
wait(4)
color1.Green.CanCollide = false
color1.Orange.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Green.CanCollide = true
color1.Orange.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Blue
else
local c = math.random(1,2) --Orange or Other
if c==1 then
gt.Text = "Orange"
wait(4)
color1.Blue.CanCollide = false
color1.Green.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Green.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Orange
else
local d = math.random(1,2) --Purple or Other
if d==1 then
gt.Text = "Purple"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Purple
else
local e = math.random(1,2) --Red or Yellow
if e==1 then
gt.Text = "Red"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Purple.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Purple.CanCollide = true
color1.Yellow.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Red
else
gt.Text = "Yellow"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Red.CanCollide = false
color1.Purple.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Red.CanCollide = true
color1.Purple.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Yellow
color1:Destroy()
else
local clone2 = game.Lighting.Stack:Clone()
clone2.Parent = game.Workspace
gt.Text = "Map Chosen : Stack"
wait(3)
target = CFrame.new(16.9, 59.8, 85.8) --Teleport all players to the map.
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = target + Vector3.new(0, i * 2, 0)
wait(2)
gt.Text = "Get ready to begin!!!"
wait(2)
gt.Text = "Go!!!"
local times = 0
local color1 = game.Workspace.Stack
repeat
times = times+1
local a = math.random(1,2) --Green Or Other
if a==1 then
gt.Text = "Green"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
else
local b = math.random(1,2) --Blue or Other
if b==1 then
gt.Text = "Blue"
wait(4)
color1.Green.CanCollide = false
color1.Orange.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Green.CanCollide = true
color1.Orange.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
else
local c = math.random(1,2) --Orange or Other
if c==1 then
gt.Text = "Orange"
wait(4)
color1.Blue.CanCollide = false
color1.Green.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Green.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
else
local d = math.random(1,2) --Purple or Other
if d==1 then
gt.Text = "Purple"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
else
local e = math.random(1,2) --Red or Yellow
if e==1 then
gt.Text = "Red"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Purple.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Purple.CanCollide = true
color1.Yellow.CanCollide = true
else
gt.Text = "Yellow"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Red.CanCollide = false
color1.Purple.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Red.CanCollide = true
color1.Purple.CanCollide = true
until times==10
local a = math.random(1,2) --Green Or Other
if a==1 then
gt.Text = "Green"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Green
else
local b = math.random(1,2) --Blue or Other
if b==1 then
gt.Text = "Blue"
wait(4)
color1.Green.CanCollide = false
color1.Orange.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Green.CanCollide = true
color1.Orange.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Blue
else
local c = math.random(1,2) --Orange or Other
if c==1 then
gt.Text = "Orange"
wait(4)
color1.Blue.CanCollide = false
color1.Green.CanCollide = false
color1.Purple.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Green.CanCollide = true
color1.Purple.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Orange
else
local d = math.random(1,2) --Purple or Other
if d==1 then
gt.Text = "Purple"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Red.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Red.CanCollide = true
color1.Yellow.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Purple
else
local e = math.random(1,2) --Red or Yellow
if e==1 then
gt.Text = "Red"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Purple.CanCollide = false
color1.Yellow.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Purple.CanCollide = true
color1.Yellow.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Red
else
gt.Text = "Yellow"
wait(4)
color1.Blue.CanCollide = false
color1.Orange.CanCollide = false
color1.Green.CanCollide = false
color1.Red.CanCollide = false
color1.Purple.CanCollide = false
wait(2)
color1.Blue.CanCollide = true
color1.Orange.CanCollide = true
color1.Green.CanCollide = true
color1.Red.CanCollide = true
color1.Purple.CanCollide = true
local script = game.Lighting.Points:Clone()
script.Parent = color1.Yellow
color1:Destroy()
wait(2)
until forever==1

Forget the ends pls I need help qq

Shamma Lamma Mu-mu
Report Abuse
DevToTo129RBLX is not online. DevToTo129RBLX
Joined: 26 Feb 2010
Total Posts: 1971
08 Jun 2014 01:47 PM
bump1

Shamma Lamma Mu-mu
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
08 Jun 2014 01:48 PM
Do you expect an answer to this?

Oh, um. Hi. I just develop n' stuff.
Report Abuse
DevToTo129RBLX is not online. DevToTo129RBLX
Joined: 26 Feb 2010
Total Posts: 1971
10 Jun 2014 06:26 AM
Duh just count fors and ifs.

Shamma Lamma Mu-mu
Report Abuse
VolcanoINC is not online. VolcanoINC
Joined: 19 Sep 2008
Total Posts: 1395
10 Jun 2014 06:55 AM
I'd suggest you get an auto-formatter and fix your syntax errors that way. I don't think any of us could fix this script for you without putting in several hours of work (which is something you shouldn't expect from us).
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
10 Jun 2014 07:12 AM
Tables.
Report Abuse
MasterDaniel is online. MasterDaniel
Joined: 28 Nov 2008
Total Posts: 2866
10 Jun 2014 08:06 AM
If its as easy as counting fors and ifs why don't you do it yourself?
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