--ROBLOX's rocket launcher tool remade and converted by Protofer_S, feel free to use it! tool = Instance.new("Tool",owner.Backpack) tool.Archivable=true tool.CanBeDropped=false tool.RequiresHandle=true handle = Instance.new("Part",tool) handle.Name='Handle' handle.Size=Vector3.new(4.92, 0.74, 0.84) tool.GripForward=Vector3.new(1,0,0) tool.GripPos=Vector3.new(0.7, 0, -0.5) tool.GripRight=Vector3.new(0, -1, 0) tool.GripUp=Vector3.new(0,0,1) print('Made by Protofer_S') local handle_mesh = Instance.new("SpecialMesh",handle) handle_mesh.MeshId='rbxasset://fonts/rocketlauncher.mesh' handle_mesh.TextureId='rbxasset://textures/rocketlaunchertex.png' handle_mesh.Scale=Vector3.new(0.75, 0.75, 0.75) tool.TextureId='http://www.roblox.com/asset/?id=90021376' function functions() NLS([[ local Tool = script.Parent local Remote = Tool:WaitForChild("MouseLoc") local Mouse = game.Players.LocalPlayer:GetMouse() function Remote.OnClientInvoke() return Mouse.Hit.p end ]],handle.Parent) NLS([[ local MOUSE_ICON = 'rbxasset://textures/GunCursor.png' local RELOADING_ICON = 'rbxasset://textures/GunWaitCursor.png' local Tool = script.Parent local Mouse = nil local function UpdateIcon() if Mouse then Mouse.Icon = Tool.Enabled and MOUSE_ICON or RELOADING_ICON end end local function OnEquipped(mouse) Mouse = mouse UpdateIcon() end local function OnChanged(property) if property == 'Enabled' then UpdateIcon() end end Tool.Equipped:Connect(OnEquipped) Tool.Changed:Connect(OnChanged) ]],handle.Parent) end functions() local GRAVITY_ACCELERATION = workspace.Gravity local RELOAD_TIME = 0.2 -- Seconds until tool can be used again local ROCKET_SPEED = 300 -- Speed of the projectile local ROCKET_PART_SIZE = Vector3.new(1,1,4) --local MISSILE_MESH_ID = 'http://www.roblox.com/asset/?id=2251534' --local MISSILE_MESH_SCALE = Vector3.new(0.35, 0.35, 0.25) ----------------- --| Variables |-- ----------------- local DebrisService = game:GetService('Debris') local PlayersService = game:GetService('Players') local MyPlayer local Tool = tool local ToolHandle = Tool.Handle local MouseLoc = Instance.new("RemoteFunction",Tool) MouseLoc.Name='MouseLoc' --local RocketScript = script:WaitForChild('Rocket') --local SwooshSound = Instance.new("Sound") SwooshSound.SoundId='rbxasset://sounds/Rocket whoosh 01.wav' SwooshSound.Looped=true --local BoomSound = Instance.new("Sound") BoomSound.PlayOnRemove=true BoomSound.Volume=0.7 BoomSound.SoundId='rbxasset://sounds/Rocket whoosh 01.wav' --NOTE: We create the rocket once and then clone it when the player fires local Rocket = Instance.new('FlagStand') do -- Set up the rocket part Rocket.Name = 'Rocket' Rocket.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before changing Size Rocket.Size = ROCKET_PART_SIZE Rocket.CanCollide = false -- Add the mesh --local mesh = Instance.new('SpecialMesh', Rocket) --mesh.MeshId = MISSILE_MESH_ID --mesh.Scale = MISSILE_MESH_SCALE -- Add fire --local fire = Instance.new('Fire', Rocket) --fire.Heat = 5 --fire.Size = 2 -- Add a force to counteract gravity local bodyForce = Instance.new('BodyForce', Rocket) bodyForce.Name = 'Antigravity' bodyForce.Force = Vector3.new(0, Rocket:GetMass() * GRAVITY_ACCELERATION, 0) -- Clone the sounds and set Boom to PlayOnRemove local swooshSoundClone = Instance.new("Sound") swooshSoundClone.SoundId='rbxasset://sounds/Rocket whoosh 01.wav' swooshSoundClone.Looped=true swooshSoundClone.Name='Swoosh' swooshSoundClone.Volume=0.7--SwooshSound:Clone() swooshSoundClone.Parent = Rocket swooshSoundClone:Play() local boomSoundClone = Instance.new("Sound") boomSoundClone.Volume=0.7 boomSoundClone.SoundId='rbxasset://sounds/collide.wav' boomSoundClone.Name='Boom' boomSoundClone.Volume=1 --BoomSound:Clone() boomSoundClone.PlayOnRemove = true boomSoundClone.Parent = Rocket -- Attach creator tags to the rocket early on local creatorTag = Instance.new('ObjectValue', Rocket) creatorTag.Value = MyPlayer creatorTag.Name = 'creator' --NOTE: Must be called 'creator' for website stats local iconTag = Instance.new('StringValue', creatorTag) iconTag.Value = Tool.TextureId iconTag.Name = 'icon' function rocketfunctions(rocket) local BLAST_RADIUS = 17 -- Blast radius of the explosion local BLAST_FORCE = 600000 -- Amount of force applied to parts local swoosh=rocket:waitForChild('Swoosh') local function explode(victim) if victim:IsDescendantOf(MyPlayer.Character) then return end local beam= Instance.new("Explosion",workspace) beam.Position=rocket.Position beam.BlastRadius = BLAST_RADIUS beam.BlastPressure=BLAST_FORCE beam.ExplosionType = Enum.ExplosionType.Craters beam.Hit:Connect(function(part,distance) local bad = part.Parent:FindFirstChildOfClass("ForceField") if bad then bad:Destroy() end local hum = part.Parent:FindFirstChildOfClass("Humanoid") wait() if hum then hum:Destroy() end if part.Anchored == true then part.Anchored = false end part:BreakJoints() for _,joints in pairs(part:GetJoints()) do joints:Destroy() end end) swoosh:Pause() rocket:Destroy() end rocket.Touched:Connect(explode) end -- Finally, clone the rocket script and enable it --local rocketScriptClone = RocketScript:Clone() --rocketScriptClone.Parent = Rocket --rocketScriptClone.Disabled = false end ----------------- --| Functions |-- ----------------- local function OnActivated() local myModel = MyPlayer.Character if Tool.Enabled and myModel and myModel:FindFirstChildOfClass("Humanoid") and myModel.Humanoid.Health > 0 then Tool.Enabled = false local Pos = MouseLoc:InvokeClient(MyPlayer) -- Create a clone of Rocket and set its color local rocketClone = Rocket:Clone() rocketfunctions(rocketClone) DebrisService:AddItem(rocketClone, 30) rocketClone.BrickColor = BrickColor.new("Bright red") -- Position the rocket clone and launch! local spawnPosition = (ToolHandle.CFrame * CFrame.new(5, 0, 0)).p rocketClone.CFrame = CFrame.new(spawnPosition, Pos) --NOTE: This must be done before assigning Parent rocketClone.Velocity = rocketClone.CFrame.lookVector * ROCKET_SPEED --NOTE: This should be done before assigning Parent rocketClone.Parent = workspace rocketClone:SetNetworkOwner(nil) rocketClone.Material=Enum.Material.Plastic wait(RELOAD_TIME) Tool.Enabled = true end end function OnEquipped() MyPlayer = PlayersService:GetPlayerFromCharacter(Tool.Parent) end -------------------- --| Script Logic |-- -------------------- Tool.Equipped:Connect(OnEquipped) Tool.Activated:Connect(OnActivated)