Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rem = NS([[wait(1)
- local p = game.Players.asbuff
- repeat wait() until p.Character
- local c = p.Character
- local rs = c.Torso:WaitForChild("Right Shoulder")
- local ls = c.Torso:WaitForChild("Left Shoulder")
- local rl = c.Torso:WaitForChild("Right Hip")
- local ll = c.Torso:WaitForChild("Left Hip")
- local ra = c.HumanoidRootPart:WaitForChild("RootJoint")
- local raco = ra.C0
- local hum = c.Humanoid
- local rarm = c:WaitForChild("Right Arm")
- local rp = c:WaitForChild("HumanoidRootPart")
- local torso = c.Torso
- c:WaitForChild("Animate"):Destroy()
- local re = Instance.new("RemoteEvent",script)
- re.Name = "MINECRAFTASBUFF"
- local hitoffset = CFrame.new()
- local rpoffset = CFrame.new()
- local diamondsword = Instance.new("Part")
- diamondsword.Name = "sword"
- diamondsword.Color = Color3.new(.1,.6,1)
- diamondsword.Material = "Glass"
- local weld = Instance.new("Weld",diamondsword)
- weld.Part0 = diamondsword
- weld.Part1 = rarm
- diamondsword.CanCollide = false
- local mesh = Instance.new("SpecialMesh",diamondsword)
- mesh.MeshId = "rbxassetid://430286233"
- mesh.Scale = Vector3.new(.07,.07,.07)
- diamondsword.Size = Vector3.new(3.28, 0.05, 3.1)
- diamondsword.Parent = c
- local hsound = Instance.new("Sound",rp)
- hsound.SoundId = "rbxassetid://958257111"
- local hsound2 = Instance.new("Sound",rp)
- hsound2.SoundId = "rbxassetid://160432334"
- local rbodycols = c["Body Colors"]:Clone()
- local hbodycols = c["Body Colors"]:Clone()
- hbodycols.HeadColor = BrickColor.new("Really red")
- hbodycols.LeftArmColor = BrickColor.new("Really red")
- hbodycols.RightArmColor = BrickColor.new("Really red")
- hbodycols.LeftLegColor = BrickColor.new("Really red")
- hbodycols.RightLegColor = BrickColor.new("Really red")
- local bcols = c["Body Colors"]
- weld.C0 = CFrame.new(-.1,0,-1.5)*CFrame.Angles(0,(-math.pi/2)-.7,math.pi/2)
- local step = game:GetService("RunService").Stepped
- local lwalk = 0
- local rwalk = 0
- local wtick = 0
- local attacking = false
- local animplaying = false
- local anim = {}
- function anim.playanim()
- local self = {}
- self.stopping = false
- function self:stop()
- self.stopping = true
- end
- function self:play()
- local old = hitoffset
- for i = 1,5 do
- if self.stopping == false then
- hitoffset = hitoffset:lerp(CFrame.Angles(3,-.1,1),.4)
- rpoffset = rpoffset:lerp(CFrame.Angles(0,0,-.2),.4)
- step:wait()
- end
- end
- old = hitoffset
- for i = 1,5 do
- if self.stopping == false then
- hitoffset = hitoffset:lerp(CFrame.Angles(1.5,.4,-.5),.4)
- rpoffset = rpoffset:lerp(CFrame.Angles(0,0,.2),.4)
- step:wait()
- end
- end
- old = hitoffset
- for i = 1,5 do
- if self.stopping == false then
- hitoffset = hitoffset:lerp(CFrame.Angles(0,0,0),.4)
- rpoffset = rpoffset:lerp(CFrame.Angles(0,0,0),.4)
- step:wait()
- end
- end
- old = hitoffset
- return self.stopping
- end
- return self
- end
- function attack(part,v)
- if part.Parent:FindFirstChildOfClass("Humanoid") then
- part.Parent:FindFirstChildOfClass("Humanoid").Health = part.Parent:FindFirstChildOfClass("Humanoid").Health - 40
- part.Velocity = (v*50)+Vector3.new(0,50,0)
- hsound2:Play()
- if math.random()>.5 then
- part:Destroy()
- end
- end
- end
- local canim = nil
- local damaged = false
- function dmg()
- hsound:Play()
- re:FireAllClients("damage")
- end
- local healing = false
- re.OnServerEvent:connect(function(plr,w,p,d)
- if w == "damage" then
- attack(p,d)
- elseif w == "heal" then
- hum.MaxHealth = 4000
- healing = not healing
- else
- if canim then canim:stop() end
- attacking = true
- canim = anim.playanim()
- print("ok")
- local stopped = canim:play()
- print("yes")
- attacking = stopped
- end
- end)
- local oh = 100
- hum.Changed:connect(function()
- end)
- local tock = 0
- step:connect(function()
- if healing then
- hum.Health = hum.Health + 100
- end
- if hum.Health < oh then
- print("damaged")
- bcols.HeadColor = BrickColor.new("Really red")
- bcols.LeftArmColor = BrickColor.new("Really red")
- bcols.RightArmColor = BrickColor.new("Really red")
- bcols.LeftLegColor = BrickColor.new("Really red")
- bcols.RightLegColor = BrickColor.new("Really red")
- bcols.TorsoColor = BrickColor.new("Really red")
- tock = tick()+.1
- oh = hum.Health
- dmg()
- --damaged = true
- else
- if tock<tick() then
- bcols.HeadColor = rbodycols.HeadColor
- bcols.LeftArmColor = rbodycols.LeftArmColor
- bcols.RightArmColor = rbodycols.RightArmColor
- bcols.LeftLegColor = rbodycols.LeftLegColor
- bcols.RightLegColor = rbodycols.RightLegColor
- bcols.TorsoColor = rbodycols.TorsoColor
- end
- -- damaged = false
- end
- rs.C1 = CFrame.new()
- ls.C1 = CFrame.new()
- rl.C1 = CFrame.new()
- ll.C1 = CFrame.new()
- rl.C0 = CFrame.new(.5,-1,0)*CFrame.Angles(rwalk,0,0)*CFrame.new(0,-1,0)
- ll.C0 = CFrame.new(-.5,-1,0)*CFrame.Angles(lwalk,0,0)*CFrame.new(0,-1,0)
- ls.C0 = CFrame.new(-1.5,.5,0)*CFrame.Angles(rwalk,0,0)*CFrame.new(0,-.5,0)
- if attacking == false then
- rs.C0 = CFrame.new(1.5,.5,0)*CFrame.Angles(lwalk,0,0)*CFrame.new(0,-.5,0)
- ra.C0 = ra.C0:lerp(raco,.4)
- else
- rs.C0 = rs.C0:lerp(CFrame.new(1.5,.5,0)*hitoffset*CFrame.new(0,-.5,0),.7)
- ra.C0 = ra.C0:lerp(raco*rpoffset,.4)
- end
- if attacking == false then
- hitoffset = hitoffset:lerp(CFrame.new(),.1)
- end
- local vel = Vector3.new(rp.Velocity.x,0,rp.Velocity.z).magnitude
- wtick = wtick + vel*0.015
- if vel>0.1 then
- rwalk = math.sin(wtick)*.9
- lwalk = math.sin(wtick+math.pi)*.9
- else
- rwalk = rwalk/2
- lwalk = lwalk/2
- end
- end)
- ]], owner.Character):WaitForChild("MINECRAFTASBUFF")
- wait(1)
- local p = game.Players.LocalPlayer
- local c = p.Character
- local hum = c.Humanoid
- local torso = c.Torso
- local cam = workspace.CurrentCamera
- for i,v in next,hum:GetPlayingAnimationTracks() do
- v:Stop()
- end
- local uip = game:GetService("UserInputService")
- rem.OnClientEvent:connect(function(thing)
- if thing == "damage" then
- print("heck")
- torso.Velocity = torso.Velocity + Vector3.new(0,30,0)
- end
- end)
- uip.InputBegan:connect(function(a,b)
- if not b then
- if a.UserInputType == Enum.UserInputType.MouseButton1 then
- rem:FireServer("atk")
- local h = workspace:FindPartOnRayWithIgnoreList(Ray.new(cam.CFrame.p,cam.CFrame.LookVector*9),{c})
- if h then rem:FireServer("damage",h,cam.CFrame.LookVector) end
- end
- if a.UserInputType == Enum.UserInputType.MouseButton2 then
- rem:FireServer("heal")
- end
- end
- end)
- local ra = c:WaitForChild("Right Arm")
- local wep = c:WaitForChild("sword")
- while wait() do
- ra.LocalTransparencyModifier = 0
- wep.LocalTransparencyModifier = 0
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement