Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local RunService = game:GetService("RunService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- RequestCommand:InvokeServer(";hat me")
- local Players = game:GetService("Players")
- local UserInputService = game:GetService("UserInputService")
- local RequestCommand = ReplicatedStorage:WaitForChild("HDAdminHDClient").Signals.RequestCommandModification
- local tool
- for _, v in player:GetDescendants() do
- if v.Name == "SyncAPI" then
- tool = v.Parent
- end
- end
- for _, v in game.ReplicatedStorage:GetDescendants() do
- if v.Name == "SyncAPI" then
- tool = v.Parent
- end
- end
- local remote = tool.SyncAPI.ServerEndpoint
- function _(args)
- remote:InvokeServer(unpack(args))
- end
- function CreateSyncWeld(part0, part1)
- local args = {
- [1] = "SyncWeld",
- [2] = {
- Part0 = part0,
- Part1 = part1,
- C0 = part0.CFrame:Inverse() * part1.CFrame,
- C1 = CFrame.new()
- }
- }
- _(args)
- end
- function MovePart(part, cf)
- local args = {
- [1] = "SyncMove",
- [2] = {
- [1] = {
- ["Part"] = part,
- ["CFrame"] = cf
- }
- }
- }
- _(args)
- end
- function KillTarget(target)
- if target and target.Character then
- local head = target.Character:FindFirstChild("Head")
- if head then
- local args = {
- [1] = "SetLocked",
- [2] = { [1] = head },
- [3] = false
- }
- _(args)
- task.wait(0.1)
- local args2 = {
- [1] = "Remove",
- [2] = { [1] = head }
- }
- _(args2)
- end
- end
- end
- local humanoid = character:WaitForChild("Humanoid")
- local arm = character:FindFirstChild("Right Arm")
- local holdAnimation = Instance.new("Animation")
- holdAnimation.AnimationId = "rbxassetid://48146273"
- local holdTrack = humanoid:LoadAnimation(holdAnimation)
- local killAnimation = Instance.new("Animation")
- killAnimation.AnimationId = "rbxassetid://48146273"
- local killTrack = humanoid:LoadAnimation(killAnimation)
- local function playKillAnimation()
- killTrack:Play()
- if killTrack.Length == 0 then
- killTrack:GetPropertyChangedSignal("Length"):Wait()
- end
- task.delay(killTrack.Length - 0.3, function()
- killTrack:Stop()
- end)
- end
- local function playHoldAnimation()
- holdTrack:Play()
- task.wait(0.3)
- holdTrack:AdjustSpeed(0)
- end
- local isBusy = false
- local alignPosition
- local alignOrientation
- local function attachBehind(targetChar)
- local root = character:FindFirstChild("HumanoidRootPart")
- local targetRoot = targetChar:FindFirstChild("HumanoidRootPart")
- if root and targetRoot then
- -- Attachments
- local attachment0 = root:FindFirstChild("Attachment") or Instance.new("Attachment", root)
- local attachment1 = targetRoot:FindFirstChild("Attachment") or Instance.new("Attachment", targetRoot)
- -- AlignPosition
- alignPosition = Instance.new("AlignPosition")
- alignPosition.MaxForce = 1000000
- alignPosition.Responsiveness = 200
- alignPosition.Attachment0 = attachment0
- alignPosition.Attachment1 = attachment1
- alignPosition.Parent = root
- -- AlignOrientation
- alignOrientation = Instance.new("AlignOrientation")
- alignOrientation.MaxTorque = 1000000
- alignOrientation.Responsiveness = 200
- alignOrientation.Attachment0 = attachment0
- alignOrientation.Attachment1 = attachment1
- alignOrientation.Parent = root
- -- Ставим позади игрока
- attachment1.Position = Vector3.new(0, 0, 1) -- на 2 позиции сзади
- end
- end
- local function detach()
- if alignPosition then
- alignPosition:Destroy()
- alignPosition = nil
- end
- if alignOrientation then
- alignOrientation:Destroy()
- alignOrientation = nil
- end
- end
- local function attack()
- if isBusy then return end
- isBusy = true
- local hitPlayer = nil
- local touchedConnection
- local function onTouch(other)
- local otherPlayer = Players:GetPlayerFromCharacter(other.Parent)
- if otherPlayer and otherPlayer ~= player then
- hitPlayer = otherPlayer
- end
- end
- touchedConnection = arm.Touched:Connect(onTouch)
- task.wait(0.15)
- if touchedConnection then
- touchedConnection:Disconnect()
- end
- if hitPlayer and hitPlayer.Character then
- -- Притягиваемся к игроку
- attachBehind(hitPlayer.Character)
- holdTrack:Play()
- task.wait(0.3)
- holdTrack:AdjustSpeed(0)
- wait(3)
- holdTrack:Stop()
- wait(0.5)
- playKillAnimation()
- KillTarget(hitPlayer)
- RequestCommand:InvokeServer(";music 115478216144558")
- wait(1)
- RequestCommand:InvokeServer(";unmusic")
- detach()
- isBusy = false
- else
- playKillAnimation()
- wait(0.4)
- isBusy = false
- end
- end
- UserInputService.TouchStarted:Connect(function(input, gameProcessed)
- if gameProcessed then return end
- attack()
- end)
Advertisement
Add Comment
Please, Sign In to add comment