Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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")
- LocalScript1 = Instance.new("LocalScript")
- Part2 = Instance.new("Part")
- Sound3 = Instance.new("Sound")
- SpecialMesh4 = Instance.new("SpecialMesh")
- Script5 = Instance.new("Script")
- Script6 = Instance.new("Script")
- Tool0.Name = "BanHammer"
- Tool0.Parent = mas
- Tool0.GripPos = Vector3.new(0, -1.29999995, 0)
- LocalScript1.Name = "Local Gui"
- LocalScript1.Parent = Tool0
- Part2.Name = "Handle"
- Part2.Parent = Tool0
- Part2.BrickColor = BrickColor.new("Dark stone grey")
- Part2.Rotation = Vector3.new(-0.0799999982, 86.1999969, 90.0799942)
- Part2.RotVelocity = Vector3.new(0.00102792226, -0.000492732797, -0.00233189948)
- Part2.Velocity = Vector3.new(0.00164371042, -0.00827400293, -0.000668970461)
- Part2.FormFactor = Enum.FormFactor.Symmetric
- Part2.Size = Vector3.new(1, 4, 2)
- Part2.CFrame = CFrame.new(-33.9286079, 0.891649067, 7.43305969, -8.98174985e-05, -0.0663281381, 0.997797906, 1, 2.43193026e-05, 9.1587659e-05, -3.04132845e-05, 0.997797906, 0.0663281009)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part2.Position = Vector3.new(-33.9286079, 0.891649067, 7.43305969)
- Part2.Orientation = Vector3.new(-0.00999999978, 86.1999969, 90)
- Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Sound3.Name = "Boom"
- Sound3.Parent = Part2
- Sound3.SoundId = "rbxasset://sounds/Rocket shot.wav"
- Sound3.Volume = 1
- SpecialMesh4.Parent = Part2
- SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=10604848"
- SpecialMesh4.Scale = Vector3.new(0.5, 0.5, 0.5)
- SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=10605252"
- SpecialMesh4.MeshType = Enum.MeshType.FileMesh
- SpecialMesh4.Scale = Vector3.new(0.5, 0.5, 0.5)
- Script5.Name = "HammerScript"
- Script5.Parent = Tool0
- table.insert(cors,sandbox(Script5,function()
- -------- OMG HAX
- r = game:service("RunService")
- Tool = script.Parent
- hammer = Tool.Handle
- local shockRing = Instance.new("Part")
- shockRing.formFactor = 2
- shockRing.Size = Vector3.new(1, 0.4, 1)
- shockRing.Anchored = true
- shockRing.Locked = true
- shockRing.CanCollide = false
- shockRing.archivable = false
- shockRing.TopSurface = 0
- shockRing.BottomSurface = 0
- shockRing.Transparency = 1
- local decal = Instance.new("Decal")
- decal.Face = 1
- decal.Texture = "http://www.roblox.com/asset/?version=1&id=1280730"
- decal.Parent = shockRing
- local bottomDecal = decal:Clone()
- bottomDecal.Face = 4
- bottomDecal.Parent = shockRing
- function doDamage(hit)
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
- if humanoid~=nil and humanoid ~= hum and hum ~= nil then
- tagHumanoid(humanoid, vPlayer)
- humanoid:TakeDamage(humanoid.MaxHealth)
- if humanoid.Health <= 0 then
- local c = hit.CFrame
- hit.CFrame = CFrame.new(hit.Position)
- hit.CFrame = c
- end
- delay(1, function() untagHumanoid(humanoid) end)
- else
- local c = hit.CFrame hit:BreakJoints() hit.CFrame = CFrame.new(hit.Position) hit.CFrame = c
- end
- end
- function tagHumanoid(humanoid, player)
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = player
- creator_tag.Name = "creator"
- creator_tag.Parent = humanoid
- end
- function untagHumanoid(humanoid)
- if humanoid ~= nil then
- local tag = humanoid:findFirstChild("creator")
- if tag ~= nil then
- tag.Parent = nil
- end
- end
- end
- function blow(obj, pos, notme)
- if (obj ~= notme) then
- if (obj.className == "Part") or (obj.className == "Seat") then
- if (not obj.Anchored) and (((pos - obj.Position) * Vector3.new(1, 0, 1)).magnitude < 96) and (pos.y <= obj.Position.y + 8) and (pos.y >= obj.Position.y - 8) then
- delay((pos - obj.Position).magnitude / 96, function() doDamage(obj) obj.Velocity = ((obj.Position - pos).unit + Vector3.new(0, 0.5, 0)) * 96 + obj.Velocity obj.RotVelocity = obj.RotVelocity + Vector3.new(obj.Position.z - pos.z, 0, pos.x - obj.Position.x).unit * 40 end)
- end
- elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
- local list = obj:GetChildren()
- for x = 1, #list do
- blow(list[x], pos, notme)
- end
- end
- end
- end
- function attack()
- damage = slash_damage
- local anim = Instance.new("StringValue")
- anim.Name = "toolanim"
- anim.Value = "Slash"
- anim.Parent = Tool
- wait(0.2)
- print("Blasting!")
- local pos = hammer.CFrame * (Vector3.new(0, 1.4, 0) * hammer.Mesh.Scale)
- blow(workspace, pos, Tool.Parent)
- shockRing.CFrame = CFrame.new(pos)
- for x = 1, 29 do
- delay(x / 30, function() shockRing.Parent = nil shockRing.Size = Vector3.new(0, 0.4, 0) + Vector3.new(6.4, 0, 6.4) * x shockRing.Parent = Tool end)
- end
- delay(1, function() shockRing.Parent = nil end)
- 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
- hammer.Boom:Play()
- attack()
- wait(0.5)
- Tool.Enabled = true
- end
- script.Parent.Activated:connect(onActivated)
- --script.Parent.Equipped:connect(onEquipped)
- end))
- Script6.Name = "Two-Handed Script"
- Script6.Parent = Tool0
- table.insert(cors,sandbox(Script6,function()
- --By Naruto902
- --player
- player = nil
- --save shoulders
- RSH, LSH = nil, nil
- --grip
- GRP = nil
- --welds
- RW, LW = Instance.new("Weld"), Instance.new("Weld")
- --what anim
- anim = "none"
- --onselected, save shoulders and get player
- script.Parent.Equipped:connect(function()
- player = game.Players:playerFromCharacter(script.Parent.Parent)
- local ch = script.Parent.Parent
- RSH = ch.Torso["Right Shoulder"]
- LSH = ch.Torso["Left Shoulder"]
- GRP = ch["Right Arm"].RightGrip
- --
- RSH.Parent = nil
- LSH.Parent = nil
- --
- RW.Part0 = ch.Torso
- RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
- RW.C1 = CFrame.new(0, 0.5, 0)
- RW.Part1 = ch["Right Arm"]
- RW.Parent = ch.Torso
- _G.R = RW
- --
- LW.Part0 = ch.Torso
- LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
- LW.C1 = CFrame.new(0, 0.5, 0)
- LW.Part1 = ch["Left Arm"]
- LW.Parent = ch.Torso
- _G.L = LW
- --
- GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1, 0, 0)
- --Bring_Arm_Up animation
- for i = 0, 1, 0.05 do
- wait()
- RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i)
- LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i)
- LW.C1 = CFrame.new(-0.3*i, 0.5+1.2*i, 0)
- end
- end)
- --griptcf = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-math.pi/2+0.5, 0, 0)
- script.Parent.Unequipped:connect(function()
- --Bring_Arm_Down animation
- for i = 1, 0, -0.05 do
- wait()
- RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i)
- LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i)
- LW.C1 = CFrame.new(-0.3*i, 0.5+1.2*i, 0)
- end
- RW.Parent = nil
- LW.Parent = nil
- RSH.Parent = player.Character.Torso
- LSH.Parent = player.Character.Torso
- end)
- function HomeRunHit(part)
- local h = (part.Parent or game):FindFirstChild("Humanoid") --or findfirstchild optimization
- if h then
- h.Sit = true
- wait()
- h.Jump = true
- h.Parent.Torso.Velocity = (CFrame.new(script.Parent.Handle.Position, h.Parent.Torso.Position).lookVector * 100) + Vector3.new(0, 30, 0)
- h.Parent.Torso.RotVelocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
- end
- end
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = owner.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement