Advertisement
Fogdoggy

Fe Thing

Dec 28th, 2019
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.64 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2.  
  3. local Player,game,owner = owner,game
  4.  
  5. local RealPlayer = Player
  6.  
  7. do print("FE Compatibility code V3 by Fogdoggy")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
  8.  
  9. --[[
  10. Edited By FogDoggy Also Fe By FogDoggy
  11. --]]
  12. local plr = owner
  13. local chara = plr.Character
  14. local rightarm = chara["Right Arm"]
  15. local leftarm = chara["Left Arm"]
  16. local torso = chara.Torso
  17. local rootpart = chara.HumanoidRootPart
  18. local rootjoint=rootpart.RootJoint
  19. local rootcf = CFrame.fromEulerAnglesXYZ(-1.57,0,3.14)
  20. local anim="idle"
  21. local rw=Instance.new("Weld",torso)
  22. local lw=Instance.new("Weld",torso)
  23. local rh=torso["Right Hip"]
  24. local lh=torso["Left Hip"]
  25. local r0=rh.C0
  26. local l0=lh.C0
  27. local humanoid=chara.Humanoid
  28. chara.Animate:Destroy()
  29. humanoid.MaxHealth = math.huge
  30. humanoid.Animator:Destroy()
  31. rw.Part0=torso
  32. rw.Part1=rightarm
  33. rw.C0=CFrame.new(1.5,0.5,0)
  34. rw.C1=CFrame.new(0,0.5,0)
  35. lw.Part0=torso
  36. lw.Part1=leftarm
  37. lw.C0=CFrame.new(-1.5,0.5,0)
  38. lw.C1=CFrame.new(0,0.5,0)
  39. attack = false
  40. local attacktype = 1
  41.  
  42. function clerp(a,b,t)
  43. return a:lerp(b, t)
  44. end
  45.  
  46. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  47. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  48. end
  49. sine = 0
  50. change = 1
  51. neck = torso.Neck
  52. necko = torso.Neck.C0
  53. local m = Instance.new("Model",chara)
  54. m.Name="WeaponModel"
  55. local handle = Instance.new("Part",m)
  56. handle.CanCollide = false
  57. handle.Size = Vector3.new(1, 1, 1)
  58. local weld = Instance.new("Weld",rightarm)
  59. weld.Part0 = rightarm
  60. weld.Part1 = handle
  61. weld.C0 = CFrame.new(0, -1, 0)*CFrame.Angles(0,math.rad(90),0)
  62. handle.Transparency = 1
  63. local blade = Instance.new("Part",m)
  64. blade.CanCollide = false
  65. blade.Size = Vector3.new(1, 1, 5)
  66. local mesh = Instance.new("FileMesh",blade)
  67. mesh.MeshId = "http://www.roblox.com/asset/?id=11442510"
  68. mesh.TextureId = "http://www.roblox.com/asset/?id=21294180"
  69. local bladeweld = Instance.new("Weld",handle)
  70. bladeweld.Part0 = handle
  71. bladeweld.Part1 = blade
  72. bladeweld.C0 = CFrame.Angles(math.rad(90),math.rad(90),0)*CFrame.new(0,0,2)
  73. mesh.Scale = Vector3.new(2,2,2)
  74. active = false
  75. hitting = false
  76. killaura = false
  77. local bladeend=Instance.new("Part",m)
  78. bladeend.Transparency=1
  79. bladeend.Size = Vector3.new(1,1,1)
  80. local bw = Instance.new("Weld",blade)
  81. bw.Part0=blade
  82. bw.Part1=bladeend
  83. bw.C0=CFrame.new(0, 0, 3)
  84. bladeend.CanCollide = false
  85. local trail = Instance.new("Trail",m)
  86. local att1= Instance.new("Attachment",handle)
  87. local att2=Instance.new("Attachment",bladeend)
  88. trail.Attachment0=att1
  89. trail.Attachment1=att2
  90. trail.Lifetime=0.2
  91. trail.Enabled = false
  92. trail.Color = ColorSequence.new(Color3.fromRGB(0, 230, 0),Color3.fromRGB(0,176))
  93. function swait(num)
  94. if num==0 or num==nil then
  95. game:service'RunService'.Heartbeat:wait(0)
  96. else
  97. for i=0,num do
  98. game:service'RunService'.Heartbeat:wait(0)
  99. end
  100. end
  101. end
  102. function ragdoll(p)
  103. if banmode == true then
  104. repeat
  105. local ska = Instance.new("SkateboardPlatform",p)
  106. ska.Transparency = 1
  107. ska.Position = p.Head.Position
  108. wait()
  109. until p == nil
  110. end
  111. p:BreakJoints()
  112. p.Archivable = true
  113. clone = p:Clone()
  114. clone.Parent = workspace
  115. for i,v in pairs(clone:GetChildren()) do
  116. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  117. v:destroy()
  118. end
  119. for i,p in pairs(v:GetChildren()) do
  120. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  121. p:destroy()
  122. end
  123. end
  124. end
  125. for i,t in pairs(p:GetChildren()) do
  126. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  127. t:destroy()
  128. end
  129. end
  130. vel = Instance.new("BodyVelocity", clone.Torso)
  131. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  132. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  133. if clone.Head:FindFirstChild("face") then
  134. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608"
  135. elseif clone.Head:FindFirstChild("roblox") then
  136. clone.Head.roblox.Texture = "http://www.roblox.com/asset/?id=161061608"
  137. elseif clone.Head:FindFirstChild("Face") then
  138. clone.Head.Face.Texture = "http://www.roblox.com/asset/?id=161061608"
  139. end
  140. vel:Destroy()
  141. using = false
  142. hit = Instance.new("Sound", clone.Torso)
  143. hit.SoundId = "rbxassetid://260430060"
  144. hit.Volume = 5
  145. hit1 = Instance.new("Sound", clone.Torso)
  146. hit1.SoundId = "rbxassetid://138087186"
  147. hit1.Volume = 5
  148. hit2 = Instance.new("Sound", clone.Torso)
  149. hit2.SoundId = "rbxassetid://131237241"
  150. hit2.Volume = 5
  151. hit3 = Instance.new("Sound", clone.Torso)
  152. hit3.SoundId = "rbxassetid://278062209"
  153. hit3.Volume = 5
  154. hit3.TimePosition = 0.33
  155. clone:FindFirstChildOfClass("Humanoid").PlatformStand = true
  156. if zombiemode == true then
  157. coroutine.wrap(function()
  158. wait(3)
  159. clone:FindFirstChildOfClass("Humanoid").PlatformStand = false
  160. clone:FindFirstChildOfClass("Humanoid").WalkSpeed = math.random(10, 35)
  161. bleed(clone.Head.CFrame, 10)
  162. end)()
  163. end
  164. for i, v in pairs(clone:GetChildren()) do
  165. if v.Name == "BASE" then
  166. v:Destroy()
  167. end
  168. end
  169. local leftarm = clone:findFirstChild("Left Arm")
  170. local rightrm = clone:findFirstChild("Right Arm")
  171. local leftleg = clone:findFirstChild("Left Leg")
  172. local rightleg = clone:findFirstChild("Right Leg")
  173. local head = clone:findFirstChild("Head")
  174. local welding = Instance.new("Weld", clone.Torso)
  175. welding.Part0 = clone.Torso
  176. welding.Part1 = head
  177. welding.C0 = welding.C0 * CFrame.new(0,1.5,0)
  178. for i, g in pairs(p:GetChildren()) do
  179. if g.ClassName == "Part" then
  180. g:destroy()
  181. end
  182. end
  183. for i, h in pairs(p:GetChildren()) do
  184. if h.ClassName == "Accesory" then
  185. h:destroy()
  186. end
  187. end
  188. if leftleg ~= nil then
  189. local glue = Instance.new("Glue", clone.Torso)
  190. glue.Part0 = clone.Torso
  191. glue.Part1 = leftleg
  192. glue.Name = "Left leg"
  193. local collider = Instance.new("Part", leftleg)
  194. collider.Position = Vector3.new(0,999,0)
  195. collider.Size = Vector3.new(1.7, 1, 1)
  196. collider.Shape = "Cylinder"
  197. local weld = Instance.new("Weld", collider)
  198. weld.Part0 = leftleg
  199. weld.Part1 = collider
  200. weld.C0 = CFrame.Angles(0, 0, 80)
  201. collider.TopSurface = "Smooth"
  202. collider.BottomSurface = "Smooth"
  203. collider.formFactor = "Symmetric"
  204. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  205. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  206. collider.Transparency = 1
  207. end
  208. game:GetService("Debris"):AddItem(clone,7.5)
  209. ------------
  210. if rightleg ~= nil then
  211. local glue1 = Instance.new("Glue", clone.Torso)
  212. glue1.Part0 = clone.Torso
  213. glue1.Part1 = rightleg
  214. glue1.Name = "Right leg"
  215. local collider1 = Instance.new("Part", rightleg)
  216. collider1.Position = Vector3.new(0,999,0)
  217. collider1.Size = Vector3.new(1.7, 1, 1)
  218. collider1.Shape = "Cylinder"
  219. local weld1 = Instance.new("Weld", collider1)
  220. weld1.Part0 = rightleg
  221. weld1.Part1 = collider1
  222. weld1.C0 = CFrame.Angles(0, 0, 80)
  223. collider1.TopSurface = "Smooth"
  224. collider1.BottomSurface = "Smooth"
  225. collider1.formFactor = "Symmetric"
  226. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  227. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  228. collider1.Transparency = 1
  229. end
  230. ------------
  231. if rightrm ~= nil then
  232. local glue11 = Instance.new("Glue", clone.Torso)
  233. glue11.Part0 = clone.Torso
  234. glue11.Part1 = rightrm
  235. glue11.Name = "Right shoulder"
  236. local collider11 = Instance.new("Part", rightrm)
  237. collider11.Position = Vector3.new(0,9999,0)
  238. collider11.Size = Vector3.new(1.8,1,1)
  239. collider11.Shape = "Cylinder"
  240. local weld11 = Instance.new("Weld", collider11)
  241. weld11.Part0 = rightrm
  242. weld11.Part1 = collider11
  243. weld11.C0 = CFrame.Angles(0, 0, 80)
  244. collider11.TopSurface = "Smooth"
  245. collider11.BottomSurface = "Smooth"
  246. collider11.formFactor = "Symmetric"
  247. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  248. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  249. collider11.Transparency = 1
  250. end
  251. ------------
  252. if leftarm ~= nil then
  253. local glue111 = Instance.new("Glue", clone.Torso)
  254. glue111.Part0 = clone.Torso
  255. glue111.Part1 = leftarm
  256. glue111.Name = "Left shoulder"
  257. local collider111 = Instance.new("Part", leftarm)
  258. collider111.Position = Vector3.new(0,9999,0)
  259. collider111.Size = Vector3.new(1.8,1,1)
  260. collider111.Shape = "Cylinder"
  261. local weld111 = Instance.new("Weld", collider111)
  262. weld111.Part0 = leftarm
  263. weld111.Part1 = collider111
  264. weld111.C0 = CFrame.Angles(0, 0, 80)
  265. collider111.TopSurface = "Smooth"
  266. collider111.BottomSurface = "Smooth"
  267. collider111.formFactor = "Symmetric"
  268. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  269. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  270. collider111.Transparency = 1
  271. ----------------
  272. sensoring = Instance.new("Part", clone.Torso)
  273. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  274. sensoring.CanCollide = false
  275. sensoring.Position = clone.Torso.Position
  276. local welder = Instance.new("Weld", sensoring)
  277. welder.Part0 = clone.Torso
  278. welder.Part1 = sensoring
  279. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  280. sensoring.Transparency = 1
  281. -----------------
  282. sensoring1 = Instance.new("Part", clone.Torso)
  283. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  284. sensoring1.CanCollide = false
  285. sensoring1.Position = clone.Torso.Position
  286. local welder1 = Instance.new("Weld", sensoring)
  287. welder1.Part0 = clone.Torso
  288. welder1.Part1 = sensoring1
  289. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  290. sensoring1.Transparency = 1
  291. end
  292. end
  293. function ShowDamage(dam,cf)
  294. local t=Instance.new('Part',workspace)
  295. t.Size=Vector3.new(1, 1, 1)
  296. t.Transparency=1
  297. t.CFrame = cf
  298. local bil=Instance.new('BillboardGui',t)
  299. bil.Size=UDim2.new(0, 9, 0, 9)
  300. local tex=Instance.new('TextLabel',bil)
  301. tex.Size=UDim2.new(0, 1 , 0, 1)
  302. tex.BackgroundTransparency=1
  303. tex.Text="-"..dam
  304. tex.TextSize=76
  305. tex.FontSize=Enum.FontSize.Size28
  306. tex.Font = Enum.Font.ArialBold
  307. t.Anchored=true
  308. tex.TextColor3=Color3.fromRGB(30, 30, 30)
  309. t.CanCollide=false
  310. game:GetService("Debris"):AddItem(t, 10)
  311. coroutine.wrap(function()
  312. for i=1, 100 do
  313. t.CFrame=t.CFrame*CFrame.new(0, 0.01, 0)
  314. swait(2)
  315. end
  316. t:Destroy()
  317. end)()
  318. end
  319. function dmg(hit)
  320. for i,v in pairs(hit.Parent:GetChildren()) do
  321. if v:isA("Humanoid") and hit.Parent ~= chara and active==true and hitting == false then
  322. local sound = Instance.new("Sound",hit)
  323. sound.SoundId="rbxassetid://566593606"
  324. sound:Play()
  325. hitting = true
  326. v.PlatformStand=true
  327. v.Died:connect(function()
  328. ragdoll(hit.Parent)
  329. end)
  330. local dam = math.random(20, 60)
  331. ShowDamage(dam, torso.CFrame*CFrame.new(math.random(-20, 20), 0, math.random(-20, 20)))
  332. v:TakeDamage(dam)
  333. wait(0.2)
  334. v.PlatformStand=false
  335. hitting = false
  336. end
  337. end
  338. end
  339. nosoundhitting = false
  340. createDamage = function(part,hit,minim,maxim)
  341. if hit.Parent==nil then
  342. return
  343. end
  344. local h=hit.Parent:FindFirstChild("Humanoid")
  345. for _,v in pairs(hit.Parent:children()) do
  346. if v:IsA("Humanoid") then
  347. h=v
  348. end
  349. end
  350. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  351. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  352. end
  353. if hit.Parent.className=="Hat" then
  354. hit=hit.Parent.Parent:findFirstChild("Head")
  355. end
  356. if h~=nil and hit.Parent.Name~=chara.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  357. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  358. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  359. return
  360. end]]
  361. -- hs(hit,1.2)
  362. local c=Instance.new("ObjectValue")
  363. c.Name="creator"
  364. c.Value=owner
  365. c.Parent=h
  366. game:GetService("Debris"):AddItem(c,.5)
  367. local Damage=math.random(minim,maxim)
  368. ShowDamage(Damage, hit.CFrame*CFrame.new(math.random(-20, 20),0,math.random(-20,20)))
  369. h:TakeDamage(Damage)
  370. end
  371. end
  372. MagnitudeDmg=function(part,dis)
  373. for _,c in pairs(workspace:children()) do
  374. local hum=c:findFirstChild("Humanoid")
  375. if hum~=nil then
  376. local head=c:findFirstChild("Torso")
  377. if head~=nil then
  378. local targ=head.Position-part.Position
  379. local mag=targ.magnitude
  380. if mag<=dis and c.Name~=chara.Name then
  381. createDamage(part, hum.Parent.Torso, 20, 60)
  382. end
  383. end
  384. end
  385. end
  386. end
  387. function makeShockwave(height,color,speed,range,pulse,cf)
  388. local range = range or 2000
  389. local p = Instance.new("Part")
  390. p.Anchored = true
  391. p.CanCollide = false
  392. p.FormFactor = "Custom"
  393. p.BrickColor = color
  394. p.Parent = workspace
  395. local m = Instance.new("SpecialMesh",p)
  396. m.MeshId = "rbxassetid://3270017"
  397. local estimateSurvival = math.floor(range/speed) * 0.03
  398. game:GetService("Debris"):AddItem(p,estimateSurvival)
  399. coroutine.wrap(function ()
  400. print('shock')
  401. for i = 1,range,speed do
  402. p.Transparency = 1-math.min(0.5,3-(i/500))
  403. m.Scale = Vector3.new(i,i,i*height)
  404. p.CFrame = cf
  405. wait()
  406. end
  407. p:Destroy()
  408. end)()
  409. end
  410. function attackone()
  411. if attack==false then
  412. attack = true
  413. trail.Enabled = true
  414. for i = 0,1,0.1 do
  415. swait()
  416. rw.C0 = clerp(rw.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(160),math.rad(0),math.rad(40)),.3)
  417. lw.C0 =clerp(lw.C0, CFrame.new(1.2,.99,-0.4)*CFrame.Angles(math.rad(130),math.rad(0),math.rad(40)),.3)
  418. rootjoint.C0 = clerp(rootjoint.C0, rootcf*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
  419. rh.C0=clerp(rh.C0,r0,.3)
  420. lh.C0=clerp(lh.C0,l0,.3)
  421. neck.C0=clerp(neck.C0,necko*CFrame.Angles(0,0,0),.3)
  422. end
  423. active = true
  424. local swing=Instance.new("Sound",handle)
  425. swing.SoundId="rbxassetid://1306070008"
  426. swing:Play()
  427. game:GetService("Debris"):AddItem(swing, 3)
  428. blade.Touched:connect(dmg)
  429. for i=0,1,0.1 do
  430. swait()
  431. neck.C0=clerp(neck.C0,necko*CFrame.Angles(0.4,0,0),.3)
  432. rw.C0=clerp(rw.C0, CFrame.new(0.7,0.5,-0.6)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(-40)),.3)
  433. lw.C0=clerp(lw.C0, CFrame.new(0.5,0.5,-0.4)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(-40)),.3)
  434. end
  435. wait(1/60)
  436. attack=false
  437. attacktype = 2
  438. active = false
  439. trail.Enabled = false
  440. end
  441. end
  442.  
  443. function attacktwo()
  444. if attack == false then
  445. attack=true
  446. trail.Enabled = true
  447. for i=0,1,0.1 do
  448. swait()
  449. rh.C0=clerp(rh.C0,r0,.3)
  450. lh.C0=clerp(lh.C0,l0,.3)
  451. rootjoint.C0=clerp(rootjoint.C0, rootcf*CFrame.new(0, 0, 0)*CFrame.Angles(0,0,math.rad(90)),0.3)
  452. neck.C0 = clerp(neck.C0, necko*CFrame.Angles(0,0,math.rad(-90)),.3)
  453. lw.C0=clerp(lw.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90)),.3)
  454. rw.C0=clerp(rw.C0,CFrame.new(-1.3,0.5,-0.3)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90)),.3)
  455. end
  456. local swing=Instance.new("Sound",handle)
  457. swing.SoundId="rbxassetid://1306070008"
  458. swing:Play()
  459. active = true
  460. blade.Touched:connect(dmg)
  461. for i=0,1,0.1 do
  462. swait()
  463. rootjoint.C0=clerp(rootjoint.C0, rootcf*CFrame.new(0, 0, 0)*CFrame.Angles(0,0,math.rad(-120)),0.5)
  464. neck.C0 = clerp(neck.C0, necko*CFrame.Angles(0,0,math.rad(90)),.3)
  465. rw.C0=clerp(rw.C0,CFrame.new(-1.3,0.5,-0.3)*CFrame.Angles(math.rad(0),math.rad(10),math.rad(-90)),.3)
  466. end
  467. wait(1/60)
  468. attacktype=3
  469. attack=false
  470. trail.Enabled = false
  471. active = false
  472. end
  473. end
  474. function attackthree()
  475. if attack==false then
  476. attack = true
  477. trail.Enabled=true
  478. for i =0,1,0.1 do
  479. swait()
  480. rh.C0=clerp(rh.C0,r0,.3)
  481. lh.C0=clerp(lh.C0,l0,.3)
  482. neck.C0 = clerp(neck.C0, necko*CFrame.Angles(0,0,0),.3)
  483. rootjoint.C0=clerp(rootjoint.C0, rootcf*CFrame.new(0, 0, 0),.3)
  484. rw.C0=clerp(rw.C0, CFrame.new(1,1.5,0)*CFrame.Angles(math.rad(192),math.rad(0),math.rad(-40)),.3)
  485. lw.C0=clerp(lw.C0, CFrame.new(-1,1.5,0)*CFrame.Angles(math.rad(192),math.rad(0),math.rad(40)),.3)
  486. end
  487. local swing=Instance.new("Sound",handle)
  488. swing.SoundId="rbxassetid://1306070008"
  489. swing:Play()
  490. active = true
  491. blade.Touched:connect(dmg)
  492. coroutine.wrap(function()
  493. if hitfloor~=nil then
  494. local wave = Instance.new("Part",workspace)
  495. wave.Name = "Effect"
  496. wave.CanCollide = false
  497. wave.Anchored = true
  498. wave.CFrame = torso.CFrame*CFrame.new(0, -2, 0)
  499. wave.BrickColor = hitfloor.BrickColor
  500. local mes = Instance.new("FileMesh",wave)
  501. mes.MeshId = "rbxassetid://20329976"
  502. MagnitudeDmg(torso, 20)
  503. game:GetService("Debris"):AddItem(wave,10)
  504. for i = 1, 60 do
  505. mes.Scale = mes.Scale+Vector3.new(0.8, 0.4, 0.8)
  506. wave.Transparency = wave.Transparency + 1/60
  507. swait()
  508. end
  509. wave:Destroy()
  510. end
  511. end)()
  512. for i=0,1,0.1 do
  513. swait()
  514. neck.C0=clerp(neck.C0,necko*CFrame.Angles(0.4,0,0),.3)
  515. rw.C0=clerp(rw.C0, CFrame.new(1,0.5,-0.5)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-30)),.3)
  516. lw.C0=clerp(lw.C0, CFrame.new(-1,0.5,-0.5)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(30)),.3)
  517. end
  518. end
  519. wait(1/60)
  520. attack = false
  521. active = false
  522. attacktype = 1
  523. trail.Enabled=false
  524. end
  525. function PlayAnimationFromTable(table, speed)
  526. rootjoint.C0 = clerp(rootjoint.C0, table[1], speed)
  527. torso.Neck.C0 = clerp(neck.C0, table[2], speed)
  528. rw.C0 = clerp(rw.C0, table[3], speed)
  529. lw.C0 = clerp(lw.C0, table[4], speed)
  530. rh.C0 = clerp(rh.C0, table[5], speed)
  531. lh.C0 = clerp(lh.C0, table[6], speed)
  532. end
  533. function blockEffect(cframe, amount)
  534. coroutine.wrap(function()
  535. for x = 1, amount do
  536. local block = Instance.new("Part",workspace)
  537. block.Name="Effect"
  538. block.CanCollide = false
  539. block.Anchored = true
  540. block.CFrame = cframe
  541. block.BrickColor = BrickColor.Black()
  542. block.Material="Neon"
  543. block.Size = Vector3.new(0.1, 0.1, 0.1)
  544. game:GetService("Debris"):AddItem(block, 10)
  545. coroutine.wrap(function()
  546. for i = 1, amount*2 do
  547. swait()
  548. block.Transparency = block.Transparency+1/amount
  549. block.CFrame = block.CFrame*CFrame.Angles(math.random(0, 360),math.random(0, 360),math.random(0, 360))
  550. block.Size = block.Size+Vector3.new(0.07, 0.07, 0.07)
  551. end
  552. end)()
  553. swait()
  554. end
  555. end)()
  556. end
  557. hiding = false
  558. function Hide()
  559. if attack==false and hiding ==false then
  560. hiding = true
  561. attack=true
  562. humanoid.WalkSpeed = 0
  563. humanoid.JumpPower = 0
  564. for i = 0, 5, 0.05 do
  565. swait()
  566. PlayAnimationFromTable({
  567. rootcf*CFrame.new(0, 0, -9),
  568. necko,
  569. CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(180),0,0),
  570. CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,0),
  571. r0,
  572. l0
  573. },0.05)
  574. coroutine.wrap(function()
  575. wait(3)
  576. humanoid.WalkSpeed = 50
  577. humanoid.JumpPower = 0
  578. end)()
  579. end
  580. else
  581. humanoid.WalkSpeed = 0
  582. humanoid.JumpPower = 0
  583. for i = 0, 5, 0.05 do
  584. swait()
  585. PlayAnimationFromTable({
  586. rootcf*CFrame.new(0, 0, 0),
  587. necko*CFrame.Angles(-0.6,0,0),
  588. CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(170),0,0),
  589. CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),0,0),
  590. r0,
  591. l0
  592. },0.05)
  593. end
  594. humanoid.WalkSpeed = 16
  595. humanoid.JumpPower = 50
  596. hiding = false
  597. attack = false
  598. end
  599. end
  600. function computeDirection(vec)
  601. local lenSquared = vec.magnitude * vec.magnitude
  602. local invSqrt = 1 / math.sqrt(lenSquared)
  603. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  604. end
  605. function EnergyExplosion()
  606. if attack==false then
  607. attack = true
  608. local dbc=Instance.new("Sound",handle)
  609. dbc.Volume=1
  610. dbc.SoundId="http://www.roblox.com/asset/?id=2101137"
  611. dbc:Play()
  612. for i=1, 70 do
  613. swait()
  614. PlayAnimationFromTable({
  615. rootcf*CFrame.new(0,0,0)*CFrame.Angles(0,0,math.rad(90)),
  616. necko*CFrame.Angles(0,0,math.rad(-90)),
  617. CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(20),math.rad(0),math.rad(90)),
  618. CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-10)),
  619. r0*CFrame.Angles(0,0,0),
  620. l0*CFrame.Angles(0,0,0)
  621. },.06)
  622. end
  623. local ball = Instance.new("Part",chara)
  624. ball.CanCollide=false
  625. ball.BrickColor=BrickColor.Black()
  626. ball.Size=Vector3.new(2, 2, 2)
  627. ball.Shape="Ball"
  628. ball.Material="Neon"
  629. local bweld=Instance.new("Weld",rightarm)
  630. bweld.Part0=rightarm
  631. bweld.Part1=ball
  632. bweld.C0=CFrame.new(0, -1.3, 0)
  633. blockEffect(ball.CFrame, 15)
  634. wait(0.3)
  635. for i=0,1,0.1 do
  636. swait()
  637. PlayAnimationFromTable({
  638. rootcf*CFrame.new(0,0,0)*CFrame.Angles(0,0,math.rad(90)),
  639. necko*CFrame.Angles(0,0,math.rad(-90)),
  640. CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(20),math.rad(0),math.rad(110)),
  641. CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-10)),
  642. r0*CFrame.Angles(0,0,0),
  643. l0*CFrame.Angles(0,0,0)
  644. },.3)
  645. end
  646. ball:BreakJoints()
  647. local Target=mouse.Hit.p
  648. local direction = Target - handle.Position
  649. direction = computeDirection(direction)
  650. local pos = handle.Position + (direction * 10.0)
  651. ball.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles(math.pi/2, 0, 0)
  652. local floatForce = Instance.new("BodyForce")
  653. floatForce.force = Vector3.new(0, ball:GetMass() * 196.1, 0.0)
  654. floatForce.Parent = ball
  655. ball.Velocity = direction * 160
  656. game:GetService("Debris"):AddItem(ball, 30)
  657. local GB1=Instance.new("Sound",torso)
  658. local GB2=Instance.new("Sound",torso)
  659. local GB3=Instance.new("Sound",torso)
  660. local GB4=Instance.new("Sound",torso)
  661. GB1.SoundId="http://www.roblox.com/asset?id=1369158"
  662. GB2.SoundId="http://www.roblox.com/asset/?id=2974000"
  663. GB3.SoundId="rbxassetid://12222124"
  664. GB4.SoundId="http://www.roblox.com/asset/?id=2974249"
  665. GB3.Volume = 5
  666. GB3.PlaybackSpeed=0.2
  667. game:GetService("Debris"):AddItem(GB1,10)
  668. game:GetService("Debris"):AddItem(GB2,10)
  669. game:GetService("Debris"):AddItem(GB3,10)
  670. game:GetService("Debris"):AddItem(GB4,10)
  671. GB1:Play()
  672. GB2:Play()
  673. GB3:Play()
  674. GB4:Play()
  675. ball.Touched:connect(function(hit)
  676. if not hit:IsDescendantOf(chara) then
  677. MagnitudeDmg(ball, 100, 50, 99)
  678. floatForce.Parent = nil
  679. ball.Anchored = true
  680. local so1=Instance.new("Sound",ball)
  681. so1.SoundId="http://www.roblox.com/asset/?id=2767090"
  682. so1.Volume = 1
  683. so1.PlaybackSpeed = 0.8
  684. so1:Play()
  685. local so2=Instance.new("Sound",ball)
  686. so2.SoundId="http://www.roblox.com/asset/?id=13775494"
  687. so2.Volume = 1
  688. so2.PlaybackSpeed = 0.4
  689. so2:Play()
  690. game:GetService("Debris"):AddItem(ball,2)
  691. local ball2=ball:Clone()
  692. ball2.Parent=workspace
  693. makeShockwave(0.5,BrickColor.new("Black"),30,1000,0,ball2.CFrame)
  694. coroutine.resume(coroutine.create(function()
  695. for i = 1, 30 do
  696. ball2.Size = ball2.Size+Vector3.new(0.8,0.8,0.8)
  697. ball2.Transparency=ball2.Transparency+1/31
  698. wait()
  699. end
  700. end))
  701. for i=1, 30 do
  702. ball2.Size=ball2.Size+Vector3.new(0.2,0.2,0.2)
  703. ball2.Transparency=ball2.Transparency+1/29
  704. swait()
  705. end
  706. ball2:Destroy()
  707. end
  708. end)
  709. wait(1/60)
  710. attack = false
  711. end
  712. end
  713. mouse.Button1Down:connect(function()
  714. if attacktype == 1 then
  715. attackone()
  716. elseif attacktype == 2 then
  717. attacktwo()
  718. elseif attacktype == 3 then
  719. attackthree()
  720. elseif attacktype == 4 then
  721. attackfour()
  722. elseif attacktype == 5 then
  723. attackfive()
  724. attacktype = 1
  725. end
  726. end)
  727. function FollowTarget(target,humanoidp)
  728. repeat
  729. humanoid:MoveTo(target.Head.Position)
  730. wait()
  731. until humanoidp.Health == 0
  732. end
  733. activate = function()
  734. local kabox = Instance.new("Part",chara)
  735. kabox.Name = "ka"
  736. kabox.Size = Vector3.new(1, 5, 5)
  737. kabox.CanCollide = false
  738. local kaboxweld=Instance.new("Weld",torso)
  739. kaboxweld.Part0=torso
  740. kaboxweld.Part1=kabox
  741. kaboxweld.C0 = CFrame.new(0, 0, -2)
  742. kabox.Transparency = 1
  743. kabox.Touched:connect(function(hit)
  744. if hit.Parent:FindFirstChildOfClass("Humanoid") then
  745. if attacktype==1 then
  746. attackone()
  747. elseif attacktype==2 then
  748. attacktwo()
  749. elseif attacktype == 3 then
  750. attackthree()
  751. end
  752. end
  753. end)
  754. end
  755.  
  756. function findNearestTorso(pos)
  757. local list = game.Workspace:children()
  758. local torso = nil
  759. local dist = 1000
  760. local temp = nil
  761. local human = nil
  762. local temp2 = nil
  763. for x = 1, #list do
  764. temp2 = list[x]
  765. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  766. temp = temp2:findFirstChild("Torso")
  767. human = temp2:findFirstChild("Humanoid")
  768. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  769. if (temp.Position - pos).magnitude < dist then
  770. torso = temp
  771. dist = (temp.Position - pos).magnitude
  772. end
  773. end
  774. end
  775. end
  776. return torso
  777. end
  778. function deactivate()
  779. if chara:FindFirstChild("ka") then
  780. chara.ka:Destroy()
  781. else
  782. wait()
  783. end
  784. end
  785. followmode = false
  786. mouse.KeyDown:connect(function(k)
  787. k = k:lower()
  788.  
  789. if k=="v" then
  790. if killaura == false then
  791. killaura = true
  792. activate()
  793. else
  794. killaura = false
  795. deactivate()
  796. end
  797. end
  798.  
  799. if k=="f" then
  800. if mouse.Target.Parent:FindFirstChildOfClass("Humanoid")~=nil then
  801. FollowTarget(mouse.Target.Parent,mouse.Target.Parent:FindFirstChildOfClass("Humanoid"))
  802. end
  803. end
  804.  
  805. if k=="q" then
  806. if followmode == false then
  807. followmode = true
  808. coroutine.wrap(function()
  809. repeat
  810. wait(0.5)
  811. local target = findNearestTorso(script.Parent.Torso.Position)
  812. if target ~= nil then
  813. script.Parent.Humanoid:MoveTo(target.Position, target)
  814. end
  815. until followmode == false
  816. end)()
  817. else
  818. followmode = false
  819. end
  820. end
  821.  
  822. if k=="e" then
  823. EnergyExplosion()
  824. end
  825.  
  826. if k=="c" then
  827. Hide()
  828. end
  829. end)
  830. NoClipCons = {}
  831. if #NoClipCons == 0 then
  832. local con = game:service("RunService").Stepped:connect(function()
  833. pcall(function() torso.CanCollide = false end)
  834. pcall(function() chara.Head.CanCollide = false end)
  835. end)
  836. table.insert(NoClipCons, con)
  837. else
  838. for i, v in pairs(NoClipCons) do
  839. v:disconnect()
  840. table.remove(NoClipCons, i)
  841. end
  842. end
  843. while true do
  844. swait()
  845. humanoid.Health = math.huge
  846. sine = sine + change
  847. local torvel=(rootpart.Velocity*Vector3.new(1,0,1)).magnitude
  848. hitfloor,posfloor=rayCast(rootpart.Position,(CFrame.new(rootpart.Position,rootpart.Position - Vector3.new(0,1,0))).lookVector,4,chara)
  849. if torvel<1 and hitfloor~=nil and attack==false then
  850. anim="idle"
  851. rw.C0 = clerp(rw.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(0,0,0),0.03)
  852. lw.C0 = clerp(lw.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(0,0,0),.03)
  853. rootjoint.C0 = clerp(rootjoint.C0, rootcf*CFrame.new(0, 0, 0),0.3)
  854. neck.C0 = clerp(neck.C0, necko*CFrame.Angles(0,0,0),0.03)
  855. rh.C0=clerp(rh.C0,r0*CFrame.Angles(0,0,0),0.03)
  856. lh.C0=clerp(lh.C0,l0*CFrame.Angles(0,0,0),0.03)
  857. elseif torvel>1 and hitfloor~=nil and attack==false then
  858. rootjoint.C0 = clerp(rootjoint.C0, rootcf*CFrame.Angles(0.4, 0, 0)*CFrame.new(0,0,0),0.3)
  859. rw.C0=clerp(rw.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(40),0,math.rad(20)),0.03)
  860. lw.C0=clerp(lw.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-10)),0.03)
  861. neck.C0=clerp(neck.C0,necko*CFrame.Angles(-0.4,0,0),0.3)
  862. rh.C0=clerp(rh.C0,r0*CFrame.Angles(0,0,(math.rad(50)*math.cos(sine/5))),0.3)
  863. lh.C0=clerp(lh.C0,l0*CFrame.Angles(0,0,(math.rad(50)*math.cos(sine/5))),0.3)
  864. end
  865. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement