print[[SpearMan
z to spin attack
x to start spear attack
mouse to do attack
j to enter true hero mode
notice that when entering true hero mode you can't become normal
have fun]]
print("FE code by Starzozero, Thanks to him!")
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
local Player,game,owner = owner,game
local RealPlayer = Player
do
print("FE Compatibility code by Mokiros, Edited by StarzoZero")
local rp = RealPlayer
script.Parent = rp.Character
--RemoteEvent for communicating
local Event = Instance.new("RemoteEvent")
Event.Name = "UserInput_Event"
--Fake event to make stuff like Mouse.KeyDown work
local function fakeEvent()
local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
t.connect = t.Connect
return t
end
--Creating fake input objects with fake variables
local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
end}
--Merged 2 functions into one by checking amount of arguments
CAS.UnbindAction = CAS.BindAction
--This function will trigger the events that have been :Connect()'ed
local function te(self,ev,...)
local t = m[ev]
if t and t._fakeEvent then
for _,f in pairs(t.Functions) do
f(...)
end
end
end
m.TrigEvent = te
UIS.TrigEvent = te
Event.OnServerEvent:Connect(function(plr,io)
if plr~=rp then return end
m.Target = io.Target
m.Hit = io.Hit
if not io.isMouse then
local b = io.UserInputState == Enum.UserInputState.Begin
if io.UserInputType == Enum.UserInputType.MouseButton1 then
return m:TrigEvent(b and "Button1Down" or "Button1Up")
end
if io.UserInputType == Enum.UserInputType.MouseButton2 then
return m:TrigEvent(b and "Button2Down" or "Button2Up")
end
for _,t in pairs(CAS.Actions) do
for _,k in pairs(t.Keys) do
if k==io.KeyCode then
t.Function(t.Name,io.UserInputState,io)
end
end
end
m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
end
end)
Event.Parent = NLS([==[
local Player = game:GetService("Players").LocalPlayer
local Event = script:WaitForChild("UserInput_Event")
local Mouse = Player:GetMouse()
local UIS = game:GetService("UserInputService")
local input = function(io,a)
if a then return end
--Since InputObject is a client-side instance, we create and pass table instead
Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
end
UIS.InputBegan:Connect(input)
UIS.InputEnded:Connect(input)
local h,t
--Give the server mouse data 30 times every second, but only if the values changed
--If player is not moving their mouse, client won't fire events
while wait(1/30) do
if h~=Mouse.Hit or t~=Mouse.Target then
h,t=Mouse.Hit,Mouse.Target
Event:FireServer({isMouse=true,Target=t,Hit=h})
end
end]==],Player.Character)
----Sandboxed game object that allows the usage of client-side methods and services
--Real game object
local _rg = game
--Metatable for fake service
local fsmt = {
__index = function(self,k)
local s = rawget(self,"_RealService")
if s then
return typeof(s[k])=="function"
and function(_,...)return s[k](s,...)end or s[k]
end
end,
__newindex = function(self,k,v)
local s = rawget(self,"_RealService")
if s then s[k]=v end
end
}
local function FakeService(t,RealService)
t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
return setmetatable(t,fsmt)
end
--Fake game object
local g = {
GetService = function(self,s)
return rawget(self,s) or _rg:GetService(s)
end,
Players = FakeService({
LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
},"Players"),
UserInputService = FakeService(UIS,"UserInputService"),
ContextActionService = FakeService(CAS,"ContextActionService"),
RunService = FakeService({
_btrs = {},
RenderStepped = _rg:GetService("RunService").Heartbeat,
BindToRenderStep = function(self,name,_,fun)
self._btrs[name] = self.Heartbeat:Connect(fun)
end,
UnbindFromRenderStep = function(self,name)
self._btrs[name]:Disconnect()
end,
},"RunService")
}
rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
g.service = g.GetService
FakeService(g,game)
--Changing owner to fake player object to support owner:GetMouse()
game,owner = g,g.Players.LocalPlayer
end
--[[Salvo_Starly[Salvy].Weaponry_2018.2]]--
--[[Project Name: Spearman from Critical Strike]]--
--[[ukznhf]]--
wait(.2)
plr=game.Players.LocalPlayer
chr=plr.Character
Head=chr.Head
Root=chr.HumanoidRootPart
Torso=chr.Torso
RArm=chr["Right Arm"]
LArm=chr["Left Arm"]
RLeg=chr["Right Leg"]
LLeg=chr["Left Leg"]
RJ=Root.RootJoint
Neck=Torso.Neck
LS=Torso["Left Shoulder"]
LH=Torso["Left Hip"]
RS=Torso["Right Shoulder"]
RH=Torso["Right Hip"]
hum=chr:FindFirstChildOfClass("Humanoid")
mouse=plr:GetMouse()
Pose="Idle"
attack=false
combo=1
skilldoing=false
skilldoing2=false
wat=true
comb=1
sin=0
cha=1
create=LoadLibrary("RbxUtility").Create
wa=false
chr.Animate:Remove()
hum.Animator:Remove()
function clerp(a,b,t)
return a:lerp(b,t)
end
local newMotor=function(p0,p1,c0,c1)
local w=Instance.new('Motor',p0)
w.Part0=p0
w.Part1=p1
w.C0=c0
w.C1=c1
return w
end
RJ.C0,RJ.C1=CFrame.new(0,0,0),CFrame.new(0,0,0)
Neck.C0,Neck.C1=CFrame.new(0,1.5,0),CFrame.new(0,0,0)
--[[RS.C0,RS.C1=CFrame.new(1.5,0,0),CFrame.new(0,0,0)
LS.C0,LS.C1=CFrame.new(-1.5,0,0),CFrame.new(0,0,0)
RH.C0,RH.C1=CFrame.new(.5,-2,0),CFrame.new(0,0,0)
LH.C0,LH.C1=CFrame.new(-.5,-2,0),CFrame.new(0,0,0)]]
local RS=newMotor(Torso, RArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
local LS=newMotor(Torso, LArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
local RH=newMotor(Torso, RLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
local LH=newMotor(Torso, LLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
function NoOutline(Part)
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface=10,10,10,10,10,10
end
function rayCast(Position,Direction,Range,Ignore)
return game:service("Workspace"):FindPartOnRay(Ray.new(Position,Direction.unit*(Range or 999.999)),Ignore)
end
function swait(num)
if num==0 or num==nil then
game:service'RunService'.Stepped:wait(0)
else
for i=0,num do
game:service'RunService'.Stepped:wait(0)
end
end
end
function parts(Par,name,size,color,mat,ref,tra)
local part=create("Part"){
Parent=Par,
Name=name,
Size=size,
CanCollide=false,
Anchored=false,
BrickColor=BrickColor.new(color),
Material=mat,
Reflectance=ref,
Transparency=tra}
--Position=Torso.Position}
NoOutline(part)
part:BreakJoints()
return part
end
function meshs(Par,name,scale,mtype,id)
local mesh=create("SpecialMesh"){
Parent=Par,
Name=name,
Scale=scale,
MeshType=mtype}
if id~="" then
mesh.MeshId="rbxassetid://"..id
end
return meshs
end
function welds(Par,name,p0,p1,c0,c1)
local weld=create("Weld"){
Parent=Par,
Name=name,
Part0=p0,
Part1=p1,
C0=c0,
C1=c1}
return weld
end
function sounds(Par,id,vol,pit)
local sound=create("Sound"){
Parent=Par,
SoundId=id,
Volume=vol,
PlaybackSpeed=pit}
sound:Play()
game:GetService("Debris"):AddItem(sound,10)
return sound
end
m=Instance.new("Model",chr)
m.Name="Suit"
e=Instance.new("Model",chr)
e.Name="Effect"
S2T=parts(m,"S2T",Vector3.new(2.10000014, 0.199999928, 1.20000005),"Medium stone grey",Enum.Material.SmoothPlastic,0,0)
S2TWeld=welds(S2T,"S2TWeld",Torso,S2T,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 1.00002193, -7.62939453e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1))
meshs(S2T,"Mesh",Vector3.new(1, 1, 1),Enum.MeshType.Brick,"")
S2T=parts(m,"S2T",Vector3.new(0.899999976, 2.39999962, 1.20000005),"Medium stone grey",Enum.Material.SmoothPlastic,0,0)
S2TWeld=welds(S2T,"S2TWeld",Torso,S2T,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0499954224, 0.300019979, -7.62939453e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1))
meshs(S2T,"Mesh",Vector3.new(1, 1, 1),Enum.MeshType.Brick,"")
S2T=parts(m,"S2T",Vector3.new(2.10000014, 0.89999938, 1.30000007),"Medium stone grey",Enum.Material.SmoothPlastic,0,0)
S2TWeld=welds(S2T,"S2TWeld",Torso,S2T,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.52587891e-05, -0.549978018, 0.0499954224, 1, 0, 0, 0, 1, 0, 0, 0, 1))
meshs(S2T,"Mesh",Vector3.new(1, 1.00999999, 1),Enum.MeshType.Brick,"")
S2T=parts(m,"S2T",Vector3.new(2.10000014, 0.89999938, 1.30000007),"Medium stone grey",Enum.Material.SmoothPlastic,0,0)
S2TWeld=welds(S2T,"S2Weld",Torso,S2T,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.52587891e-05, -0.549978018, 0.0499954224, 1, 0, 0, 0, 1, 0, 0, 0, 1))
meshs(S2T,"Mesh",Vector3.new(1, 1.00999999, 1),Enum.MeshType.Brick,"")
S2=parts(m,"S2",Vector3.new(0.499999911, 1.09999943, 1.4000001),"Institutional white",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",Torso,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0499954224, -0.549978018, -7.62939453e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1))
meshs(S2,"Mesh",Vector3.new(1, 1, 1.00999999),Enum.MeshType.Brick,"")
S2=parts(m,"S2",Vector3.new(0.200000003, 1.00000012, 0.200000003),"Institutional white",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",Torso,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.424274445, 0.494991302, -0.600006104, 0.707106829, -0.707106829, -0, 0.707106829, 0.707106829, 0, 0, 0, 1))
meshs(S2,"Mesh",Vector3.new(1, 1, 1),Enum.MeshType.Brick,"")
S2=parts(m,"S2",Vector3.new(0.200000003, 1.00000012, 0.200000003),"Institutional white",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",Torso,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.494991302, -0.424274445, -0.600006104, -0.707106829, -0.707106829, 0, 0.707106829, -0.707106829, -0, 0, 0, 1))
meshs(S2,"Mesh",Vector3.new(1, 1, 1),Enum.MeshType.Brick,"")
S2H=parts(m,"S2H",Vector3.new(0.300000012, 0.300000012, 6.89999914),"Really black",Enum.Material.SmoothPlastic,0,0)
S2HWeld=welds(S2H,"S2HWeld",RArm,S2H,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(4.57763672e-05, 0.949999094, 0.749977112, 1, 0, 0, 0, 1, 0, 0, 0, 1))
meshs(S2,"Mesh",Vector3.new(1, 1, 1),Enum.MeshType.Brick,"")
S2T=parts(m,"S2T",Vector3.new(0.400000006, 0.400000006, 0.399999559),"Medium stone grey",Enum.Material.SmoothPlastic,0,0)
S2TWeld=welds(S2T,"S2TWeld",RArm,S2T,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(6.10351563e-05, 0.949999094, -2.90003204, 1, 0, 0, 0, 1, 0, 0, 0, 1))
meshs(S2T,"Mesh",Vector3.new(1, 1, 1),Enum.MeshType.Brick,"")
S2T=parts(m,"S2T",Vector3.new(0.400000006, 0.600000024, 1.19999969),"Medium stone grey",Enum.Material.SmoothPlastic,0,0)
S2TWeld=welds(S2T,"S2TWeld",RArm,S2T,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(6.10351563e-05, 0.849999905, 4.29997253, 1, 0, 0, 0, 1, 0, 0, 0, 1))
meshs(S2T,"Mesh",Vector3.new(1, 1, 1),Enum.MeshType.Brick,"")
S2=parts(m,"S2",Vector3.new(0.100000001, 0.700000048, 1.00000012),"Mid gray",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",RArm,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-05, 0.500000954, -4.59996796, -1, 0, 0, 0, 1, 0, 0, 0, -1))
meshs(S2,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Wedge,"")
S2=parts(m,"S2",Vector3.new(0.100000001, 0.700000048, 1.60000026),"Mid gray",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",RArm,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(4.57763672e-05, 0.500000954, 5.89997101, 1, 0, 0, 0, 1, 0, 0, 0, 1))
meshs(S2,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Wedge,"")
S2=parts(m,"S2",Vector3.new(0.100000001, 1.00000012, 1.30000019),"Institutional white",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",RArm,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(4.57763672e-05, -1.35000098, -4.44997406, 1, 0, 0, 0, -1, 0, 0, 0, -1))
meshs(S2,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Wedge,"")
S2=parts(m,"S2",Vector3.new(0.100000001, 1.00000012, 2.99999928),"Institutional white",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",RArm,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-05, -1.35000098, 6.59997559, -1, 0, 0, 0, -1, 0, 0, 0, 1))
meshs(S2,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Wedge,"")
S2=parts(m,"S2",Vector3.new(0.100000001, 0.400000006, 0.400000006),"Institutional white",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",RArm,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-05, -1.35000098, -2.90002441, -1, 0, 0, 0, -1, 0, 0, 0, 1))
meshs(S2,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Wedge,"")
S2=parts(m,"S2",Vector3.new(0.100000001, 0.600000024, 1.40000021),"Institutional white",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",RArm,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-05, -1.25000095, -3.80002594, -1, 0, 0, 0, -1, 0, 0, 0, 1))
meshs(S2,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Brick,"")
S2=parts(m,"S2",Vector3.new(0.100000001, 0.300000012, 1.00000012),"Mid gray",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",RArm,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-05, -0.800002098, -3.60002518, -1, 0, 0, 0, -1, 0, 0, 0, 1))
meshs(S2,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Brick,"")
S2=parts(m,"S2",Vector3.new(0.100000001, 0.600000024, 1.90000021),"Institutional white",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",RArm,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(4.57763672e-05, -1.25000095, 5.45002365, 1, 0, 0, 0, -1, 0, 0, 0, -1))
meshs(S2,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Wedge,"")
S2=parts(m,"S2",Vector3.new(0.100000001, 0.300000012, 1.60000014),"Mid gray",Enum.Material.SmoothPlastic,0,0)
S2Weld=welds(S2,"S2Weld",RArm,S2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-05, 0.800000906, 4.90002441, -1, 0, 0, 0, 1, 0, 0, 0, -1))
meshs(S2,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Wedge,"")
S21=parts(m,"S21",Vector3.new(0.200000003, 0.200000003, 0.200000003),"Institutional white",Enum.Material.SmoothPlastic,0,0)
S21Weld=welds(S21,"S21Weld",RArm,S21,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-05, -0.95000124, 7.39996338, -1, 0, 0, 0, -1, 0, 0, 0, 1))
meshs(S21,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Wedge,"")
S22=parts(m,"S22",Vector3.new(0.200000003, 0.200000003, 0.200000003),"Institutional white",Enum.Material.SmoothPlastic,0,0)
S22Weld=welds(S22,"S22Weld",RArm,S22,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-05, -0.95000124, 3.30000305, -1, 0, 0, 0, -1, 0, 0, 0, 1))
meshs(S22,"Mesh",Vector3.new(0.5, 1, 1),Enum.MeshType.Wedge,"")
for _,v in pairs(m:children()) do
if v:IsA("Part")and v.Name=="S2T"then
v.BrickColor=Torso.BrickColor
end
end
aaa=NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(1, 0)})
bbb=NumberSequence.new({NumberSequenceKeypoint.new(0, 0),NumberSequenceKeypoint.new(1, 0)})
local Efect=create("ParticleEmitter"){
Color=ColorSequence.new(Color3.new(1, 0, 0)),
LightEmission=.5,
Texture="rbxassetid://50657528",
Transparency=bbb,
Size=aaa,
ZOffset=0,
Acceleration=Vector3.new(0, 0, 0),
LockedToPart=false,
EmissionDirection="Top",
Lifetime=NumberRange.new(.2,.2),
Rate=100,
Rotation=NumberRange.new(-100, 100),
RotSpeed=NumberRange.new(-50, 50),
Speed=NumberRange.new(40),
VelocitySpread=40,
Enabled=false,
Parent=Root
}
local Buff=create("BillboardGui"){
Size=UDim2.new(5, 0, 15, 0),
Adornee=Root,
Parent=Root,
ExtentsOffset=Vector3.new(0, 3, 0),
AlwaysOnTop=true
}
local BuffLabel=create("TextLabel"){
AnchorPoint=Vector2.new(.5,.5),
BackgroundTransparency=1,
TextStrokeTransparency=1,
TextTransparency=1,
TextColor3=Color3.new(1, 1, 0),
TextStrokeColor3=Color3.new(0, 0, 0),
Position=UDim2.new(.5, 0, .5, 0),
Size=UDim2.new(1.5, 0, .2, 0),
Text="0",
Font="SourceSansBold",
TextScaled=true,
Parent=Buff,
}
function Damage(Type,Part,hit,dmg,delet)
if hit.Parent==nil then
return
end
local h=hit.Parent:FindFirstChildOfClass("Humanoid")
for _,v in pairs(hit.Parent:children()) do
if v:IsA("Humanoid")then
h=v
end
end
if h~=nil and hit.Parent.Name~=chr.Name then
if hit.Parent:findFirstChild("AHit")==nil then
h.Health=h.Health-dmg
if h.Health==math.huge then
hit.Parent:BreakJoints()
elseif wa==true then
sounds(Root,"rbxassetid://874866480",9,1)
hit.Parent:BreakJoints()
end
end
if Type=="Disappear"then
Part.Parent=nil
if hit.Parent:findFirstChild("AHit")==nil then
local c=create("BoolValue"){
Name="AHit",
Value=true,
Parent=hit.Parent}
game:GetService("Debris"):AddItem(c,.1)
end
elseif Type=="None"then
if hit.Parent:findFirstChild("AHit")==nil then
local c=create("BoolValue"){
Name="AHit",
Value=true,
Parent=hit.Parent}
game:GetService("Debris"):AddItem(c,.25)
end
elseif Type=="None2"then
if hit.Parent:findFirstChild("AHit")==nil then
local c=create("BoolValue"){
Name="AHit",
Value=true,
Parent=hit.Parent}
game:GetService("Debris"):AddItem(c,.05)
end
end
end
end
function Mdamage(Type,Part,Magn,Dmg)
for _,c in pairs(workspace:children()) do
local hum=c:findFirstChildOfClass("Humanoid")
if hum~=nil then
local ddee=c:findFirstChild("Torso")
if ddee~=nil then
local targ=ddee.Position-Part.Position
local mag=targ.magnitude
if mag<=Magn and c.Name~=plr.Name then
Damage(Type,Part,ddee,Dmg)
if hum.Health==math.huge then
ddee:BreakJoints()
end
end
end
end
end
end
--v efec
function effect(par,color,CF,x,y,z,x1,y1,z1,de,mtyp,typ,id)
local ex=create("Part"){
Size=Vector3.new(.2,.2,.2),
BrickColor=color,
CanCollide=false,
Material="Neon",
Anchored=true,
CFrame=CF,
Parent=par}
NoOutline(ex)
local exe=create("SpecialMesh"){
Scale=Vector3.new(x,y,z),
MeshType=mtyp,
Parent=ex,
MeshId="rbxassetid://"..id}
game:GetService("Debris"):AddItem(ex,10)
coroutine.resume(coroutine.create(function()
for i=0,1.1,de do
swait()
ex.Transparency=i
exe.Scale=exe.Scale+Vector3.new(x1,y1,z1)
if typ==1 then
ex.CFrame=ex.CFrame*CFrame.Angles(math.random(-360,360),math.random(-360,360),math.random(-360,360))
end
end
ex:Remove()
end))
end
--v atak
function Spear_Skill(Combo)
attack=true
skilldoing=false
sounds(Root,"rbxasset://sounds/swordslash.wav",1.2,1)
if Combo==1 then
for i=0,1,0.25 do
swait()
RJ.C0=clerp(RJ.C0,CFrame.new(-8.2590617e-07, -4.76837158e-07, 4.76837386e-07, 0.500000238, 0, -0.866025388, 0, 1, 0, 0.866025388, 0, 0.500000238)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
Neck.C0=clerp(Neck.C0,CFrame.new(4.76837386e-07, 1.50000429, -8.2590617e-07, 0.500000238, 0, 0.866025388, 0, 1, 0, -0.866025388, 0, 0.500000238)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
RS.C0=clerp(RS.C0,CFrame.new(1.68119287, 0.500001192, -0.676144481, 0.707106769, -0.707107008, -0, 0, 0, -1, 0.707107008, 0.707106769, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
LS.C0=clerp(LS.C0,CFrame.new(-1.6348331, 0.166505516, -0.533010244, 0.866025567, 0.433012754, -0.249999866, -0.49999994, 0.750000179, -0.433012605, -5.96046448e-08, 0.499999911, 0.866025627)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
if skilldoing==true or skilldoing2==true then
break
end
end
for i=0,1,0.06 do
swait()
Mdamage("None",S22,4,15)
Mdamage("None",S21,2,30)
RJ.C0=clerp(RJ.C0,CFrame.new(-1.5348196e-06, -4.76837158e-07, -1.200005078, 0.258818984, 0, 0.965925872, 0, 1, 0, -0.965925872, 0, 0.258818984)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
Neck.C0=clerp(Neck.C0,CFrame.new(0, 1.50000429, 0, 0.258818984, 0, -0.965925872, 0, 1, 0, 0.965925872, 0, 0.258818984)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
RS.C0=clerp(RS.C0,CFrame.new(0.905513525, 0.500001192, -0.999117136, 0, 0.499999911, -0.866025507, -1, 0, 0, -0, 0.866025507, 0.499999911)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
LS.C0=clerp(LS.C0,CFrame.new(-1.86745083, 0.212133825, 1.9046164e-06, 0.258818954, 0.965925872, 9.983778e-07, -0.965925872, 0.258818954, -6.6800121e-09, -2.68220901e-07, -9.83476639e-07, 1)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
if skilldoing==true or skilldoing2==true then
break
end
end
elseif Combo==2 then
for i=0,1,0.25 do
swait()
RJ.C0=clerp(RJ.C0,CFrame.new(-0.00797060784, 0, 0.0159379058, 0.500000238, 0, 0.866025388, 0, 1, 0, -0.866025388, 0, 0.500000238)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
Neck.C0=clerp(Neck.C0,CFrame.new(-0.0688118488, 1.49997687, 0.0489302538, 0.500000238, 0, -0.866025388, 0, 1, 0, 0.866025388, 0, 0.500000238)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
RS.C0=clerp(RS.C0,CFrame.new(0.881370544, 0.499999046, -0.989105582, 0, 0.500000238, 0.866025388, 1, 0, 0, 0, 0.866025388, -0.500000238)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
LS.C0=clerp(LS.C0,CFrame.new(-1.64070654, 0.0988676846, -0.0363707393, 0.94015497, 0.320339173, 0.116154164, -0.279362053, 0.919801831, -0.275538623, -0.195104659, 0.226599932, 0.9542467)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
if skilldoing==true then
break
end
end
for i=0,1,0.06 do
swait()
Mdamage("None",S22,4,15)
Mdamage("None",S21,2,30)
RJ.C0=clerp(RJ.C0,CFrame.new(-0.141819328, -0, -1.26099586, 0.500000238, 0, -0.866025388, 0, 1, 0, 0.866025388, 0, 0.500000238)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
Neck.C0=clerp(Neck.C0,CFrame.new(0.123729445, 1.49997687, -0.0923232585, 0.500000238, 0, 0.866025388, 0, 1, 0, -0.866025388, 0, 0.500000238)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
RS.C0=clerp(RS.C0,CFrame.new(1.93757987, 0.499999046, -0.559692025, 0, -0.866024375, 0.500002086, 1, 0, 0, 0, 0.500002086, 0.866024375)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
LS.C0=clerp(LS.C0,CFrame.new(-1.86749184, 0.219548419, 0.235672072, 0.228143245, 0.95387888, 0.195105106, -0.970870256, 0.23795332, -0.0280933026, -0.0732235089, -0.183012426, 0.980380058)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
if skilldoing==true then
break
end
end
elseif Combo==3 then
for i=0,1,0.25 do
swait()
RJ.C0=clerp(RJ.C0,CFrame.new(-2.82967085e-06, -2.38418352e-07, -3.19105675e-06, 0.258818746, 0, -0.965924978, 0, 0.999999046, 0, 0.965925872, 0, 0.258818984)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
Neck.C0=clerp(Neck.C0,CFrame.new(4.42520104e-06, 1.50000095, -1.77621746e-06, 0.258818746, 0, 0.965925872, 0, 0.999999046, 0, -0.965924978, 0, 0.258818984)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
RS.C0=clerp(RS.C0,CFrame.new(1.57334232, 0.104150996, 0.0242375731, 0.424949139, -0.345915258, 0.836517155, 0.250000149, 0.933012784, 0.258818448, -0.870010555, 0.0991447195, 0.482961833)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
LS.C0=clerp(LS.C0,CFrame.new(-1.50002849, 2.26497605e-06, -1.20686684e-06, 0.866025388, 0.500000179, 4.61935997e-07, -0.500000119, 0.866025388, 2.72390196e-07, -2.68220901e-07, -4.69386578e-07, 1)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.45)
if skilldoing==true then
break
end
end
for i=0,1,0.06 do
swait()
Mdamage("None",S22,4,15)
Mdamage("None",S21,2,30)
RJ.C0=clerp(RJ.C0,CFrame.new(-4.76836703e-06, -0.287998855, -1.13958561, 0, 0, 0.999999046, -0.258818746, 0.965924978, 0, -0.965925872, -0.258818984, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
Neck.C0=clerp(Neck.C0,CFrame.new(-2.25305557e-05, 1.50000334, 5.7220459e-06, 0, 2.38418579e-07, -1, 0, 1, 2.38418579e-07, 1, 0, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
RS.C0=clerp(RS.C0,CFrame.new(1.68703485, 0.29010281, -0.0508945547, 0.00987713691, -0.448736727, -0.893609405, 0.0155336829, 0.893614173, -0.448567331, 0.999830544, -0.00945048407, 0.0157968812)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
LS.C0=clerp(LS.C0,CFrame.new(-1.67049909, 0.0182256922, -0.0468431562, 0.485112011, 0.874422491, 0.00720833708, -0.874105573, 0.485135376, -0.0241507925, -0.0246150084, 0.00541499071, 0.999682367)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
if skilldoing==true then
break
end
end
end
attack=false
end
--20 15
--15
function Spear_Flip()
if skilldoing==true then
return
end
skilldoing=true
sounds(Root,"rbxassetid://380362900",1.2,1)
hum.Jump=true
Torso.Velocity=(Root.CFrame.lookVector*120)+(Vector3.new(0,1,0)*50)
for i=0,1,0.04 do
swait()
Mdamage("None",S2H,6,15)
Mdamage("None",S21,2,30)
RJ.C0=clerp(RJ.C0,CFrame.new(0.0147208329, 0.214689702, -3.81469727e-06, 0, 0.999994278, 0, 0, 0, 0.999994278, 1, 0, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,math.rad(0-720*i),0),.4)
Neck.C0=clerp(Neck.C0,CFrame.new(0, 1.49999189, 8.82148743e-06, 0, 0, 1, 0, 1, 0, -1, 0, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
RS.C0=clerp(RS.C0,CFrame.new(1.4000144, 0.54017067, -0.696429133, 0, 0, 1, 1, 0, 0, 0, 1, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
LS.C0=clerp(LS.C0,CFrame.new(-1.40001774, 0.526784897, -0.746401191, 0, 0, 1, 1, 0, 0, 0, 1, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
end
skilldoing=false
end
function Spear_Stab()
if skilldoing2==true then
return
end
skilldoing2=true
for i=1,5 do
sounds(Root,"rbxassetid://957193342",1.2,1.1)
for i=0,1,0.3 do--lazzy
swait()
RJ.C0=clerp(RJ.C0,CFrame.new(0, -0, -0, 0, 0, -1, 0, 1, 0, 1, 0, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
Neck.C0=clerp(Neck.C0,CFrame.new(0, 1.50000381, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
RS.C0=clerp(RS.C0,CFrame.new(1.37073517, 0.0462374538, -0.435195684, 0, 0, 1, 0.500000238, 0.866025388, 0, -0.866025388, 0.500000238, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
LS.C0=clerp(LS.C0,CFrame.new(-1.30331612, 0.0468284041, -0.550320625, 0, 0, 1, 0.500000238, 0.866025388, 0, -0.866025388, 0.500000238, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
end
for i=0,1,0.3 do
swait()
Mdamage("None2",S22,4,15)
Mdamage("None2",S21,2,30)
RJ.C0=clerp(RJ.C0,CFrame.new(0, -0, -3.50000801, 0, 0, -1, 0, 1, 0, 1, 0, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
Neck.C0=clerp(Neck.C0,CFrame.new(0, 1.50000381, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
RS.C0=clerp(RS.C0,CFrame.new(1.37073517, 0.0462374538, -0.435195684, 0, 0, 1, 0.500000238, 0.866025388, 0, -0.866025388, 0.500000238, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
LS.C0=clerp(LS.C0,CFrame.new(-1.30331612, 0.0468284041, -0.550320625, 0, 0, 1, 0.500000238, 0.866025388, 0, -0.866025388, 0.500000238, 0)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.4)
end
end
swait(20)
skilldoing2=false
end
--25 7.5
mouse.Button1Down:connect(function()
if attack==false then
if combo==1 then
combo=2
Spear_Skill(1)
elseif combo==2 then
combo=3
Spear_Skill(2)
elseif combo==3 then
combo=1
Spear_Skill(3)
end
end
end)
mouse.KeyDown:connect(function(k)
k=k:lower()
if k=="z" and skilldoing==false then
Spear_Flip()
elseif k=="x" and skilldoing2==false then
Spear_Stab()
elseif k=="j" and wa==false then
wa=true
sounds(Root,"rbxassetid://409594107",6,1)
print'Battle against true hero'
warn'Battle against true hero'
for _,v in pairs(m:children()) do
if v:IsA("Part")and (v.Name=="S2H"or v.Name=="S22"or v.Name=="S21"or v.Name=="S2"or v.Name=="S2T")then
v.BrickColor=BrickColor.new("Toothpaste")
v.Material="Neon"
end
end
local sound=create("Sound"){
Parent=Root,
SoundId="rbxassetid://333552980",
Volume=7,
PlaybackSpeed=1,
Looped=true}
sound:Play()
end
end)
while chr.Humanoid.Health>=0 do
swait()
sin=sin+cha
if wa==false then
hum.WalkSpeed=35
else
hum.WalkSpeed=200
hum.JumpPower=280
end
local torvel=(Root.Velocity*Vector3.new(1,0,1)).magnitude
local velderp=Root.Velocity.y
hitfloor,posfloor=rayCast(Root.Position,(CFrame.new(Root.Position,Root.Position-Vector3.new(0,1,0))).lookVector,4,chr)
if Root.Velocity.y>1 and hitfloor==nil then
Pose="Jump"
if attack==false and skilldoing==false and skilldoing2==false then
RJ.C0=clerp(RJ.C0,CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
Neck.C0=clerp(Neck.C0,CFrame.new(0, 1.49998474, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
RS.C0=clerp(RS.C0,CFrame.new(1.70980763, 0.236601114, 0, 0.866025388, -0.500000238, 0, 0.500000238, 0.866025388, 0, 0, 0, 1)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
LS.C0=clerp(LS.C0,CFrame.new(-1.70980763, 0.236601114, -0, 0.866025388, 0.500000238, 0, -0.500000238, 0.866025388, 0, 0, 0, 1)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
end
RH.C0=clerp(RH.C0,CFrame.new(0.5, -1.99998808, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
LH.C0=clerp(LH.C0,CFrame.new(-0.5, -1.99998808, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
elseif Root.Velocity.y<-1 and hitfloor==nil then
Pose="Fall"
if attack==false and skilldoing==false and skilldoing2==false then
RJ.C0=clerp(RJ.C0,CFrame.new(-0.034501072, -0, -0.0986937582, 0.707106829, 0, -0.707106829, 0, 1, 0, 0.707106829, 0, 0.707106829)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
Neck.C0=clerp(Neck.C0,CFrame.new(0.0941823646, 1.49998474, 0.0453972146, 0.707106829, 0, 0.707106829, 0, 1, 0, -0.707106829, 0, 0.707106829)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
RS.C0=clerp(RS.C0,CFrame.new(1.63909817, 0.114127249, -2.24583914e-07, 0.965925992, -0.258818954, 1.78813934e-07, 0.258818924, 0.965925932, -6.76490401e-07, 0, 7.15255737e-07, 1)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
LS.C0=clerp(LS.C0,CFrame.new(-1.63910222, 0.114126861, 2.24584937e-07, 0.965925992, 0.258818954, 1.78813934e-07, -0.258818924, 0.965925932, 6.76490401e-07, 0, -7.15255737e-07, 1)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
end
RH.C0=clerp(RH.C0,CFrame.new(0.499996245, -1.99998808, -7.62939544e-06, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
LH.C0=clerp(LH.C0,CFrame.new(-0.499994338, -1.19998801, -0.500003874, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
elseif torvel<1 and hitfloor~=nil then
Pose="Idle"
if attack==false and skilldoing==false and skilldoing2==false then
RJ.C0=clerp(RJ.C0,CFrame.new(0, -0.1, -0, 0.866025388, 0, -0.500000238, 0, 1, 0, 0.500000238, 0, 0.866025388)*CFrame.new(0,0-.05*math.cos(sin/18),0)*CFrame.Angles(0,0,0),.3)
Neck.C0=clerp(Neck.C0,CFrame.new(-9.53674771e-07, 1.49998951, -1.65181234e-06, 0.866025388, 0, 0.500000238, 0, 1, 0, -0.500000238, 0, 0.866025388)*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
RS.C0=clerp(RS.C0,CFrame.new(1.67320299, 0.10000509, 3.71405895e-06, 0.866025567, -0.5, 8.94069672e-08, 0.49999994, 0.866025507, -2.49183756e-07, 5.96046448e-08, 2.5331974e-07, 1.00000012)*CFrame.new(0-.05*math.cos(sin/18),0,0) * CFrame.Angles(0,0,math.rad(0-8*math.cos(sin/18))),.3)
LS.C0=clerp(LS.C0,CFrame.new(-1.67320156, 0.0999999046, 1.0063988e-07, 0.866025567, 0.5, 8.94069672e-08, -0.49999994, 0.866025507, 2.50893436e-07, 5.96046448e-08, -2.5331974e-07, 1.00000012)*CFrame.new(0+.05*math.cos(sin/18),0,0) * CFrame.Angles(0,0,math.rad(0+8*math.cos(sin/18))),.3)
end
RH.C0=clerp(RH.C0,CFrame.new(0.500003934, -1.89999309, 0, 1.00000024, 0, 0, 0, 1, 0, 0, 0, 1.00000024)*CFrame.new(0,0+.05*math.cos(sin/18),0)*CFrame.Angles(0,0,0),.3)
LH.C0=clerp(LH.C0,CFrame.new(-0.500000119, -1.89999309, -0, 1.00000024, 0, 0, 0, 1, 0, 0, 0, 1.00000024)*CFrame.new(0,0+.05*math.cos(sin/18),0)*CFrame.Angles(0,0,0),.3)
elseif torvel>2 and hitfloor~=nil then
Pose="Walk"
if attack==false and skilldoing==false and skilldoing2==false then
RJ.C0=clerp(RJ.C0,CFrame.new(0, -0.0669884086-.1*math.cos(sin/3), -0.249999404, 1, 0, 0, 0, 0.866025388, 0.500000238, 0, -0.500000238, 0.866025388)*CFrame.new(0,0,0)*CFrame.Angles(0,math.rad(0)+Root.RotVelocity.Y/15,0),.3)
Neck.C0=clerp(Neck.C0,CFrame.new(0, 1.47410548, 0.096591115, 1, 0, 0, 0, 0.965925872, -0.258819342, 0, 0.258819342, 0.965925872)*CFrame.new(0,0,0)*CFrame.Angles(0,0+Head.RotVelocity.Y/25,0),.3)
RS.C0=clerp(RS.C0,CFrame.new(1.50000083, -1.7881257e-07, -7.55374003e-07, 0.866024852, -0.500000954, -3.31524848e-06, 0.500000954, 0.866024971, -2.38418579e-07, 2.98023224e-06, -1.4603138e-06, 1.00000012)*CFrame.new(.2,.1,0+.8*math.cos(sin/6)) * CFrame.Angles(math.rad(0-70*math.cos(sin/6)),0,0),.3)
LS.C0=clerp(LS.C0,CFrame.new(-1.5, 7.74863224e-07, -2.42472197e-07, 0.86602515, 0.500000536, -1.43179045e-06, -0.500000536, 0.866025209, 1.49011612e-06, 1.98185444e-06, -5.66244125e-07, 1.00000012)*CFrame.new(-.2,.1,0-.8*math.cos(sin/6)) * CFrame.Angles(math.rad(0+70*math.cos(sin/6)),0,0),.3)
end
RH.C0=clerp(RH.C0,CFrame.new(0.5, -1.79998903, 0, 1, 0, 0, 0, 1.00000024, 0, 0, 0, 1.00000024)*CFrame.new(0,0+.5*math.cos(sin/2.5),0-1*math.cos(sin/5)) * CFrame.Angles(math.rad(0+85*math.cos(sin/5)),0,0),.3)
LH.C0=clerp(LH.C0,CFrame.new(-0.5, -1.79998903, -0, 1, 0, 0, 0, 1.00000024, 0, 0, 0, 1.00000024)*CFrame.new(0,0+.5*math.cos(sin/2.5),0+1*math.cos(sin/5)) * CFrame.Angles(math.rad(0-85*math.cos(sin/5)),0,0),.3)
end
end