lolcool
#1
game:load(2601)--[[game:asyncTask(function() sleep(5) function spawn() local npc = create("NPC") isDead = false link(npc.ChildRemoved, function() if isDead then return end sleep(3) npc:remove() isDead = true end) npc.Skin = "http://i56.tinypic.com/28b88ds.png" local body = create("Box") body.Name="Body" body.Size = Vec2D(2.5, 10.5) body.Transparency = 1 body.Position = game.SpawnManager:getSpawn():add(Vec2D(0, 10.6)) body.Parent = npc local ears = create("Box") ears.Transparency = 1 ears.Size = Vec2D(3, 3) ears.Position = body.Position:add(Vec2D(0, 6.75)) local tex = create("Texture") tex.Image = "http://i52.tinypic.com/25kmper.png" tex.Parent = ears ears.Parent = npc local w = create("Weld") w.Anchor = ears.Position w.Visible = false w.Part1 = ears w.Part2 = body w.Parent = game.JointsService local controller = create("VelocityController") controller.Parent = body create("FixedRotation").Parent = body npc.Parent = game.World local l = create("Label") l.Text = "Easter Bunny" l.Parent = ears local s = create("Script") s.Source = [[ npc = script.Parent body = npc.Body controller = body.VelocityController speed = 4 direction = 0 targetCharacter = nil lastPosition = Vec2D(0, 0) targetCharacter = game.Players:getChildren()[1].Character function main() while true do dx = targetCharacter.Body.Position.x - body.Position.x if math.abs(dx) < 5 then if direction ~= 0 then controller.Velocity = Vec2D(0, 0) direction = 0 end elseif dx > 0 and direction ~= 1 then direction = 1 controller.Velocity = Vec2D(speed, 0) elseif dx < 0 and direction ~= -1 then direction = -1 controller.Velocity = Vec2D(-speed, 0) end if lastPositionConfusedub(body.Position).length < 0.1 and direction ~= 0 then --stuck? jump! body.Velocity = Vec2D(0, 15) end lastPosition = body.Position sleep(0.2) end end main() s.Parent = npc end spawn() end)]]
[Image: 5widdh.png]
Siggy by McNoobster!
[Image: loading.gif]


Messages In This Thread
lolcool - by toast - 05-07-2011, 06:35 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)