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 » Scripters
Home Search
 

Re: Posts your scripts here!

Previous Thread :: Next Thread 
ForceSky is not online. ForceSky
Joined: 30 Jul 2012
Total Posts: 2379
12 Apr 2013 08:11 PM
Post your scripts here! Say the script and what it does. Please, no scripts over 40 lines. Any spam or tricks will be reported. Here's my script to get a wood brick to catch on fire:

function onTouch(part)
if part.Material == "Wood" then
script.Parent.Fire:clone().Parent = part
end
end

script.Parent.Touched:connect(onTouch)


Whereas the script is inside a wooden brick with fire as one of its children.
Report Abuse
chaoticregandpledge is not online. chaoticregandpledge
Joined: 04 Dec 2009
Total Posts: 2894
12 Apr 2013 08:11 PM
How 'bout no.
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
12 Apr 2013 08:14 PM
int main(){int x[3];for(int i=0;i<=3;i++){x[i]=4;}}

try that
it works
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
12 Apr 2013 08:15 PM
@Dr: I lol'd.


@OP: Here's a script I wrote earlier:
do
oldtostring = tostring
export tostring = (arg) ->
if type(arg) != "table" then return oldtostring arg
s = ""
for k, v in pairs arg
ks = if type(k) == "string" then k
elseif type(k) == "number" then ""
else "["..tostring(k).."]"
s ..= if ks != "" then ks.." = " else ""
s ..= if type(v) == "string" then "\""..v.."\"" else tostring(v)
s ..= if ks == "" then "," else ";"
s ..= " "
return "{ }" if s == "" else "{"..s\sub(1, -3).."}"
Report Abuse
ForceSky is not online. ForceSky
Joined: 30 Jul 2012
Total Posts: 2379
12 Apr 2013 08:16 PM
State what the script does. Otherwise it is considered as a trick.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
12 Apr 2013 08:16 PM
@Dr
You forgot namespace and iostream :( and you never ended the function
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
12 Apr 2013 08:18 PM
@Force: It overrides the tostring function to provide nice table output, though MoonScript's library does provide a function for you.

@Cnt: No, just no.
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
12 Apr 2013 08:19 PM
@cnt

I legititmately face palmed.
I mean really...
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
12 Apr 2013 08:19 PM
@Dr
Yes, just yes.
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
12 Apr 2013 08:21 PM
You obviously don't know C++.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
12 Apr 2013 08:22 PM
int main(){
int x[3]
for(int i=0;i<=3;i++){
x[i]=4;
}

^That's what he wrote, he didn't close int main(), or he could just remove the squiggle after the i++ since it's 1 line of code after.
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
12 Apr 2013 08:23 PM
He ended the first curly brace.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
12 Apr 2013 08:24 PM
Ohh, I copied it wrong...
Report Abuse
coplox is not online. coplox
Joined: 07 Jun 2008
Total Posts: 3252
12 Apr 2013 08:24 PM
local function dec2Bin(dec)
dec=dec*2
local bin=""
for i=0,7 do
dec=math.floor(dec/2)
bin=bin..tostring(math.ceil(dec%2))
end
return string.reverse(bin)
end

Takes a supplied byte and returns it's bitpattern as a string.
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
12 Apr 2013 08:26 PM
A rectangle class for Love2d
class Rectangle
new: (x, y, w, h) =>
@x = x
@y = y
@w = w
@h = h

draw: =>
love.graphics.setColor 255, 0, 0
love.graphics.rectangle "fill", @x, @y, @w, @h

rect = nil

love.load = ->
print "Loading"
rect = Rectangle 5, 10, 100, 20

love.update = (dt) ->
return

love.draw = ->
rect\draw!
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
12 Apr 2013 08:26 PM
Aww, she loves me ;3
2D!!!
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
12 Apr 2013 08:27 PM
"int main(){int x[3];for(int i=0;i<=3;i++){x[i]=4;}}"

See how there are two braces at the end? One for the function, one for the for loop.
Plus I didn't need to use any of the iostream standard namespace functions because all I did was allocate and assign memory. :p
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
12 Apr 2013 08:27 PM
I don't get it.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
12 Apr 2013 08:27 PM
@DrHaximus
I copied it wrong :(
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
12 Apr 2013 08:29 PM
"State what the script does. Otherwise it is considered as a trick."

Can't you just read the script to know what it does?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
12 Apr 2013 08:31 PM
What if it's in spanish?
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
12 Apr 2013 08:32 PM
Then you learn Spanish, silly.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
12 Apr 2013 08:34 PM
I'm in spanish 1 at school, silly!
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
12 Apr 2013 08:36 PM
You don't have to learn at school. I'm learning Japanese outside of school.
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
12 Apr 2013 08:36 PM
A window with C++'s SFML library, which also has a button for closing the window and a background image.
I didn't test it, but it's most likely bug free.

I have to post a pastebin because Roblox errors if I try and post it :p

pastebin/ggUkCAqV
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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