nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
| |
|
|
| 25 Oct 2011 08:22 PM |
| make me a metatable that does stuff |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2011 08:24 PM |
| make me a script that prints "OVAH 9000" 9000 times __***without***__ a loop |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2011 08:26 PM |
@Local
why would anyone do that with a loop |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2011 08:29 PM |
@cach
for i = 1, 9000 do print("over 9000") end
see i could do that like that but without a loop plz (hint, string methods (Lua LIBRARY NAO)) |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 25 Oct 2011 08:30 PM |
i=0
print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i) i=i+1 print(i)
Now, I could copy and paste that, then copy/paste the new copy and pasted text, and continue until it's 9000.
|
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 25 Oct 2011 08:35 PM |
| ^I would consider dat a lewp in a way though |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 25 Oct 2011 08:36 PM |
("over 9000"):rep(9000);
How hard is that? |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2011 08:36 PM |
@nate
i wouldn't
he didnt use any 'loops'
lulz |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2011 08:37 PM |
@sduke
i guess he took it the wrong way
i said print it 9000 times, he went ahead and made the integer 9000
print(string.rep(9000, "over 9000 ") |
|
|
| Report Abuse |
|
|
dragon829
|
  |
| Joined: 12 Aug 2008 |
| Total Posts: 741 |
|
|
| 25 Oct 2011 08:38 PM |
| Gun fighting Tournament script :-D |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2011 08:38 PM |
GAHH TYPO
Y U SO FORGET PARENTHESIS
print(string.rep(9000, "over 9000 ")) |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 25 Oct 2011 08:39 PM |
| SDuke, rep only works with strings, so you can't make a variable go up, and print 1-9000, you can print 1 thing 9000 times though, but wouldn't it be in a chunk, not separate prints? |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2011 08:39 PM |
GAHHH MOAR TYPOS
print(string.rep("over 9000 ", 9000)) |
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
| |
|
|
| 25 Oct 2011 08:40 PM |
@ox
you technically did it wrong, i was asking for a string
but you get over 9000 points for that function h@x plz |
|
|
| Report Abuse |
|
|
Nevixes
|
  |
| Joined: 07 Oct 2011 |
| Total Posts: 301 |
|
|
| 25 Oct 2011 08:40 PM |
| Make a Text over me saying "Bow To Me" untill I leave the server! >:3 |
|
|
| Report Abuse |
|
|
dragon829
|
  |
| Joined: 12 Aug 2008 |
| Total Posts: 741 |
|
| |
|
|
| 25 Oct 2011 09:02 PM |
Technically, this isn't a loop. :o
function num(bleh) bleh = bleh + 1 print(bleh) if bleh < 9000 then num(bleh) end end
num(1)
|
|
|
| Report Abuse |
|
|
|
| 25 Oct 2011 09:16 PM |
| Make me a script that would go in a flag that when a raider touches it, the flag's color would change, it would move down, then when it reaches the bottom, a hint or message appears. |
|
|
| Report Abuse |
|
|
ieatnubz
|
  |
| Joined: 23 Oct 2009 |
| Total Posts: 342 |
|
|
| 25 Oct 2011 09:24 PM |
add debounce in here plz.
------------------------------------- function getPlayer(humanoid) local players = game.Players:children() for i = 1, #players do if players[i].Character.Humanoid == humanoid then return players[i] end end end
Door = script.Parent function onTouched(hit) print("Door Hit") local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then print("Human touched door") local player = getPlayer(human)
if (player == nil) then return end local stats = player:findFirstChild("leaderstats") local sp = stats:findFirstChild("Lvl") if sp == nil then return false end if (sp.Value >= 5) then print("Human passed test") Door.Transparency = .5 Door.CanCollide = false wait(3) Door.CanCollide = true Door.Transparency = 0 else human.Health = 0 end end
end
connection = Door.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 25 Oct 2011 10:28 PM |
@local
In what way is a recursive function a hack? Also even out of all the ones submitted mine is still the most efficient. :P |
|
|
| Report Abuse |
|
|
823932
|
  |
| Joined: 03 Sep 2011 |
| Total Posts: 8 |
|
|
| 25 Oct 2011 10:37 PM |
| A try any hat script (That works) |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 25 Oct 2011 10:57 PM |
@dark
Whether or not a recursive function is a loop is arguable. In my opinion, if it's a tail-recursive, then it would be a loop. However if you have it doing other stuff with it then it wouldn't be a loop. So in about ninety percent of the cases, I would find recursive functions to be loops. Although most people say it isn't do to the fact that it's a mathematical term, but all that really seems to me to be is that recursion is a loop used in math as well.
|
|
|
| Report Abuse |
|
|