hiimfree
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 396 |
|
|
| 19 Nov 2012 01:20 PM |
| I made a basketball tournament script and i need to make it so that when you score a hoop it says the score, and I also need to make it so that after 3 mins it kills the on who lost. |
|
|
| Report Abuse |
|
|
hiimfree
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 396 |
|
| |
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 19 Nov 2012 01:23 PM |
"I made a basketball tournament script"
"made"
If you already made it isn't it done?... |
|
|
| Report Abuse |
|
|
hiimfree
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 396 |
|
|
| 19 Nov 2012 01:29 PM |
| Yes, I made it. I just have errors with it. |
|
|
| Report Abuse |
|
|
hiimfree
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 396 |
|
|
| 19 Nov 2012 01:32 PM |
| Therefore, it is not done. |
|
|
| Report Abuse |
|
|
hiimfree
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 396 |
|
|
| 19 Nov 2012 01:32 PM |
| I made the whole place. Cframed, and put basketballs in lighting and everything. I just need that. |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2012 01:37 PM |
| If you really made all that you should have a problem doing this... |
|
|
| Report Abuse |
|
|
hiimfree
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 396 |
|
|
| 19 Nov 2012 01:44 PM |
| Fine its not made yet, but it only needs that so it is made... |
|
|
| Report Abuse |
|
|
hiimfree
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 396 |
|
| |
|
kirby568
|
  |
