SebTDZ

Hitman

Jul 21st, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.52 KB | None | 0 0
  1. owner = game.Players["TheOfficialSeb"]
  2.  
  3. function FindPlayer(FindUser)
  4.     local findUser = string.lower(FindUser)
  5.     local inputsize = string.len(findUser)
  6.     for i, v in pairs(game.Players:GetChildren()) do
  7.         local NameLow = string.lower(v.Name)
  8.         if NameLow:sub(1, inputsize) == findUser:sub(1, inputsize) then
  9.             return v.Name
  10.         end
  11.     end
  12. end
  13.  
  14. owner.Chatted:connect(function(message)
  15.     local messageLow = string.lower(message)
  16.     if messageLow:sub(1, 5) == ".get " then
  17.         HitmanPlr(game:FindFirstChildOfClass("Players")[FindPlayer(message:sub(6))])
  18.     end
  19. end)
  20.  
  21. function HitmanPlr(target)
  22. local Char = Instance.new("Model", workspace)
  23.     Char.Name = "Hitman"
  24.    
  25.     local Human = Instance.new("Humanoid", Char)
  26.    
  27.     local Head = Instance.new("Part", Char)
  28.     Head.Name = "Head"
  29.     Head.Size = Vector3.new(2.5,1.5,1.5)
  30.    
  31.     local Face = Instance.new("Decal", Head)
  32.     Face.Name = "Face"
  33.     Face.Texture = "http://www.roblox.com/asset/?id=10749463"
  34.    
  35.     local Mesh1 = Instance.new("SpecialMesh", Head)
  36.     Mesh1.MeshType = Enum.MeshType.Head
  37.    
  38.     local Torso = Instance.new("Part", Char)
  39.     Torso.Name = "Torso"
  40.     Torso.Size = Vector3.new(2,2.5,1)
  41.     Torso.CanCollide = false
  42.    
  43.     local Shirt = Instance.new("Shirt", Char)
  44.     Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=3510515487"
  45.    
  46.     local Pants = Instance.new("Pants", Char)
  47.     Pants.PantsTemplate = "http://www.roblox.com/asset/?id=3510519325"
  48.    
  49.     local HumanRoot = Instance.new("Part", Char)
  50.     HumanRoot.Name = "HumanoidRootPart"
  51.     HumanRoot.Size = Vector3.new(2,2.5,1)
  52.     HumanRoot.Transparency = 1
  53.    
  54.     local Weld0 = Instance.new("Weld", Char)
  55.     Weld0.Part0 = HumanRoot
  56.     Weld0.Part1 = Torso
  57.    
  58.     local Weld1 = Instance.new("Weld", Char)
  59.     Weld1.Part0 = Torso
  60.     Weld1.Part1 = Head
  61.     Weld1.C1 = CFrame.new(0,-2,0)
  62.    
  63.     local RightArm = Instance.new("Part", Char)
  64.     RightArm.Name = "Right Arm"
  65.     RightArm.Size = Vector3.new(1,2.5,1)
  66.     RightArm.CanCollide = false
  67.    
  68.     local Weld2 = Instance.new("Weld", Char)
  69.     Weld2.Part0 = Torso
  70.     Weld2.Part1 = RightArm
  71.     Weld2.C1 = CFrame.new(-1.5,0,0)
  72.    
  73.     local LeftArm = Instance.new("Part", Char)
  74.     LeftArm.Name = "Left Arm"
  75.     LeftArm.Size = Vector3.new(1,2.5,1)
  76.     LeftArm.CanCollide = false
  77.    
  78.     local Weld3 = Instance.new("Weld", Char)
  79.     Weld3.Part0 = Torso
  80.     Weld3.Part1 = LeftArm
  81.     Weld3.C1 = CFrame.new(1.5,0,0)
  82.    
  83.     local RightLeg = Instance.new("Part", Char)
  84.     RightLeg.Name = "Right Leg"
  85.     RightLeg.Size = Vector3.new(1,2.5,1)
  86.     RightLeg.CanCollide = false
  87.    
  88.     local Weld4 = Instance.new("Weld", Char)
  89.     Weld4.Part0 = Torso
  90.     Weld4.Part1 = RightLeg
  91.     Weld4.C1 = CFrame.new(-0.5,2.5,0)
  92.    
  93.     local LeftLeg = Instance.new("Part", Char)
  94.     LeftLeg.Name = "Left Leg"
  95.     LeftLeg.Size = Vector3.new(1,2.5,1)
  96.     LeftLeg.CanCollide = false
  97.    
  98.     local Weld5 = Instance.new("Weld", Char)
  99.     Weld5.Part0 = Torso
  100.     Weld5.Part1 = LeftLeg
  101.     Weld5.C1 = CFrame.new(0.5,2.5,0)
  102.    
  103.     HumanRoot.CFrame = owner.Character.HumanoidRootPart.CFrame + Vector3.new(5,0,0)
  104.    
  105.     wait(5)
  106.    
  107.     local path = game:GetService("PathfindingService"):FindPathAsync(Torso.Position,target.Character.HumanoidRootPart.Position)
  108.     local Points = path:GetWaypoints()
  109.  
  110.     if path.Status == Enum.PathStatus.Success then
  111.         target.Character.HumanoidRootPart.Anchored = true
  112.         for i,p in pairs(Points) do
  113.             Human:MoveTo(p.Position)
  114.             Human.MoveToFinished:wait()
  115.             if p.Action == Enum.PathWaypointAction.Jump then
  116.                 Human.Jump = true
  117.             end
  118.         end
  119.     end
  120.    
  121.     target.Character.Humanoid.Health = -1
  122.     Char:Remove()
  123.     wait(5)
  124.     while true do
  125.         target.Character = nil
  126.         wait(0.1)
  127.     end
  128. end
Add Comment
Please, Sign In to add comment