function RocketCreator.CreateRocket(N,T)local e=Instance.new("\080\097\114\116")e.Name="\082\111\099\107\101\116"e.Size=Vector3.new(1,1,4)e.CanCollide=false local E=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")E.Name="\082\111\099\107\101\116\077\101\115\104"E.MeshId="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\057\052\054\057\048\048\056\049"E.TextureId="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\057\052\054\056\057\057\054\054"E.Parent=e if T then E.Scale=Vector3.new(2.5,2.5,2)local T=Instance.new("\070\105\114\101")T.Heat=5 T.Size=2 T.Parent=e local N=Instance.new("\080\111\105\110\116\076\105\103\104\116")N.Name="\076\105\103\104\116"N.Color=Color3.new(1,.66666666666667,0)N.Range=10 N.Shadows=true N.Parent=e local Z=Instance.new("\066\111\100\121\071\121\114\111")Z.MaxTorque=Vector3.new(1e+99,1e+99,1e+99)Z.Parent=e local G=Instance.new("\066\111\100\121\086\101\108\111\099\105\116\121")G.MaxForce=Vector3.new(1e+99,1e+99,1e+99)G.Parent=e local l=Instance.new("\083\111\117\110\100")l.Name="\083\119\111\111\115\104\083\111\117\110\100"l.MaxDistance=10000 l.Looped=true l.SoundId="\114\098\120\097\115\115\101\116\058\047\047\115\111\117\110\100\115\047\082\111\099\107\101\116 \119\104\111\111\115\104 \048\049\046\119\097\118"l.Volume=1 l.Parent=e local J=Instance.new("\083\111\117\110\100")J.Name="\069\120\112\108\111\115\105\111\110\083\111\117\110\100"J.MaxDistance=10000 J.SoundId="\114\098\120\097\115\115\101\116\058\047\047\115\111\117\110\100\115\047\099\111\108\108\105\100\101\046\119\097\118"J.Volume=1 J.PlayOnRemove=true J.Parent=e local m=RocketScript:Clone()m.Disabled=false m.Parent=e;(PlayerDamagerScript:Clone()).Parent=m;(ConfigurationScript:Clone()).Parent=m end return e end return RocketCreator

function RocketCreator:CreateRocket(IsBufferRocket)
	--Create the base parts and mesh.
	local Rocket = Instance.new("Part")
	Rocket.Name = "Rocket"
	Rocket.Size = Vector3.new(1,1,4)
	Rocket.CanCollide = false

	local Mesh = Instance.new("SpecialMesh")
	Mesh.Name = "RocketMesh"
	Mesh.MeshId = "http://www.roblox.com/asset/?id=94690081"
	Mesh.TextureId = "http://www.roblox.com/asset/?id=94689966"
	Mesh.Parent = Rocket

	if IsBufferRocket then
		--If it is a buffer rocket, add the effects, physics, and scripts.
		Mesh.Scale = Vector3.new(2.5,2.5,2)
	
		local Fire = Instance.new("Fire")
		Fire.Heat = 5
		Fire.Size = 2
		Fire.Parent = Rocket
	
		local Light = Instance.new("PointLight")
		Light.Name = "Light"
		Light.Color = Color3.new(1,170/255,0)
		Light.Range = 10
		Light.Shadows = true
		Light.Parent = Rocket
		
		local BodyGyro = Instance.new("BodyGyro")
		BodyGyro.MaxTorque = Vector3.new(10^99,10^99,10^99)
		BodyGyro.Parent = Rocket
		
		local RocketPropulsion = Instance.new("BodyVelocity")
		RocketPropulsion.MaxForce = Vector3.new(10^99,10^99,10^99)
		RocketPropulsion.Parent = Rocket
	
		local SwooshSound = Instance.new("Sound")
		SwooshSound.Name = "SwooshSound"
		SwooshSound.MaxDistance = 10000
		SwooshSound.Looped = true
		SwooshSound.SoundId = "rbxasset://sounds/Rocket whoosh 01.wav"
		SwooshSound.Volume = 1
		SwooshSound.Parent = Rocket
	
		local ExplosionSound = Instance.new("Sound")
		ExplosionSound.Name = "ExplosionSound"
		ExplosionSound.MaxDistance = 10000
		ExplosionSound.SoundId = "rbxasset://sounds/collide.wav"
		ExplosionSound.Volume = 1
		ExplosionSound.PlayOnRemove = true
		ExplosionSound.Parent = Rocket
		
		local NewRocketScript = RocketScript:Clone()
		NewRocketScript.Disabled = false
		NewRocketScript.Parent = Rocket
		
		PlayerDamagerScript:Clone().Parent = NewRocketScript
		ConfigurationScript:Clone().Parent = NewRocketScript
	end
	
	return Rocket
end

return RocketCreator