| Joined: 02 Feb 2009 |
| Total Posts: 4830 |
|
| |
|
hiimfree
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 396 |
|
| |
|
hiimfree
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 396 |
|
|
| 19 Nov 2012 02:25 PM |
local m = Instance.new("Message") m.Text = "Welcome to Hiim's And Tcena's Basketball Tournament!" local eventrunning = false local deb = false
function onChatted(msg, recipient, speaker)
local source = string.lower(speaker.Name) msg = string.lower(msg)
if (msg == "spectate") then speaker.Status.Value = 0 local n = Instance.new("Message") n.Parent = speaker n.Text = "Now spectating." wait(1.5) n:remove() end if (msg == "play") then speaker.Status.Value = 1 local n = Instance.new("Message") n.Parent = speaker n.Text = "Now in play queue." wait(1.5) n:remove() end
if (msg == "start") and (deb == false) then
local players = game.Players:getChildren() local competitors = 0 for i = 1, #players do if players[i].Character ~= nil then if players[i].Status.Value == 1 then competitors = competitors + 1 end end end
---We have to make this a COMPETITION. Not a "sit here, get points" place. if competitors >= 2 then
deb = true wait(1) m.Parent = game.Workspace wait(3) m.Text = "I hope you good luck Participators!" wait(1)
---First event down, now on to Fencing.-------------------------------------
local players = game.Players:getChildren() local remaining = {}
for i = 1, #players do if players[i].Character ~= nil then if players[i].Status.Value == 1 then players[i].Character.Humanoid.Jump = true wait(0.1) players[i].Character:MoveTo(game.Workspace:findFirstChild("Viewing Booth").Position + Vector3.new(math.random(-10, 10), 5, math.random(-10, 10))) local fr = Instance.new("IntValue") fr.Name = "FencingRound" fr.Value = 1 fr.Parent = players[i].Character local sword = game.Lighting.LinkedSword:clone() sword.Parent = players[i].Backpack local ff = Instance.new("ForceField") ff.Parent = players[i].Character table.insert(remaining, players[i]) end end end
wait(2) m.Parent = nil
if #remaining >= 2 then eventrunning = true end
local round = 1 for i = 1, #remaining do print(remaining[i]) end
---------------------------------------------------------------(120 lines)------------Fencing Event Script. while eventrunning do ------------------------------------------------------------------------Begin A/B combat. if #remaining >= 2 then local a = remaining[math.random(1, #remaining)] local b = remaining[math.random(1, #remaining)] while a == b do b = remaining[math.random(1, #remaining)] wait(0.1) end
a.Character.Humanoid.Jump = true b.Character.Humanoid.Jump = true wait(0.1) a.Character:MoveTo(game.Workspace.SwordFightA.Position) b.Character:MoveTo(game.Workspace.SwordFightB.Position) if a.Character:findFirstChild("ForceField") ~= nil then a.Character:findFirstChild("ForceField"):remove() end if b.Character:findFirstChild("ForceField") ~= nil then b.Character:findFirstChild("ForceField"):remove() end
local c = a.Character.Humanoid.Health*b.Character.Humanoid.Health print(c)
while c ~= 0 do if a.Character ~= nil and b.Character ~= nil then c = a.Character.Humanoid.Health*b.Character.Humanoid.Health elseif (a.Character == nil or b.Character == nil) then wait(1.3) c = 0 end wait(1.3) end
if a.Character ~= nil then if a.Character.Humanoid.Health ~= 0 and a.Character:findFirstChild("FencingRound") ~= nil then a.leaderstats.Points.Value = a.leaderstats.Points.Value + a.Character.FencingRound.Value*50 a.Character.FencingRound.Value = a.Character.FencingRound.Value + 1 m.Text = "" .. a.Name .. " has won the match!!!" m.Parent = game.Workspace wait(2.5) a.Character.Humanoid.Jump = true a.Character.Humanoid.Health = 100 wait(0.5) local ff = Instance.new("ForceField") ff.Parent = a.Character a.Character:MoveTo(game.Workspace:findFirstChild("Viewing Booth").Position + Vector3.new(math.random(-10, 10), 5, math.random(-10, 10))) m.Parent = nil end end if b.Character ~= nil then if b.Character.Humanoid.Health ~= 0 and b.Character:findFirstChild("FencingRound") ~= nil then b.leaderstats.Points.Value = b.leaderstats.Points.Value + b.Character.FencingRound.Value*50 b.Character.FencingRound.Value = b.Character.FencingRound.Value + 1 m.Text = "" .. b.Name .. " has won the Match!!!" m.Parent = game.Workspace wait(2.5) b.Character.Humanoid.Jump = true b.Character.Humanoid.Health = 100 wait(0.5) local ff = Instance.new("ForceField") ff.Parent = b.Character b.Character:MoveTo(game.Workspace:findFirstChild("Viewing Booth").Position + Vector3.new(math.random(-10, 10), 5, math.random(-10, 10))) m.Parent = nil end end
end -------------------------------------------------------------------------End A/B combat print("Checking Fencing...") wait(3.1) --To make sure we get "FencingRound" out of the dead player... eventrunning = false remaining = {} for i = 1, #players do if players[i].Character ~= nil then if players[i].Character:findFirstChild("FencingRound") ~= nil then if players[i].Character.FencingRound.Value == round then table.insert(remaining, players[i]) end end end end ----------To check remaining players. if #remaining >= 2 then print("2+ players remain.") eventrunning = true
elseif #remaining == 1 then print("1 player remains...checking for others.")
for i = 1, #players do if players[i].Character ~= nil then if players[i].Character:findFirstChild("FencingRound") ~= nil then if players[i].Character.FencingRound.Value == round + 1 then remaining[1].Character.FencingRound.Value = round + 1 round = remaining[1].Character.FencingRound.Value table.insert(remaining, players[i]) eventrunning = true end end end end
if eventrunning == false then m.Text = "Looks to me like " .. remaining[1].Name .. " has won the tournament!" m.Parent = game.Workspace remaining[1].leaderstats.Points.Value = remaining[1].leaderstats.Points.Value + 250 remaining[1].Character:BreakJoints() wait(3) m.Parent = nil end
elseif #remaining == 0 then print("Must not be any players left at this level...checking next round") for i = 1, #players do if players[i].Character ~= nil then if players[i].Character:findFirstChild("FencingRound") ~= nil then if players[i].Character.FencingRound.Value == round + 1 then table.insert(remaining, players[i]) eventrunning = true end end end end
if eventrunning == true then round = round + 1 end
end----------End remaining check. ---Tournament runs until we have a definitive winner.
end -------------------------------------------------------------------------------End Fencing Tournament Script.
m.Text = "Congratulations" m.Parent = game.Workspace wait(3) m.Parent = nil
--------------------------------------------------------------------------------------------------------End of script.
deb = false m.Text = "Welcome to Hiim's and Tcena's Basketball Tournament!" end end end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end
game.Players.ChildAdded:connect(onPlayerEntered) |
|
|
| Report Abuse |
|
|
kirby568
|
  |
| Joined: 02 Feb 2009 |
| Total Posts: 4830 |
|
|
| 19 Nov 2012 02:32 PM |
| Just think of a 'sensor' make a detecting script and if you have no idea how to do anything involving GUIs, please message me if you want help. |
|
|
| Report Abuse |
|
|
RoyMer
|
  |
| Joined: 06 Jan 2010 |
| Total Posts: 1922 |
|
| |
|
|
| 19 Nov 2012 03:10 PM |
| How is this made by you? It's a free model sword fighting tournament script. |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2012 03:18 PM |
teams = {Red_team, Blue_team} function playerAdded(player) return teams[math.random(1,#minigames)] local pie = Instance.new("IntValue") pie.Name = "Timer" pie.Value = 300 pie.Parent = player if score ~= nil then
while wait(1) do if pie.Value == 0 then break if pie.Value > 0 then pie.Value = pie.Value -1 end end end end
function endGame() if pie.Value == 0 then local players = game.Players:getChildren() players:Destroy() end end --Kind of ends game...
|
|
|
| Report Abuse |
|
|
|
| 19 Nov 2012 03:20 PM |
| Wow. Fencing? Is this a free model? e3e |
|
|
| Report Abuse |
|
|