Advertisement
DaOMEGAa32

lua hammer fe

May 14th, 2019
5,701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.86 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153. local oc = oc or function(...) return ... end
  154.  
  155. function weld(p0,p1,c0,c1,par)
  156. local w = Instance.new("Weld",p0 or par)
  157. w.Part0 = p0
  158. w.Part1 = p1
  159. w.C0 = c0 or CFrame.new()
  160. w.C1 = c1 or CFrame.new()
  161. return w
  162. end
  163.  
  164. function lerp(a, b, t)
  165. return a + (b - a)*t
  166. end
  167.  
  168. do
  169. local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end
  170.  
  171. local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end
  172.  
  173. local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end
  174.  
  175. function clerp(a,b,t)
  176. local qa = {QuaternionFromCFrame(a)}
  177. local qb = {QuaternionFromCFrame(b)}
  178. local ax, ay, az = a.x, a.y, a.z
  179. local bx, by, bz = b.x, b.y, b.z
  180.  
  181. local _t = 1-t
  182. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  183. end
  184. end
  185. local his = {}
  186.  
  187. function ctween(tar,prop,c2,t,b)
  188. local function doIt()
  189. local now = tick()
  190. his[tar] = now
  191. local c1 = tar[prop]
  192. for i=1,t do
  193. if his[tar] ~= now then return end
  194. tar[prop] = clerp(c1,c2,1/t*i)
  195. wait(1/60)
  196. end
  197. end
  198. if b then coroutine.wrap(doIt)() else doIt() end
  199. end
  200.  
  201. function tickwave(time,length,offset)
  202. return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length
  203. end
  204.  
  205. function playSound(id,parent,volume,pitch)
  206. local sound = Instance.new("Sound",parent or workspace)
  207. sound.SoundId = "http://www.roblox.com/asset?id="..id
  208. sound.Volume = volume or 1
  209. sound.Pitch = pitch or 1
  210. coroutine.wrap(function()
  211. wait()
  212. sound:Play()
  213. wait(10)
  214. sound:Stop()
  215. sound:Destroy()
  216. end)()
  217. return sound
  218. end
  219.  
  220. local plr = game.Players.LocalPlayer
  221. local char = plr.Character
  222. local mouse = plr:GetMouse()
  223.  
  224. local nk = char.Torso.Neck
  225. local nk0 = CFrame.new(0,1,0) * CFrame.Angles(-math.pi/2,0,math.pi)
  226. local ra,la = char["Right Arm"], char["Left Arm"]
  227. ra:BreakJoints()
  228. la:BreakJoints()
  229. local rs = weld(char.Torso,ra,CFrame.new(1.25,.5,0), CFrame.new(-.25,.5,0),stuff)
  230. local ls = weld(char.Torso,la,CFrame.new(-1.25,.5,0), CFrame.new(.25,.5,0),stuff)
  231. ls.Part1.FrontSurface = "Hinge"
  232. rs.Part1.FrontSurface = "Hinge"
  233. local rs0 = rs.C0
  234. local ls0 = ls.C0
  235.  
  236. local color1 = BrickColor.new("Dark gray")
  237. local color2 = BrickColor.new("Navy blue")
  238.  
  239. local stuff = Instance.new("Model",char)
  240. pcall(function() char["Hammur"]:Destroy() end)
  241. stuff.Name = "Hammur"
  242. wait(.5)
  243. local handle = Instance.new("Part")
  244. handle.FormFactor = "Custom"
  245. handle.BrickColor = color1
  246. handle.Reflectance = .25
  247. handle.Size = Vector3.new(.5,5,.5)
  248. handle.TopSurface = "Smooth"
  249. handle.BottomSurface = "Smooth"
  250. handle.CanCollide = false
  251. handle.Parent = stuff
  252.  
  253. local grip = weld(char["Right Arm"],handle,CFrame.new(0,-.95,0)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,-1.4,0))
  254. local grip0 = grip.C0
  255. local hamend = handle:Clone()
  256. Instance.new("BlockMesh",hamend)
  257. hamend.Parent = stuff
  258. hamend.Size = Vector3.new(2,2,3.5)
  259. local hamwel = weld(handle,hamend,CFrame.new(0,3,0))
  260. local hamsd1 = hamend:Clone()
  261. hamsd1.Mesh.Scale = Vector3.new(1,1,1)
  262. hamsd1.Parent = stuff
  263. hamsd1.Size = Vector3.new(2.3,2.3,.3)
  264. weld(hamend,hamsd1,CFrame.new(0,0,1.75))
  265. local hamsd2 = hamsd1:Clone()
  266. hamsd2.Parent = stuff
  267. weld(hamend,hamsd2,CFrame.new(0,0,-1.75))
  268. local hamp = hamsd1:Clone()
  269. hamp.Parent = stuff
  270. hamp.Size = Vector3.new(.2,.2,3.5)
  271. weld(hamend,hamp,CFrame.new(.95,.95,0))
  272. hamp = hamp:Clone()
  273. hamp.Parent = stuff
  274. weld(hamend,hamp,CFrame.new(.95,-.95,0))
  275. hamp = hamp:Clone()
  276. hamp.Parent = stuff
  277. weld(hamend,hamp,CFrame.new(-.95,-.95,0))
  278. hamp = hamp:Clone()
  279. hamp.Parent = stuff
  280. weld(hamend,hamp,CFrame.new(-.95,.95,0))
  281. hamp = hamp:Clone()
  282. hamp.BrickColor = color2
  283. hamp.Reflectance = .2
  284. hamp.Size = Vector3.new(.2,.2,2.5)
  285. hamp.Parent = stuff
  286. weld(hamend,hamp,CFrame.new(0,.95,0))
  287. hamp = hamp:Clone()
  288. hamp.Parent = stuff
  289. weld(hamend,hamp,CFrame.new(0,-.95,0))
  290. hamp = hamp:Clone()
  291. hamp.Parent = stuff
  292. weld(hamend,hamp,CFrame.new(.95,0,0))
  293. hamp = hamp:Clone()
  294. hamp.Parent = stuff
  295. weld(hamend,hamp,CFrame.new(-.95,0,0))
  296. hamp = handle:Clone()
  297. hamp.BrickColor = color2
  298. hamp.Reflectance = .2
  299. hamp.Parent = stuff
  300. hamp.Size = Vector3.new(.4,.2,.4)
  301. Instance.new("CylinderMesh",hamp)
  302. weld(hamend,hamp,CFrame.new(0,-.955,1.2))
  303. hamp = hamp:Clone()
  304. hamp.Parent = stuff
  305. weld(hamend,hamp,CFrame.new(0,-.955,-1.2))
  306. hamp = hamp:Clone()
  307. hamp.Parent = stuff
  308. weld(hamend,hamp,CFrame.new(0,.955,1.2))
  309. hamp = hamp:Clone()
  310. hamp.Parent = stuff
  311. weld(hamend,hamp,CFrame.new(0,.955,-1.2))
  312. hamp = hamp:Clone()
  313. hamp.Parent = stuff
  314. weld(hamend,hamp,CFrame.new(.955,0,-1.2) * CFrame.Angles(0,0,math.rad(90)))
  315. hamp = hamp:Clone()
  316. hamp.Parent = stuff
  317. weld(hamend,hamp,CFrame.new(.955,0,1.2) * CFrame.Angles(0,0,math.rad(90)))
  318. hamp = hamp:Clone()
  319. hamp.Parent = stuff
  320. weld(hamend,hamp,CFrame.new(-.955,0,-1.2) * CFrame.Angles(0,0,math.rad(90)))
  321. hamp = hamp:Clone()
  322. hamp.Parent = stuff
  323. weld(hamend,hamp,CFrame.new(-.955,0,1.2) * CFrame.Angles(0,0,math.rad(90)))
  324. hamp = hamp:Clone()
  325. hamp.Parent = stuff
  326. weld(hamend,hamp,CFrame.new(.6,.955,0))
  327. hamp = hamp:Clone()
  328. hamp.Parent = stuff
  329. weld(hamend,hamp,CFrame.new(-.6,.955,0))
  330. hamp = hamp:Clone()
  331. hamp.Parent = stuff
  332. weld(hamend,hamp,CFrame.new(.6,-.955,0))
  333. hamp = hamp:Clone()
  334. hamp.Parent = stuff
  335. weld(hamend,hamp,CFrame.new(-.6,-.955,0))
  336. hamp = hamp:Clone()
  337. hamp.Parent = stuff
  338. weld(hamend,hamp,CFrame.new(-.955,.6,0) * CFrame.Angles(0,0,math.rad(90)))
  339. hamp = hamp:Clone()
  340. hamp.Parent = stuff
  341. weld(hamend,hamp,CFrame.new(-.955,-.6,0) * CFrame.Angles(0,0,math.rad(90)))
  342. hamp = hamp:Clone()
  343. hamp.Parent = stuff
  344. weld(hamend,hamp,CFrame.new(.955,.6,0) * CFrame.Angles(0,0,math.rad(90)))
  345. hamp = hamp:Clone()
  346. hamp.Parent = stuff
  347. weld(hamend,hamp,CFrame.new(.955,-.6,0) * CFrame.Angles(0,0,math.rad(90)))
  348. local luacyl = hamp:Clone()
  349. luacyl.BrickColor = BrickColor.Blue()
  350. luacyl.Parent = stuff
  351. luacyl.Mesh.Scale = Vector3.new(1,.2,1)
  352. luacyl.Size = Vector3.new(2,.2,2)
  353. weld(hamsd1,luacyl,CFrame.new(0,0,.14) * CFrame.Angles(math.rad(90),0,0))
  354. hamp = luacyl:Clone()
  355. hamp.BrickColor = BrickColor.White()
  356. hamp.Parent = stuff
  357. hamp.Size = Vector3.new(.7,.2,.7)
  358. weld(luacyl,hamp,CFrame.new(.35,.01,-.35))
  359. local luamoon = luacyl:Clone()
  360. luamoon.Parent = stuff
  361. luamoon.Size = Vector3.new(.7,.2,.7)
  362. local mnw = weld(luacyl,luamoon,CFrame.new(1.2,.02,-1.2))
  363. for r = 1,180,10 do
  364. local r2 = 2 * (math.pi/180*r)
  365. local l = hamsd1:Clone()
  366. l.Parent = stuff
  367. l.BrickColor = luacyl.BrickColor
  368. l.Size = Vector3.new(.3,.2,.2)
  369. l.Mesh.Scale = Vector3.new(1,.3,.3)
  370. weld(luacyl,l,CFrame.new(Vector3.new(math.sin(r2)*1.7,0,math.cos(r2)*1.7),Vector3.new()))
  371. end
  372. hamp = hamend:Clone()
  373. hamp.BrickColor = color2
  374. hamp.Reflectance = .2
  375. hamp.Size = Vector3.new(.2,.2,3.5)
  376. hamp.Mesh.Scale = Vector3.new(.25,.25,1)
  377. hamp.Parent = stuff
  378. weld(hamend,hamp,CFrame.new(-1.05,.95,0))
  379. hamp = hamp:Clone()
  380. hamp.Parent = stuff
  381. weld(hamend,hamp,CFrame.new(-.95,1.05,0))
  382. hamp = hamp:Clone()
  383. hamp.Parent = stuff
  384. weld(hamend,hamp,CFrame.new(1.05,.95,0))
  385. hamp = hamp:Clone()
  386. hamp.Parent = stuff
  387. weld(hamend,hamp,CFrame.new(.95,1.05,0))
  388. hamp = hamp:Clone()
  389. hamp.Parent = stuff
  390. weld(hamend,hamp,CFrame.new(1.05,-.95,0))
  391. hamp = hamp:Clone()
  392. hamp.Parent = stuff
  393. weld(hamend,hamp,CFrame.new(.95,-1.05,0))
  394. hamp = hamp:Clone()
  395. hamp.Parent = stuff
  396. weld(hamend,hamp,CFrame.new(-1.05,-.95,0))
  397. hamp = hamp:Clone()
  398. hamp.Parent = stuff
  399. weld(hamend,hamp,CFrame.new(-.95,-1.05,0))
  400. for x = -1,1 do
  401. for y = -1,1 do
  402. hamp = hamp:Clone()
  403. hamp.Mesh.Scale = Vector3.new(1,1,1)
  404. hamp.Size = Vector3.new(.5,.5,.2)
  405. hamp.Parent = stuff
  406. weld(hamsd2,hamp,CFrame.new(x*.7,y*.7,-.1))
  407. end
  408. end
  409.  
  410. rs.C0 = rs0 * CFrame.Angles(math.rad(70),math.rad(50),math.rad(-20))
  411. ls.C0 = ls0 * CFrame.new(.4,.2,-.3) * CFrame.Angles(math.rad(110),math.rad(0),math.rad(00)) * CFrame.Angles(0,math.rad(60),0)
  412.  
  413. function endScript()
  414. pcall(function() runcon:disconnect() end)
  415. pcall(function() kdcon:disconnect() end)
  416. pcall(function() kucon:disconnect() end)
  417. pcall(game.Destroy,stuff)
  418. pcall(game.Destroy,bg)
  419. pcall(game.Destroy,bv)
  420. end
  421.  
  422. local spintime = 3
  423. local idling = true
  424.  
  425. runcon = game:GetService("RunService").Stepped:connect(oc(function()
  426. if not stuff:IsDescendantOf(workspace) then
  427. endScript()
  428. end
  429. local an = (tick()%spintime)*360/spintime
  430. mnw.C0 = CFrame.Angles(0,math.rad(an),0) * CFrame.new(0,.04,1.7)
  431. if idling then
  432. rs.C0 = clerp(rs.C0,rs0 * CFrame.Angles(math.rad(70+tickwave(3,5)),math.rad(50),math.rad(-20)),.4)
  433. ls.C0 = clerp(ls.C0,ls0 * CFrame.new(.4,.2,-.3) * CFrame.Angles(math.rad(115+tickwave(3,5)),math.rad(0),math.rad(-5)) * CFrame.Angles(0,math.rad(60),0),.4)
  434. nk.C0 = clerp(nk.C0,nk0 * CFrame.Angles(tickwave(4,-.1),0,0),.4)
  435. grip.C0 = clerp(grip.C0,grip0,.4)
  436. end
  437. end))
  438.  
  439. function cfot(tar,cf,t)
  440. coroutine.wrap(function()
  441. for i=1,t do
  442. tar.CFrame = tar.CFrame * cf
  443. wait(1/30)
  444. end
  445. end)()
  446. end
  447.  
  448. function DoDamage(hum,dmg)
  449. if hum.Health == 0 then return end
  450. local a,b = ypcall(function()
  451. --hum:TakeDamage(dmg)
  452. hum.Health = hum.Health - dmg
  453. if not hum.Parent:FindFirstChild("Torso") then return end
  454. local m = Instance.new("Model",workspace)
  455. m.Name = -dmg
  456. local h = Instance.new("Humanoid",m)
  457. h.MaxHealth = 0
  458. local p = Instance.new("Part",m)
  459. p.Name = "Head"
  460. p.FormFactor = "Custom"
  461. p.Size = Vector3.new(.2,.2,.2)
  462. p.Transparency = 0.97
  463. p.CanCollide = false
  464. p.Anchored = true
  465. p:BreakJoints()
  466. game.Debris:AddItem(m,5)
  467. p.CFrame = CFrame.new(hum.Parent.Torso.Position) * CFrame.new(math.random(-2,2),2.5,math.random(-2,2))
  468. local rAm = math.random(3,6)/100
  469. coroutine.wrap(function()
  470. for i=1,300 do
  471. p.CFrame = p.CFrame * CFrame.new(0,rAm,0)
  472. wait()
  473. end
  474. p:Destroy()
  475. end)()
  476. end)
  477. if not a then print(b) end
  478. end
  479.  
  480. local atdeb = false
  481. local basiccombo = 0
  482. local basiccombotimer = 0
  483. bg = Instance.new("BodyGyro",char.Torso)
  484. bg.maxTorque = Vector3.new(1,0,1)*9e10
  485. bg.P = 10000
  486. bg.D = 500
  487. bv = Instance.new("BodyVelocity",char.Torso)
  488. bv.maxForce = Vector3.new()
  489. bv.P = 50000
  490.  
  491. kucon = mouse.KeyUp:connect(oc(function(k)
  492. if k == "0" and sprint then
  493. pcall(function() char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed / 1.5 end)
  494. sprint = false
  495. end
  496. end))
  497.  
  498. kdcon = mouse.KeyDown:connect(oc(function(k)
  499. if k == "0" and not sprint then
  500. pcall(function() char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed * 1.5 end)
  501. sprint = true
  502. end
  503. if k == "f" then
  504. if atdeb then return end
  505. atdeb = true
  506. idling = false
  507. playSound(105374058,hamend,1,1)
  508. --- bg.cframe = char.Torso.CFrame * CFrame.Angles(math.rad(7),0,0)
  509. -- ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(-20),0,0),7,true)
  510. ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(150),math.rad(0),math.rad(-90)),7)
  511. ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(160),math.rad(0),math.rad(30)),13,true)
  512. ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(-35),0,0),13,true)
  513. ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(160),math.rad(0),math.rad(60)),13)
  514. playSound(92597296,hamend,1,1.07)
  515. local s = playSound(96626016,hamend)
  516. s.Volume = 0
  517. local hitcon
  518. hitcon = hamend.Touched:connect(function(hit)
  519. s.Volume = 1
  520. if not hit.Anchored then
  521. hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*-20
  522. end
  523. local hum = hit.Parent:FindFirstChild("Humanoid")
  524. if hum and not hum:IsDescendantOf(char) then
  525. DoDamage(hum,30)
  526. hum.PlatformStand = true
  527. wait(.6)
  528. hum.PlatformStand = false
  529. end
  530. end)
  531. bg.maxTorque = Vector3.new(1,1,1)*9e10
  532. ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(35),math.rad(0),math.rad(30)),4,true)
  533. ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(35),0,0),4,true)
  534. ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(35),math.rad(0),math.rad(-30)),4)
  535. if workspace:FindPartOnRay(Ray.new(hamend.Position,hamend.CFrame.lookVector*3),char) then
  536. s.Volume = 1
  537. end
  538. wait(.2)
  539. bg.maxTorque = Vector3.new(1,0,1)*9e10
  540. hitcon:disconnect()
  541. atdeb = false
  542. idling = true
  543. end
  544. if k == "q" then
  545. if atdeb then return end
  546. atdeb = true
  547. idling = false
  548. playSound(105374058,hamend,1,1)
  549. bg.cframe = char.Torso.CFrame * CFrame.Angles(math.rad(7),0,0)
  550. ctween(grip,"C0",grip0*CFrame.Angles(math.rad(-30),math.rad(-25),math.rad(-15)),9,true)
  551. ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(150),math.rad(0),math.rad(30)),7,true)
  552. ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(-20),0,0),7,true)
  553. ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(150),math.rad(0),math.rad(-30)),7)
  554. ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(160),math.rad(0),math.rad(30)),13,true)
  555. ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(-35),0,0),13,true)
  556. ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(160),math.rad(0),math.rad(-30)),13)
  557. playSound(92597296,hamend,1,1.07)
  558. local s = playSound(96626016,hamend)
  559. s.Volume = 0
  560. local hitcon
  561. hitcon = hamend.Touched:connect(function(hit)
  562. s.Volume = 1
  563. if not hit.Anchored then
  564. hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*-20
  565. end
  566. local hum = hit.Parent:FindFirstChild("Humanoid")
  567. if hum and not hum:IsDescendantOf(char) then
  568. DoDamage(hum,30)
  569. hum.PlatformStand = true
  570. wait(.6)
  571. hum.PlatformStand = false
  572. end
  573. end)
  574. bg.cframe = char.Torso.CFrame * CFrame.Angles(math.rad(7),0,0)
  575. wait(.05)
  576. bg.cframe = char.Torso.CFrame * CFrame.Angles(math.rad(-20),0,0)
  577. bg.maxTorque = Vector3.new(1,1,1)*9e10
  578. ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(55),math.rad(5),math.rad(50)),7,true)
  579. ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(5),0,0),4,true)
  580. ctween(rs,"C0",rs0*CFrame.new(-.9,0,-.9) * CFrame.Angles(math.rad(50),math.rad(5),math.rad(-50)),7)
  581. if workspace:FindPartOnRay(Ray.new(hamend.Position,hamend.CFrame.lookVector*3),char) then
  582. s.Volume = 1
  583. end
  584. wait(.2)
  585. bg.maxTorque = Vector3.new(1,0,1)*9e10
  586. hitcon:disconnect()
  587. atdeb = false
  588. idling = true
  589. end
  590. if k == "r" then
  591. if atdeb then return end
  592. atdeb = true
  593. idling = false
  594. ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(70),math.rad(0),math.rad(30)),7,true)
  595. ctween(grip,"C0",grip0*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-60))*CFrame.Angles(0,math.rad(180),0),9,true)
  596. bg.maxTorque = Vector3.new(1,1,1)*9e10
  597. bg.cframe = char.Torso.CFrame
  598. ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(70),math.rad(0),math.rad(-30)),7,true)
  599. local s = playSound(92597296,hamend,1,1.07)
  600. s.Looped = true
  601. local sndmd = {}
  602. local hitcon
  603. hitcon = hamend.Touched:connect(function(hit)
  604. if not sndmd[hit] then sndmd[hit] = playSound(10730819,hamend) end
  605.  
  606. if not hit.Anchored then
  607. hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*60
  608. end
  609. local hum = hit.Parent:FindFirstChild("Humanoid")
  610. if hum and not hum:IsDescendantOf(char) then
  611. DoDamage(hum,math.random(4,6))
  612. hum.Sit = true
  613. wait(2)
  614. hum.Sit = false
  615. end
  616. end)
  617. for i=1,20 do
  618. bg.cframe = bg.cframe * CFrame.Angles(0,math.rad(-1440/20),0)
  619. wait(.1)
  620. end
  621. hitcon:disconnect()
  622. bg.maxTorque = Vector3.new(1,0,1)*9e10
  623. s:Stop()
  624. s:Destroy()
  625. atdeb = false
  626. idling = true
  627. end
  628. if k == "e" then
  629. if atdeb then return end
  630. basiccombo = (tick()-basiccombotimer > .5 or basiccombo == 2) and 1 or basiccombo + 1
  631. idling = false
  632. atdeb = true
  633. if basiccombo == 1 then
  634. ctween(ls,"C0",ls0 * CFrame.new(.2,.2,-.1) * CFrame.Angles(math.rad(120),math.rad(0),math.rad(5)) * CFrame.Angles(0,math.rad(60),0),7,true)
  635. ctween(rs,"C0",rs0*CFrame.new(0,0,-.3) * CFrame.Angles(math.rad(120),math.rad(70),math.rad(-30)),7)
  636. bg.maxTorque = Vector3.new(1,1,1)*9e10
  637. bg.cframe = char.Torso.CFrame * CFrame.Angles(0,math.rad(-40),0)
  638. playSound(92597296,hamend,1,1.2)
  639. local ac
  640. local hitcon
  641. hitcon = hamend.Touched:connect(function(hit)
  642. if not ac then ac = playSound(10730819,hamend,1,1) end
  643. if not hit.Anchored then
  644. hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*50
  645. end
  646. local hum = hit.Parent:FindFirstChild("Humanoid")
  647. if hum and not hum:IsDescendantOf(char) then
  648. DoDamage(hum,10)
  649. end
  650. end)
  651. ctween(ls,"C0",ls0 * CFrame.new(1,.2,-1) * CFrame.Angles(math.rad(115),math.rad(0),math.rad(40)) * CFrame.Angles(0,math.rad(60),0),6,true)
  652. ctween(rs,"C0",rs0*CFrame.new(0,0,-.3) * CFrame.Angles(math.rad(120),math.rad(80),math.rad(-30))* CFrame.Angles(math.rad(-50),0,0),6,true)
  653. wait(.1)
  654. bg.cframe = char.Torso.CFrame * CFrame.Angles(0,math.rad(40),0)
  655. hitcon:disconnect()
  656. elseif basiccombo == 2 then
  657. ctween(ls,"C0",ls0*CFrame.new(1,0,-1) * CFrame.Angles(math.rad(5),math.rad(0),math.rad(70)),10,true)
  658. ctween(grip,"C0",grip0*CFrame.Angles(math.rad(10),0,0),12,true)
  659. ctween(rs,"C0",rs0*CFrame.new(0,0,0) * CFrame.Angles(math.rad(-5),math.rad(0),math.rad(0)),10,true)
  660. wait(.2)
  661. playSound(92597296,hamend,1,.7)
  662. wait(.1)
  663. bg.maxTorque = Vector3.new(1,1,1)*9e10
  664. bg.cframe = char.Torso.CFrame
  665. bv.maxForce = Vector3.new(1,0,1)*9e5
  666. bv.velocity = bg.cframe.lookVector * 70
  667. coroutine.wrap(function() for i=1,25 do bv.velocity = bv.velocity*.9 wait(1/30) end bv.maxForce = Vector3.new() end)()
  668. local thrustcon
  669. thrustcon = hamend.Touched:connect(function(hit)
  670. if not hit.Anchored then
  671. hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*-40
  672. end
  673. local hum = hit.Parent:FindFirstChild("Humanoid")
  674. if hum and not hum:IsDescendantOf(char) then
  675. DoDamage(hum,5)
  676. --thrustcon:disconnect()
  677. hum.Sit = true
  678. ctween(grip,"C0",grip0*CFrame.Angles(math.rad(30),0,0),5,true)
  679. if not ac then ac = playSound(92597296,hamend,1,1.15) end
  680. local tor = hum.Parent:FindFirstChild("Torso")
  681. if tor and not tor:FindFirstChild("torv") then
  682. --tor.Velocity = bg.cframe.lookVector*30 + Vector3.new(0,100,0)
  683. local torv = Instance.new("BodyVelocity",tor)
  684. torv.maxForce = Vector3.new(1,1,1)*9e9
  685. torv.P = 2000
  686. torv.velocity = bg.cframe.lookVector*20 + Vector3.new(0,120,0)
  687. torv.Name = "torv"
  688. local torav = Instance.new("BodyAngularVelocity",tor)
  689. torav.maxTorque = Vector3.new(1,1,1)*9e9
  690. torav.P = 5000
  691. torav.angularvelocity = Vector3.new(math.random()-.5,math.random()-.5,math.random()-.5)*2
  692. coroutine.wrap(function()
  693. for i=1,torv.velocity.Y/196.22*30 do
  694. hum.Sit = true
  695. torv.velocity = torv.velocity - Vector3.new(0,196.22/30,0)
  696. wait(1/30)
  697. end
  698. torv:Destroy()
  699. torav:Destroy()
  700. tor.Velocity = Vector3.new()
  701. end)()
  702. end
  703. end
  704. end)
  705. ctween(ls,"C0",ls0*CFrame.new(1,0,-1) * CFrame.Angles(math.rad(80),math.rad(0),math.rad(50)),12,true)
  706. ctween(grip,"C0",grip0*CFrame.Angles(math.rad(-70),0,0),12,true)
  707. ctween(rs,"C0",rs0*CFrame.new(-.6,0,-.7) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-10)),12,true)
  708. Delay(.3,function() thrustcon:disconnect() end)
  709.  
  710. end
  711. wait(.1)
  712. bg.maxTorque = Vector3.new(1,0,1)*9e10
  713.  
  714. basiccombotimer = tick()
  715. atdeb = false
  716. idling = true
  717.  
  718. end -- 96626016, 92597296
  719. bg.cframe = CFrame.new(char.Torso.Position,char.Torso.Position+char.Torso.CFrame.lookVector*Vector3.new(1,0,1))
  720. end))
  721.  
  722. char.Humanoid.MaxHealth = 220
  723. char.Humanoid.WalkSpeed = 20
  724. wait(.3)
  725. char.Humanoid.Health = 220
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement