Share Your Scripts
#1
Currently the public scripts are scattered randomly throughout the forum... I thought it would be nice if we could keep them all in one place! So, I made a wiki article: http://buildism.net/wiki/w/index.php?tit..._Fragments
Reply
#2
I edited the reset tool and made a "kill npc on click" tool
[lua]npc = game.World.NPC
link(script.Parent.MouseDown, function()
npc.Health = 0
end)[/lua]

I didn't want to put it on the wiki at first because it's a pretty useless too.
Yes, I am a furry. Judge me if you want.
Did you like my post? Give me internets!
[Image: 76561198037771700.png][Image: 7923.png]
Reply
#3
Sweet. Here's the script I used for my tool at the end of my falling rocks game. Be sure to put the script in a tool, and also name the Tool "JetBoots".


[lua]
local mode = 1
names = {"JetBoots", "Exploder"}

function md(x,p)
if mode == 1 then
script.Parent.Parent.Parent.Character.Body.Controller.Velocity = Vec2D(0,5)
elseif mode == 2 then
y = create("Explosion")
y.Parent = game.World
y.Position = p
end
end

function mu()
if mode == 1 then
script.Parent.Parent.Parent.Character.Body.Controller.Velocity = Vec2D(0,0)
end
end

function kd(k)
if k == "e" then
if mode == #names then
mode = 1
else
mode = mode + 1
end
script.Parent.Name = names[mode]
elseif k == "q" then
if mode == 1 then
mode = #names
else
mode = mode - 1
end
script.Parent.Name = names[mode]
end
end

link(script.Parent.MouseDown, md)
link(script.Parent.MouseUp, mu)
link(script.Parent.KeyDown, kd)
[/lua]
[Image: rogershanksluffy_display.gif]
Reply
#4
Ahhh, cool, thanks.
Reply
#5
Magic carpet script (put in a tool)
[lua]local carpet=create("Box")
carpet.Name="carpet"
local player=script.Parent.Parent.Parent
carpet.Size=Vec2D(30,2)
carpet.Color=Color(128,0,128)
local fv=create("FixedVelocity")
create("FixedRotation").Parent=carpet
fv.Parent=carpet
local l=create("Label")
l.Parent=carpet
l.Text=player.Name.."'s Magic carpet"

function selected()
if carpet.Parent~=nil then return end
moveto()
carpet.Parent=player.Character
end
function moveto()
carpet.Position=player.Character.Body.Position:add(Vec2D(carpet.Size.x/2,0))
end

function keydown(k)
if k=="r" then
fv.Velocity=Vec2D(0,4-fv.Velocity.y):add(fv.Velocity)
elseif k=="h" then
fv.Velocity=Vec2D(0,0.47-fv.Velocity.y):add(fv.Velocity)
elseif k=="f" then
fv.Velocity=Vec2D(0,0-fv.Velocity.y):add(fv.Velocity)
end
if k=="n" then
moveto()
end
local speed=4
if k=="z" then
fv.Velocity=Vec2D(-speed-fv.Velocity.x,0):add(fv.Velocity)
elseif k=="x" then
fv.Velocity=Vec2D(speed-fv.Velocity.x,0):add(fv.Velocity)
elseif k=="c" then
fv.Velocity=Vec2D(-fv.Velocity.x,0):add(fv.Velocity)
carpet.Velocity=Vec2D(-carpet.Velocity.x,0):add(carpet.Velocity)
else
carpet.Velocity=Vec2D(-carpet.Velocity.x,0):add(carpet.Velocity)
end
end

function keyup(k)
end

link(script.Parent.Selected,selected)
link(script.Parent.KeyDown,keydown)
link(script.Parent.KeyUp,keyup)[/lua]
[Image: 5widdh.png]
Siggy by McNoobster!
[Image: loading.gif]
Reply
#6
Is this lua?
Reply
#7
(04-15-2011, 09:15 PM)Matt Wrote: Is this lua?

Yes. It is Lua. If you're familiar with scripting in ROBLOX, you should have no trouble scripting in Buildism.
Yes, I am a furry. Judge me if you want.
Did you like my post? Give me internets!
[Image: 76561198037771700.png][Image: 7923.png]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)