Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- 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")
- Script1 = Instance.new("Script")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Part3 = Instance.new("Part")
- SpecialMesh4 = Instance.new("SpecialMesh")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- Sound8 = Instance.new("Sound")
- Sound9 = Instance.new("Sound")
- Sound10 = Instance.new("Sound")
- Sound11 = Instance.new("Sound")
- Sound12 = Instance.new("Sound")
- Sound13 = Instance.new("Sound")
- Sound14 = Instance.new("Sound")
- Sound15 = Instance.new("Sound")
- Sound16 = Instance.new("Sound")
- LocalScript17 = Instance.new("LocalScript")
- Tool0.Name = "SkullCane"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=16433211"
- Tool0.Grip = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Tool0.GripForward = Vector3.new(-1, -0, -0)
- Tool0.GripPos = Vector3.new(0, 0, -1.5)
- Tool0.GripRight = Vector3.new(0, 1, 0)
- Tool0.GripUp = Vector3.new(0, 0, 1)
- Script1.Name = "SwordScript"
- Script1.Parent = Tool0
- table.insert(cors,sandbox(Script1,function()
- -------- OMG HAX
- debris = game:GetService("Debris")
- r = game:service("RunService")
- local damage = math.huge
- local slash_damage = math.huge
- sword = script.Parent.Handle
- Tool = script.Parent
- local SlashSound = Instance.new("Sound")
- SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
- SlashSound.Parent = sword
- SlashSound.Volume = 1
- local UnsheathSound = Instance.new("Sound")
- UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
- UnsheathSound.Parent = sword
- UnsheathSound.Volume = 1
- local DustSound = Instance.new("Sound")
- DustSound.SoundId = "http://www.roblox.com/asset/?id=16433289"
- DustSound.Parent = sword
- DustSound.Volume = 1
- function isTurbo(character)
- return character:FindFirstChild("RiddlingSkull") ~= nil
- end
- function blow(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
- -- final check, make sure sword is in-hand
- local right_arm = vCharacter:FindFirstChild("Right Arm")
- if (right_arm ~= nil) then
- local joint = right_arm:FindFirstChild("RightGrip")
- if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
- if humanoid.Health > damage and humanoid.Health > 0 then
- tagHumanoid(humanoid, vPlayer)
- humanoid:TakeDamage(damage)
- else
- DarkKill(humanoid.Parent, humanoid, vPlayer, vCharacter)
- end
- end
- end
- end
- end
- function DarkKill(character, humanoid, attacker, vChar)
- if (character:FindFirstChild("ForceField") ~= nil) then return end
- DustSound:Play()
- local childs = character:GetChildren()
- local colors = {}
- tagHumanoid(humanoid, attacker)
- humanoid.Health = 0
- for i=1,#childs do
- if (childs[i].className == "Part") then
- colors[i] = childs[i].BrickColor
- childs[i].BrickColor = BrickColor.new(26)
- childs[i].CanCollide = true
- childs[i].Anchored = true
- end
- if (childs[i].Name == "Head") then
- local m = childs[i]:FindFirstChild("Mesh")
- if (m ~= nil) then
- m:Remove()
- end
- script.SkullMesh:Clone().Parent = childs[i]
- childs[i].Anchored = false
- end
- end
- wait(.25)
- local limit = 1
- if (isTurbo(vChar) == true) then limit = 3 end
- for i=1,#childs do
- if (childs[i].className == "Part" and childs[i].Name ~= "Head") then
- for n=0,limit do
- local p = Instance.new("Part")
- p.formFactor = 2
- p.Size = Vector3.new(1,.4,1)
- p.BrickColor = BrickColor.new(26)
- p.Material = Enum.Material.Concrete
- p.TopSurface = 0
- p.BottomSurface = 0
- p.CFrame = childs[i].CFrame + Vector3.new(0,n,0)
- childs[i]:Remove()
- p.Parent = game.Workspace
- debris:AddItem(p, 60)
- end
- end
- end
- end
- function tagHumanoid(humanoid, player)
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = player
- creator_tag.Name = "creator"
- creator_tag.Parent = humanoid
- debris:AddItem(creator_tag, 1)
- end
- function attack()
- damage = slash_damage
- SlashSound:play()
- local anim = Instance.new("StringValue")
- anim.Name = "toolanim"
- anim.Value = "Slash"
- anim.Parent = Tool
- end
- function swordUp()
- Tool.GripForward = Vector3.new(-1,0,0)
- Tool.GripRight = Vector3.new(0,1,0)
- Tool.GripUp = Vector3.new(0,0,1)
- end
- function swordOut()
- Tool.GripForward = Vector3.new(0,0,1)
- Tool.GripRight = Vector3.new(0,-1,0)
- Tool.GripUp = Vector3.new(-1,0,0)
- 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
- if (isTurbo(character) == true) then
- slash_damage = 20
- else
- slash_damage = 15
- end
- attack()
- wait(1)
- Tool.Enabled = true
- end
- function onEquipped()
- UnsheathSound:play()
- end
- script.Parent.Activated:connect(onActivated)
- script.Parent.Equipped:connect(onEquipped)
- connection = sword.Touched:connect(blow)
- end))
- SpecialMesh2.Name = "SkullMesh"
- SpecialMesh2.Parent = Script1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=4770583"
- SpecialMesh2.Scale = Vector3.new(3.20000005, 3.20000005, 3.20000005)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=4770560"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Part3.Name = "Handle"
- Part3.Parent = Tool0
- Part3.CFrame = CFrame.new(-109.500053, 0.399930924, -63, 1, -0.000138141826, 5.96046448e-08, 0.000138141826, 1, 3.18323146e-12, -5.96046448e-08, 3.63797881e-12, 1)
- Part3.Orientation = Vector3.new(0, 0, 0.00999999978)
- Part3.Position = Vector3.new(-109.500053, 0.399930924, -63)
- Part3.Rotation = Vector3.new(0, 0, 0.00999999978)
- Part3.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part3.Size = Vector3.new(1, 0.800000012, 4)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.BrickColor = BrickColor.new("Dark stone grey")
- Part3.Locked = true
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.brickColor = BrickColor.new("Dark stone grey")
- Part3.FormFactor = Enum.FormFactor.Plate
- Part3.formFactor = Enum.FormFactor.Plate
- SpecialMesh4.Parent = Part3
- SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=12710534"
- SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=12710521"
- SpecialMesh4.MeshType = Enum.MeshType.FileMesh
- Sound5.Parent = Part3
- Sound5.SoundId = "rbxasset://sounds/swordslash.wav"
- Sound5.Volume = 1
- Sound6.Parent = Part3
- Sound6.SoundId = "rbxasset://sounds/unsheath.wav"
- Sound6.Volume = 1
- Sound7.Parent = Part3
- Sound7.SoundId = "http://www.roblox.com/asset/?id=16433289"
- Sound7.Volume = 1
- Sound8.Parent = Part3
- Sound8.SoundId = "rbxasset://sounds/swordslash.wav"
- Sound8.Volume = 1
- Sound9.Parent = Part3
- Sound9.SoundId = "rbxasset://sounds/unsheath.wav"
- Sound9.Volume = 1
- Sound10.Parent = Part3
- Sound10.SoundId = "http://www.roblox.com/asset/?id=16433289"
- Sound10.Volume = 1
- Sound11.Parent = Part3
- Sound11.SoundId = "rbxasset://sounds/swordslash.wav"
- Sound11.Volume = 1
- Sound12.Parent = Part3
- Sound12.SoundId = "rbxasset://sounds/unsheath.wav"
- Sound12.Volume = 1
- Sound13.Parent = Part3
- Sound13.SoundId = "http://www.roblox.com/asset/?id=16433289"
- Sound13.Volume = 1
- Sound14.Parent = Part3
- Sound14.SoundId = "rbxasset://sounds/swordslash.wav"
- Sound14.Volume = 1
- Sound15.Parent = Part3
- Sound15.SoundId = "rbxasset://sounds/unsheath.wav"
- Sound15.Volume = 1
- Sound16.Parent = Part3
- Sound16.SoundId = "http://www.roblox.com/asset/?id=16433289"
- Sound16.Volume = 1
- LocalScript17.Name = "Local Gui"
- LocalScript17.Parent = Tool0
- table.insert(cors,sandbox(LocalScript17,function()
- local Tool = script.Parent;
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = false
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- wait(1)
- 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)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- 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