Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ~~~~~~~~~~~~~~~~~~~~
- local tox = game.Players["Derek1017"]
- local t = Instance.new("Tool")
- t.Parent = tox.Backpack
- t.Name = "BLAAGH!"
- local h = Instance.new("Part")
- h.Name = "Handle"
- h.Parent = t
- h.Transparency = 1
- local sound1 = Instance.new("Sound")
- sound1.Name = "Swoosh"
- sound1.SoundId = "rbxasset://sounds\Rocket whoosh 01.wav"
- sound1.Parent = t
- local sound2 = Instance.new("Sound")
- sound2.Name = "Explosion"
- sound2.SoundId = "rbxasset://sounds\collide.wav"
- sound2.Parent = t
- local script1 = Instance.new("Script")
- script1.Name = "RocketScript"
- script1.Source = [[
- 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.Position = shaft.Position
- explosion.BlastPressure = 100000
- explosion.BlastRadius = 20
- -- 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)
- 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()
- ]]
- script1.Parent = t
- local script2 = Instance.new("Script")
- script2.Name = "Server Launcher"
- script2.Source = [[
- local Rocket = Instance.new("Part")
- local Sparkle = Instance.new("Sparkles")
- local Tool = script.Parent
- Rocket.Locked = true
- Rocket.Size = Vector3.new(1,1,4)
- Rocket.Transparency = 1
- Tool.RocketScript:clone().Parent = Rocket
- Tool.Explosion:clone().Parent = Rocket
- Tool.Swoosh: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 spark = Sparkle: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
- spark.Parent = missile
- 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
- local msg = Instance.new("Hint")
- msg.Text = "DR OCTAGONAPUS"
- msg.Parent = game.Workspace
- wait(0.5)
- fire(targetPos)
- msg.Text = "DR OCTAGONAPUS BLAAGH"
- wait(1.5)
- msg:remove()
- Tool.Enabled = true
- end
- script.Parent.Activated:connect(onActivated)
- ]]
- script2.Parent = t
- local script3 = Instance.new("Script")
- script3.Name = "Local Gui"
- script3.Source = [[
- local Tool = script.Parent;
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = false
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- wait(7)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- enabled = true
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- ]]
- script.Parent = t
- tox.Character.Animate:remove()
- p = tox.Character.Torso:GetChildren()
- local shirt = tox.Character:findFirstChild("Shirt")
- if shirt ~= nil then shirt:remove() end
- local pants = tox.Character:findFirstChild("Pants")
- if pants ~= nil then pants:remove() end
- tox.Character.Torso.roblox:remove()
- tox.Character.Head.face.Texture = "http://www.roblox.com/asset/?version=1&id=1496869"
- h = tox.Character:GetChildren()
- for i=1, #h do
- if h[i].className == "Hat" then
- h[i]:remove()
- end
- end
- for i = 1, #p do
- if p[i].className == "Motor" then
- p[i].MaxVelocity = 1
- end
- end
- while true do
- for i=1, #p do
- if p[i].className == "Motor" then
- p[i].DesiredAngle = 1
- end
- end
- wait()
- for i=1, #p do
- if p[i].className == "Motor" then
- p[i].DesiredAngle = 2
- end
- end
- wait()
- for i=1, #p do
- if p[i].className == "Motor" then
- p[i].DesiredAngle = 3
- end
- end
- wait()
- for i=1, #p do
- if p[i].className == "Motor" then
- p[i].DesiredAngle = 4
- end
- end
- wait()
- for i=1, #p do
- if p[i].className == "Motor" then
- p[i].DesiredAngle = 3
- end
- end
- wait()
- for i=1, #p do
- if p[i].className == "Motor" then
- p[i].DesiredAngle = 2
- end
- end
- wait()
- for i=1, #p do
- if p[i].className == "Motor" then
- p[i].DesiredAngle = 1
- end
- end
- wait()
- for i=1, #p do
- if p[i].className == "Motor" then
- p[i].DesiredAngle = 0
- end
- end
- wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement