Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --:3
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- Sound2 = Instance.new("Sound")
- Weld3 = Instance.new("Weld")
- SpecialMesh4 = Instance.new("SpecialMesh")
- Part5 = Instance.new("Part")
- Sound6 = Instance.new("Sound")
- SpecialMesh7 = Instance.new("SpecialMesh")
- LocalScript8 = Instance.new("LocalScript")
- Script9 = Instance.new("Script")
- Script10 = Instance.new("Script")
- Sound11 = Instance.new("Sound")
- Sound12 = Instance.new("Sound")
- SpecialMesh13 = Instance.new("SpecialMesh")
- LocalScript14 = Instance.new("LocalScript")
- Script15 = Instance.new("Script")
- Script16 = Instance.new("Script")
- LocalScript17 = Instance.new("LocalScript")
- Tool0.Name = "Dual LoTM Launchers"
- Tool0.Parent = mas
- Tool0.GripForward = Vector3.new(-0, 6.00000021e-05, -1)
- Tool0.GripPos = Vector3.new(0, -0.200000003, -0.5)
- Tool0.GripUp = Vector3.new(0, 1, 6.00000021e-05)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.BrickColor = BrickColor.new("Dark stone grey")
- Part1.Rotation = Vector3.new(-180, 0, -180)
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.Size = Vector3.new(1, 1, 2)
- Part1.CFrame = CFrame.new(0.5, 0.500005007, 1, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part1.Position = Vector3.new(0.5, 0.500005007, 1)
- Part1.Orientation = Vector3.new(0, 180, 0)
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Sound2.Name = "Fire"
- Sound2.Parent = Part1
- Sound2.Volume = 1
- Weld3.Parent = Part1
- Weld3.C1 = CFrame.new(3, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld3.Part0 = Part1
- Weld3.Part1 = Part5
- SpecialMesh4.Parent = Part1
- SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=125754898"
- SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=125755118"
- SpecialMesh4.VertexColor = Vector3.new(1, 0, 0)
- SpecialMesh4.MeshType = Enum.MeshType.FileMesh
- Part5.Name = "Handle"
- Part5.Parent = Tool0
- Part5.BrickColor = BrickColor.new("Dark stone grey")
- Part5.Rotation = Vector3.new(-180, 0, -180)
- Part5.FormFactor = Enum.FormFactor.Symmetric
- Part5.Size = Vector3.new(1, 1, 2)
- Part5.CFrame = CFrame.new(3.5, 0.500005007, 1, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Part5.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part5.Position = Vector3.new(3.5, 0.500005007, 1)
- Part5.Orientation = Vector3.new(0, 180, 0)
- Part5.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Sound6.Name = "Fire"
- Sound6.Parent = Part5
- Sound6.Volume = 1
- SpecialMesh7.Parent = Part5
- SpecialMesh7.MeshId = "http://www.roblox.com/asset/?id=125754898"
- SpecialMesh7.TextureId = "http://www.roblox.com/asset/?id=125755118"
- SpecialMesh7.VertexColor = Vector3.new(1, 0, 0)
- SpecialMesh7.MeshType = Enum.MeshType.FileMesh
- LocalScript8.Name = "Local Gui"
- LocalScript8.Parent = Tool0
- table.insert(cors,sandbox(LocalScript8,function()
- local Tool = script.Parent;
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = false
- mouse.Icon = "http://www.roblox.com/asset/?version=1&id=1279200"
- wait(5)
- mouse.Icon = "http://www.roblox.com/asset/?version=1&id=1279200"
- enabled = true
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "http://www.roblox.com/asset/?version=1&id=1279200"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- end))
- Script9.Name = "Server Launcher"
- Script9.Parent = Tool0
- table.insert(cors,sandbox(Script9,function()
- local Rocket = Instance.new("Part")
- local Tool = script.Parent
- Rocket.Locked = true
- Rocket.BackSurface = 3
- Rocket.BottomSurface = 3
- Rocket.FrontSurface = 3
- Rocket.LeftSurface = 3
- Rocket.RightSurface = 3
- Rocket.TopSurface = 3
- Rocket.Size = Vector3.new(1,1,4)
- Rocket.BrickColor = BrickColor.new(24)
- Tool.RocketScript:clone().Parent = Rocket
- Tool.Explosion:clone().Parent = Rocket
- Tool.Swoosh:clone().Parent = Rocket
- Tool.RocketMesh:clone().Parent = Rocket
- function fire(vTarget)
- local vCharacter = Tool.Parent;
- local vHandle = Tool:findFirstChild("Handle")
- if vHandle == nil then
- print("Handle not found")
- return
- end
- local dir = vTarget - vHandle.Position
- dir = computeDirection(dir)
- local missile = Rocket:clone()
- local pos = vHandle.Position + (dir * 6)
- --missile.Position = pos
- missile.CFrame = CFrame.new(pos, pos + dir)
- local creator_tag = Instance.new("ObjectValue")
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- if vPlayer == nil then
- print("Player not found")
- else
- if (vPlayer.Neutral == false) then -- nice touch
- missile.BrickColor = vPlayer.TeamColor
- end
- end
- creator_tag.Value =vPlayer
- creator_tag.Name = "creator"
- creator_tag.Parent = missile
- missile.RocketScript.Disabled = false
- missile.Parent = game.Workspace
- end
- function computeDirection(vec)
- local lenSquared = vec.magnitude * vec.magnitude
- local invSqrt = 1 / math.sqrt(lenSquared)
- return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
- end
- Tool.Enabled = true
- function onActivated()
- if not Tool.Enabled then
- return
- end
- Tool.Enabled = false
- local character = Tool.Parent;
- local humanoid = character.Humanoid
- if humanoid == nil then
- print("Humanoid not found")
- return
- end
- local targetPos = humanoid.TargetPoint
- fire(targetPos)
- wait(0)
- Tool.Enabled = true
- end
- script.Parent.Activated:connect(onActivated)
- end))
- Script10.Name = "RocketScript"
- Script10.Parent = Tool0
- table.insert(cors,sandbox(Script10,function()
- r = game:service("RunService")
- shaft = script.Parent
- position = shaft.Position
- script.Parent.Explosion.PlayOnRemove = true -- play explosion sound when projectile removed from game
- function fly()
- direction = shaft.CFrame.lookVector
- position = position + direction * 20
- error = position - shaft.Position
- shaft.Velocity = 7*error
- end
- function blow()
- swoosh:stop()
- explosion = Instance.new("Explosion")
- explosion.BlastRadius = 8
- explosion.BlastPressure = 500000
- explosion.DestroyJointRadiusPercent = 200
- explosion.Position = shaft.Position
- -- find instigator tag
- local creator = script.Parent:findFirstChild("creator")
- if creator ~= nil then
- explosion.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end)
- end
- explosion.Parent = game.Workspace
- connection:disconnect()
- wait(1.5)
- shaft:remove()
- end
- function onPlayerBlownUp(part, distance, creator)
- if part.Name == "Head" then
- local humanoid = part.Parent.Humanoid
- tagHumanoid(humanoid, creator)
- end
- end
- function tagHumanoid(humanoid, creator)
- -- tag does not need to expire iff all explosions lethal
- if creator ~= nil then
- local new_tag = creator:clone()
- new_tag.Parent = humanoid
- end
- end
- function untagHumanoid(humanoid)
- if humanoid ~= nil then
- local tag = humanoid:findFirstChild("creator")
- if tag ~= nil then
- tag.Parent = nil
- end
- end
- end
- t, s = r.Stepped:wait()
- swoosh = script.Parent.Swoosh
- swoosh:play()
- d = t + 10.0 - s
- connection = shaft.Touched:connect(blow)
- while t < d do
- fly()
- t = r.Stepped:wait()
- end
- -- at max range
- script.Parent.Explosion.PlayOnRemove = false
- swoosh:stop()
- shaft:remove()
- end))
- Sound11.Name = "Swoosh"
- Sound11.Parent = Tool0
- Sound11.SoundId = "rbxasset://sounds/Rocket whoosh 01.wav"
- Sound11.Volume = 0.69999998807907
- Sound11.Looped = true
- Sound12.Name = "Explosion"
- Sound12.Parent = Tool0
- Sound12.SoundId = "rbxasset://sounds/collide.wav"
- Sound12.Volume = 1
- SpecialMesh13.Name = "RocketMesh"
- SpecialMesh13.Parent = Tool0
- SpecialMesh13.MeshId = "rbxassetid://16974203"
- SpecialMesh13.TextureId = "rbxassetid://116524836"
- SpecialMesh13.MeshType = Enum.MeshType.FileMesh
- LocalScript14.Name = "Crouch"
- LocalScript14.Parent = Tool0
- table.insert(cors,sandbox(LocalScript14,function()
- on = 0
- Tool = script.Parent
- welds = {}
- sh = {}
- arms = nil
- torso = nil
- f = nil
- function Crouch(ison)
- if arms == nil and torso == nil then
- arms = {Tool.Parent:FindFirstChild("Left Leg"), Tool.Parent:FindFirstChild("Right Leg")}
- torso = Tool.Parent:FindFirstChild("Torso")
- end
- if arms ~= nil and torso ~= nil then
- sh = {torso:FindFirstChild("Left Hip"), torso:FindFirstChild("Right Hip")}
- if sh ~= nil then
- local yes = true
- if yes then
- yes = false
- if ison == 1 then
- sh[1].Part1 = nil
- sh[2].Part1 = nil
- local weld1 = Instance.new("Weld")
- weld1.Part0 = torso
- weld1.Parent = torso
- weld1.Part1 = arms[1]
- weld1.C1 = CFrame.new(-0.5, 0.75, 1)
- arms[1].Name = "LDave"
- arms[1].CanCollide = true
- welds[1] = weld1
- -------------------------------------------
- local weld2 = Instance.new("Weld")
- weld2.Part0 = torso
- weld2.Parent = torso
- weld2.Part1 = arms[2]
- weld2.C1 = CFrame.new(0.5,0.495,1.25) * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
- arms[2].Name = "RDave"
- arms[2].CanCollide = true
- welds[2] = weld2
- ---------------------------------
- local force = Instance.new("BodyForce")
- force.Parent = torso
- f = force
- wait(0.01)
- elseif ison == 0 then
- if arms then
- sh[1].Part1 = arms[1]
- sh[2].Part1 = arms[2]
- f.Parent = nil
- arms[2].Name = "Right Leg"
- arms[1].Name = "Left Leg"
- welds[1].Parent = nil
- welds[2].Parent = nil
- end
- end
- --
- end
- else
- print("sh")
- end
- else
- print("arms")
- end
- end
- function Key(key)
- if key then
- key = string.lower(key)
- if (key=="c") then
- if on == 1 then
- on = 0
- elseif on == 0 then
- on = 1
- end
- Crouch(on)
- end
- end
- end
- function Equip(mouse)
- mouse.KeyDown:connect(Key)
- end
- script.Parent.Equipped:connect(Equip)
- end))
- Script15.Name = "Welding"
- Script15.Parent = Tool0
- table.insert(cors,sandbox(Script15,function()
- function Weld(x,y)
- local W = Instance.new("Weld")
- W.Part0 = x
- W.Part1 = y
- local CJ = CFrame.new(x.Position)
- local C0 = x.CFrame:inverse()*CJ
- local C1 = y.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = x
- end
- function Get(A)
- if A.className == "Part" then
- Weld(script.Parent.Handle, A)
- A.Anchored = false
- else
- local C = A:GetChildren()
- for i=1, #C do
- Get(C[i])
- end
- end
- end
- function Finale()
- Get(script.Parent)
- end
- script.Parent.Equipped:connect(Finale)
- script.Parent.Unequipped:connect(Finale)
- Finale()
- end))
- Script16.Name = "armmove"
- Script16.Parent = Tool0
- table.insert(cors,sandbox(Script16,function()
- --Stickmasterluke
- --just put this script under the tool and when weilded the left arm will go up aswell.
- tool=script.Parent
- while true do
- if tool.Parent.Parent.Name=="Workspace" then
- local la=tool.Parent:FindFirstChild("Left Arm")
- local ra=tool.Parent:FindFirstChild("Left Arm")
- local ts=tool.Parent:FindFirstChild("Torso")
- if la~=nil and ts~=nil and ra~=nil then
- local ls=ts:FindFirstChild("Left Shoulder")
- local rs=ts:FindFirstChild("Right Shoulder")
- if ls~=nil and rs~=nil then
- ls.CurrentAngle=rs.CurrentAngle*-1
- ls.MaxVelocity=0
- end
- end
- end
- wait(.02) --If arm looks glitchy, then make this number smaller. And avoid setting to 0(game will crash).
- end
- end))
- LocalScript17.Name = "Shooter"
- LocalScript17.Parent = Tool0
- table.insert(cors,sandbox(LocalScript17,function()
- Tool = script.Parent
- local arms = nil
- local torso = nil
- local weld33 = nil -- right arm
- local weld55 = nil -- left arm
- local welds = {}
- local reloading = false
- local canreload = true
- local canshoot = true
- local damage = 200
- function Equip(mouse)
- wait(0.01)
- arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
- torso = Tool.Parent:FindFirstChild("Torso")
- if arms ~= nil and torso ~= nil then
- local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
- if sh ~= nil then
- local yes = true
- if yes then
- yes = false
- sh[1].Part1 = nil
- sh[2].Part1 = nil
- falsearm1 = arms[1]:clone()
- local mesh1 = Instance.new("BlockMesh")
- mesh1.Scale = Vector3.new(.9,.9,.9)
- mesh1.Parent = falsearm1
- local armweld1 = Instance.new("Weld")
- falsearm1.BrickColor = BrickColor.new(26)
- falsearm1.Parent = Tool
- armweld1.Parent = falsearm1
- armweld1.Part0 = falsearm1
- armweld1.Part1 = arms[1]
- falsearm2 = arms[2]:clone()
- local mesh2 = Instance.new("BlockMesh")
- mesh2.Scale = Vector3.new(.9,.9,.9)
- mesh2.Parent = falsearm2
- local armweld2 = Instance.new("Weld")
- falsearm2.BrickColor = BrickColor.new(26)
- falsearm2.Parent = Tool
- armweld2.Parent = falsearm2
- armweld2.Part0 = falsearm2
- armweld2.Part1 = arms[2]
- local weld1 = Instance.new("Weld") -- left arm
- weld55 = weld1
- weld1.Part0 = torso
- weld1.Parent = torso
- weld1.Part1 = arms[1]
- weld1.C1 = CFrame.new(1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, 0)
- welds[1] = weld1
- local weld2 = Instance.new("Weld") -- right arm
- weld33 = weld2
- weld2.Part0 = torso
- weld2.Parent = torso
- weld2.Part1 = arms[2]
- weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, 0)
- welds[2] = weld2
- --Takeout()
- end
- else
- print("sh")
- end
- else
- print("arms")
- end
- end
- local legs = nil
- local torso2 = nil
- local welds2 = {}
- local bodyforce = nil
- function Unequip(mouse)
- if arms ~= nil and torso ~= nil then
- local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
- if sh ~= nil then
- local yes = true
- if yes then
- yes = false
- sh[1].Part1 = arms[1]
- sh[2].Part1 = arms[2]
- welds[1].Parent = nil
- welds[2].Parent = nil
- falsearm1:remove()
- falsearm2:remove()
- end
- else
- print("sh")
- end
- else
- print("arms")
- end
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "http://www.roblox.com/asset/?id=49912389"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- mouse.KeyDown:connect(KeyDownFunctions)
- while true do
- wait()
- end
- end
- Tool.Equipped:connect(onEquippedLocal)
- script.Parent.Activated:connect(onActivated)
- Tool.Equipped:connect(Equip)
- Tool.Unequipped:connect(Unequip)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Add Comment
Please, Sign In to add comment