Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local gun = Instance.new("Tool",plr.Backpack)
- gun.CanBeDropped = false
- gun.Name = "Katana"
- gun.GripPos = Vector3.new(0, 0, -1.691)
- gun.GripUp = Vector3.new(-0, -0, 1)
- gun.GripRight = Vector3.new(-0, 1, 0)
- local handle = Instance.new("Part",gun)
- handle.Reflectance = 0.4
- handle.Position = char.Head.Position
- handle.Name = "Handle"
- handle.Size = Vector3.new(1, 0.8, 5)
- local mesh = Instance.new("SpecialMesh",handle)
- mesh.MeshType = "FileMesh"
- mesh.Scale = Vector3.new(1.7,1.7,1.7)
- mesh.MeshId = "http://www.roblox.com/asset/?id=11442510"
- mesh.TextureId = "http://www.roblox.com/asset/?id=11442524"
- local mouse = plr:GetMouse()
- local mtarget
- local canshoot = false
- local cankill = false
- gun.Equipped:connect(function()
- canshoot = true
- char.Animate.toolnone.ToolNoneAnim.AnimationId = "rbxassetid://2260512453"
- end)
- gun.Unequipped:connect(function()
- canshoot = false
- char.Animate.toolnone.ToolNoneAnim.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- end)
- function onTouched(brick)
- if cankill == true then
- local humn = brick.Parent:FindFirstChildOfClass("Humanoid")
- if humn then
- local par = humn.Parent
- humn.Health = 0
- wait(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000001)
- local kill = math.random(1,50)
- if kill == 1 then
- par["Head"]:BreakJoints()
- print("Work")
- end
- if kill == 2 then
- par["Torso"]:BreakJoints()
- print("Work")
- end
- if kill == 3 then
- par["Left Leg"]:BreakJoints()
- print("Work")
- end
- if kill == 4 then
- par["Right Leg"]:BreakJoints()
- print("Work")
- end
- if kill == 5 then
- par["Right Arm"]:BreakJoints()
- print("Work")
- end
- if kill == 6 then
- par["Left Arm"]:BreakJoints()
- print("Work")
- end
- end
- end
- end
- handle.Touched:connect(onTouched)
- function clickObj()
- if canshoot == true then
- cankill = true
- local anim = char.Humanoid:LoadAnimation(char.Animate.toolnone:FindFirstChildOfClass("Animation"))
- anim:Play()
- wait(0.1)
- cankill = false
- end
- end
- mouse.Button1Down:connect(clickObj)
- function onKeyDown2(key2)
- if key2 == "e" then
- if canshoot == true then
- local mtarget = mouse.Target
- local humn = mtarget.Parent:FindFirstChildOfClass("Humanoid")
- if humn then
- local par = humn.Parent
- local storage = game:GetService("ServerStorage")
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "CharacterMesh" or v.ClassName == "Hat" or v.ClassName == "Accessory" or v.ClassName == "Shirt" or v.ClassName == "Pants" then
- v.Parent = storage
- end
- end
- for i,v in pairs(char.Head:GetChildren()) do
- if v.ClassName == "Decal" then
- v.Parent = storage
- end
- end
- for i,v in pairs(par:GetChildren()) do
- if v.ClassName == "CharacterMesh" or v.ClassName == "Shirt" or v.ClassName == "Pants" then
- v.Parent = char
- end
- end
- for i,v in pairs(par:GetChildren()) do
- if v.ClassName == "Hat" or v.ClassName == "Accessory" then
- v.Parent = game.Workspace
- v.Handle.Position = char.Head.Position
- v.Parent = char
- end
- end
- local hed = char.Head:Clone()
- local newmodel = Instance.new("Model",char)
- newmodel.Name = par.Name
- hed.Parent = newmodel
- local newhum = Instance.new("Humanoid",newmodel)
- newhum.MaxHealth = 0
- newhum.Health = 0
- local weld = Instance.new("Weld",hed)
- weld.Part0 = hed
- weld.Part1 = char.Head
- char.Head.Transparency = 1
- for i,v in pairs(par.Head:GetChildren()) do
- if v.ClassName == "Decal" then
- v.Parent = hed
- end
- end
- for i,v in pairs(par:GetChildren()) do
- if v.ClassName == "Part" then
- v:Destroy()
- end
- end
- end
- end
- end
- end
- function onKeyDown(key)
- if key == "r" then
- if canshoot == true then
- local storage = game:GetService("ServerStorage")
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "CharacterMesh" or v.ClassName == "Hat" or v.ClassName == "Accessory" or v.ClassName == "Shirt" or v.ClassName == "Pants" then
- v:Destroy()
- end
- end
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Model" then
- v:Destroy()
- end
- end
- char.Head.Transparency = 0
- for i,v in pairs(char.Head:GetChildren()) do
- if v.ClassName == "Decal" then
- v:Destroy()
- end
- end
- for i,v in pairs(storage:GetChildren()) do
- if v.ClassName == "CharacterMesh" or v.ClassName == "Hat" or v.ClassName == "Accessory" or v.ClassName == "Shirt" or v.ClassName == "Pants" then
- v.Parent = char
- end
- end
- for i,v in pairs(storage:GetChildren()) do
- if v.ClassName == "Decal" then
- v.Parent = char.Head
- end
- end
- end
- end
- end
- --Mouse Functions--
- Mouse = plr:GetMouse()
- if Mouse then
- Mouse.KeyDown:connect(onKeyDown)
- Mouse.KeyDown:connect(onKeyDown2)
- end
Advertisement