10
Jul
08

New Script!

me = "username" -- Change username with your name
local h = Instance.new("HopperBin")
h.Parent = game.Players[me].Backpack
h.Name = "Create"

local s = Instance.new("Script")
s.Parent = h
s.Source = [[
txt1 = "http://www.roblox.com/asset/?id=2670278"
txt2 =  "http://www.roblox.com/asset/?id=1199383"
current = txt1
function makeCompanionCube(pos)
	local p = Instance.new("Part")
	p.Parent = workspace
	p.Position = pos
	p.Name = "Companion Cube"
	p.formFactor = 0
	p.Size = Vector3.new(3, 3, 3)
	p.TopSurface = 0
	p.BottomSurface = 0
	p.Reflectance = 0.6
	local d = Instance.new("Decal")
	d.Texture = current
	d.Parent = p
	d.Face = 0
	for i=1, 5 do
		local d = Instance.new("Decal")
		d.Texture = current
		d.Parent = p
		d.Face = i
	end
end

function onButton1Down(mouse)
	pos = mouse.Hit.p
	makeCompanionCube(pos)
end
function onKeyDown(key)
	local key = key:lower()
	if (key == "q") then
		current = txt1
	end
	if (key == "e") then
		current = txt2
	end
end
function onSelected(mouse)
	mouse.Icon = "rbxasset://textures\\guncursor.png"
	mouse.KeyDown:connect(onKeyDown)
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end
script.Parent.Selected:connect(onSelected)
]]