Advertisement
mememasterYT

allahuakbar script

Apr 17th, 2019
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.51 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. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Seauak | i just converted dis to fe because i hate my life lol jk")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126.  
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145. Player=game:GetService("Players").LocalPlayer
  146. Character=Player.Character
  147. PlayerGui=Player.PlayerGui
  148. Backpack=Player.Backpack
  149. Torso=Character.Torso
  150. Head=Character.Head
  151. Humanoid=Character.Humanoid
  152. m=Instance.new('Model',Character)
  153. LeftArm=Character["Left Arm"]
  154. LeftLeg=Character["Left Leg"]
  155. RightArm=Character["Right Arm"]
  156. RightLeg=Character["Right Leg"]
  157. LS=Torso["Left Shoulder"]
  158. LH=Torso["Left Hip"]
  159. RS=Torso["Right Shoulder"]
  160. RH=Torso["Right Hip"]
  161. Face = Head.face
  162. Neck=Torso.Neck
  163. it=Instance.new
  164. attacktype=1
  165. vt=Vector3.new
  166. cf=CFrame.new
  167. euler=CFrame.fromEulerAnglesXYZ
  168. angles=CFrame.Angles
  169. cloaked=false
  170. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  171. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  172. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  173. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  174. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  175. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  176. RootPart=Character.HumanoidRootPart
  177. RootJoint=RootPart.RootJoint
  178. RootCF=euler(-1.57,0,3.14)
  179. attack = false
  180. attackdebounce = false
  181. deb=false
  182. equipped=true
  183. hand=false
  184. MMouse=nil
  185. combo=0
  186. mana=0
  187. trispeed=.2
  188. attackmode='none'
  189. local idle=0
  190. local Anim="Idle"
  191. local Effects={}
  192. local gun=false
  193. local shoot=false
  194. player=nil
  195. mana=0
  196.  
  197. mouse=Player:GetMouse()
  198. --save shoulders
  199. RSH, LSH=nil, nil
  200. --welds
  201. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  202. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  203. LH=Torso["Left Hip"]
  204. RH=Torso["Right Hip"]
  205. TorsoColor=Torso.BrickColor
  206. function NoOutline(Part)
  207. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  208. end
  209. player=Player
  210. ch=Character
  211. RSH=ch.Torso["Right Shoulder"]
  212. LSH=ch.Torso["Left Shoulder"]
  213. --
  214. RSH.Parent=nil
  215. LSH.Parent=nil
  216. --
  217. RW.Name="Right Shoulder"
  218. RW.Part0=ch.Torso
  219. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  220. RW.C1=cf(0, 0.5, 0)
  221. RW.Part1=ch["Right Arm"]
  222. RW.Parent=ch.Torso
  223. --
  224. LW.Name="Left Shoulder"
  225. LW.Part0=ch.Torso
  226. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  227. LW.C1=cf(0, 0.5, 0)
  228. LW.Part1=ch["Left Arm"]
  229. LW.Parent=ch.Torso
  230.  
  231. Player=game:GetService('Players').LocalPlayer
  232. Character=Player.Character
  233. Mouse=Player:GetMouse()
  234. m=Instance.new('Model',Character)
  235.  
  236.  
  237. local function weldBetween(a, b)
  238. local weldd = Instance.new("ManualWeld")
  239. weldd.Part0 = a
  240. weldd.Part1 = b
  241. weldd.C0 = CFrame.new()
  242. weldd.C1 = b.CFrame:inverse() * a.CFrame
  243. weldd.Parent = a
  244. return weldd
  245. end
  246.  
  247. function swait(num)
  248. if num==0 or num==nil then
  249. game:service'RunService'.Stepped:wait(0)
  250. else
  251. for i=0,num do
  252. game:service'RunService'.Stepped:wait(0)
  253. end
  254. end
  255. end
  256.  
  257. function nooutline(part)
  258. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  259. end
  260.  
  261. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  262. local fp=it("Part")
  263. fp.formFactor=formfactor
  264. fp.Parent=parent
  265. fp.Reflectance=reflectance
  266. fp.Transparency=transparency
  267. fp.CanCollide=false
  268. fp.Locked=true
  269. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  270. fp.Name=name
  271. fp.Size=size
  272. fp.Position=Character.Torso.Position
  273. nooutline(fp)
  274. fp.Material=material
  275. fp:BreakJoints()
  276. return fp
  277. end
  278.  
  279. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  280. local mesh=it(Mesh)
  281. mesh.Parent=part
  282. if Mesh=="SpecialMesh" then
  283. mesh.MeshType=meshtype
  284. mesh.MeshId=meshid
  285. end
  286. mesh.Offset=offset
  287. mesh.Scale=scale
  288. return mesh
  289. end
  290.  
  291. function weld(parent,part0,part1,c0,c1)
  292. local weld=it("Weld")
  293. weld.Parent=parent
  294. weld.Part0=part0
  295. weld.Part1=part1
  296. weld.C0=c0
  297. weld.C1=c1
  298. return weld
  299. end
  300.  
  301.  
  302. local function CFrameFromTopBack(at, top, back)
  303. local right = top:Cross(back)
  304. return CFrame.new(at.x, at.y, at.z,
  305. right.x, top.x, back.x,
  306. right.y, top.y, back.y,
  307. right.z, top.z, back.z)
  308. end
  309.  
  310. function Triangle(a, b, c)
  311. local edg1 = (c-a):Dot((b-a).unit)
  312. local edg2 = (a-b):Dot((c-b).unit)
  313. local edg3 = (b-c):Dot((a-c).unit)
  314. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  315. a, b, c = a, b, c
  316. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  317. a, b, c = b, c, a
  318. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  319. a, b, c = c, a, b
  320. else
  321. assert(false, "unreachable")
  322. end
  323.  
  324. local len1 = (c-a):Dot((b-a).unit)
  325. local len2 = (b-a).magnitude - len1
  326. local width = (a + (b-a).unit*len1 - c).magnitude
  327.  
  328. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  329.  
  330. local list = {}
  331.  
  332. local TrailColor = ("Dark grey")
  333.  
  334. if len1 > 0.01 then
  335. local w1 = Instance.new('WedgePart', m)
  336. game:GetService("Debris"):AddItem(w1,5)
  337. w1.Material = "SmoothPlastic"
  338. w1.FormFactor = 'Custom'
  339. w1.BrickColor = BrickColor.new(TrailColor)
  340. w1.Transparency = 0
  341. w1.Reflectance = 0
  342. w1.Material = "SmoothPlastic"
  343. w1.CanCollide = false
  344. NoOutline(w1)
  345. local sz = Vector3.new(0.2, width, len1)
  346. w1.Size = sz
  347. local sp = Instance.new("SpecialMesh",w1)
  348. sp.MeshType = "Wedge"
  349. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  350. w1:BreakJoints()
  351. w1.Anchored = true
  352. w1.Parent = workspace
  353. w1.Transparency = 0.7
  354. table.insert(Effects,{w1,"Disappear",.01})
  355. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  356. table.insert(list,w1)
  357. end
  358.  
  359. if len2 > 0.01 then
  360. local w2 = Instance.new('WedgePart', m)
  361. game:GetService("Debris"):AddItem(w2,5)
  362. w2.Material = "SmoothPlastic"
  363. w2.FormFactor = 'Custom'
  364. w2.BrickColor = BrickColor.new(TrailColor)
  365. w2.Transparency = 0
  366. w2.Reflectance = 0
  367. w2.Material = "SmoothPlastic"
  368. w2.CanCollide = false
  369. NoOutline(w2)
  370. local sz = Vector3.new(0.2, width, len2)
  371. w2.Size = sz
  372. local sp = Instance.new("SpecialMesh",w2)
  373. sp.MeshType = "Wedge"
  374. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  375. w2:BreakJoints()
  376. w2.Anchored = true
  377. w2.Parent = workspace
  378. w2.Transparency = 0.7
  379. table.insert(Effects,{w2,"Disappear",.01})
  380. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  381. table.insert(list,w2)
  382. end
  383. return unpack(list)
  384. end
  385.  
  386.  
  387. so = function(id,par,vol,pit)
  388. coroutine.resume(coroutine.create(function()
  389. local sou = Instance.new("Sound",par or workspace)
  390. sou.Volume=vol
  391. sou.Pitch=pit or 1
  392. sou.SoundId=id
  393. swait()
  394. sou:play()
  395. game:GetService("Debris"):AddItem(sou,6)
  396. end))
  397. end
  398.  
  399. function clerp(a,b,t)
  400. local qa = {QuaternionFromCFrame(a)}
  401. local qb = {QuaternionFromCFrame(b)}
  402. local ax, ay, az = a.x, a.y, a.z
  403. local bx, by, bz = b.x, b.y, b.z
  404. local _t = 1-t
  405. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  406. end
  407.  
  408. function QuaternionFromCFrame(cf)
  409. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  410. local trace = m00 + m11 + m22
  411. if trace > 0 then
  412. local s = math.sqrt(1 + trace)
  413. local recip = 0.5/s
  414. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  415. else
  416. local i = 0
  417. if m11 > m00 then
  418. i = 1
  419. end
  420. if m22 > (i == 0 and m00 or m11) then
  421. i = 2
  422. end
  423. if i == 0 then
  424. local s = math.sqrt(m00-m11-m22+1)
  425. local recip = 0.5/s
  426. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  427. elseif i == 1 then
  428. local s = math.sqrt(m11-m22-m00+1)
  429. local recip = 0.5/s
  430. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  431. elseif i == 2 then
  432. local s = math.sqrt(m22-m00-m11+1)
  433. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  434. end
  435. end
  436. end
  437.  
  438. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  439. local xs, ys, zs = x + x, y + y, z + z
  440. local wx, wy, wz = w*xs, w*ys, w*zs
  441. local xx = x*xs
  442. local xy = x*ys
  443. local xz = x*zs
  444. local yy = y*ys
  445. local yz = y*zs
  446. local zz = z*zs
  447. 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))
  448. end
  449.  
  450. function QuaternionSlerp(a, b, t)
  451. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  452. local startInterp, finishInterp;
  453. if cosTheta >= 0.0001 then
  454. if (1 - cosTheta) > 0.0001 then
  455. local theta = math.acos(cosTheta)
  456. local invSinTheta = 1/math.sin(theta)
  457. startInterp = math.sin((1-t)*theta)*invSinTheta
  458. finishInterp = math.sin(t*theta)*invSinTheta
  459. else
  460. startInterp = 1-t
  461. finishInterp = t
  462. end
  463. else
  464. if (1+cosTheta) > 0.0001 then
  465. local theta = math.acos(-cosTheta)
  466. local invSinTheta = 1/math.sin(theta)
  467. startInterp = math.sin((t-1)*theta)*invSinTheta
  468. finishInterp = math.sin(t*theta)*invSinTheta
  469. else
  470. startInterp = t-1
  471. finishInterp = t
  472. end
  473. end
  474. 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
  475. end
  476.  
  477. --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  478.  
  479.  
  480. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  481. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  482. end
  483.  
  484. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  485. if hit.Parent==nil then
  486. return
  487. end
  488. h=hit.Parent:FindFirstChild("Humanoid")
  489. for _,v in pairs(hit.Parent:children()) do
  490. if v:IsA("Humanoid") then
  491. h=v
  492. end
  493. end
  494. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  495. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  496. end
  497. if hit.Parent.className=="Hat" then
  498. hit=hit.Parent.Parent:findFirstChild("Head")
  499. end
  500. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  501. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  502. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  503. return
  504. end]]
  505. -- hs(hit,1.2)
  506. c=Instance.new("ObjectValue")
  507. c.Name="creator"
  508. c.Value=game:service("Players").LocalPlayer
  509. c.Parent=h
  510. game:GetService("Debris"):AddItem(c,.5)
  511. Damage=math.random(minim,maxim)
  512. -- h:TakeDamage(Damage)
  513. blocked=false
  514. block=hit.Parent:findFirstChild("Block")
  515. if block~=nil then
  516. print(block.className)
  517. if block.className=="NumberValue" then
  518. if block.Value>0 then
  519. blocked=true
  520. if decreaseblock==nil then
  521. block.Value=block.Value-1
  522. end
  523. end
  524. end
  525. if block.className=="IntValue" then
  526. if block.Value>0 then
  527. blocked=true
  528. if decreaseblock~=nil then
  529. block.Value=block.Value-1
  530. end
  531. end
  532. end
  533. end
  534. if blocked==false then
  535. -- h:TakeDamage(Damage)
  536. h.Health=h.Health-Damage
  537. showDamage(hit.Parent,Damage,.5,BrickColor.new("New Yeller"))
  538. else
  539. h.Health=h.Health-(Damage/2)
  540. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  541. end
  542. if Type=="Knockdown" then
  543. hum=hit.Parent.Humanoid
  544. hum.PlatformStand=true
  545. coroutine.resume(coroutine.create(function(HHumanoid)
  546. swait(1)
  547. HHumanoid.PlatformStand=false
  548. end),hum)
  549. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  550. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  551. local bodvol=Instance.new("BodyVelocity")
  552. bodvol.velocity=angle*knockback
  553. bodvol.P=5000
  554. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  555. bodvol.Parent=hit
  556. rl=Instance.new("BodyAngularVelocity")
  557. rl.P=3000
  558. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  559. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  560. rl.Parent=hit
  561. game:GetService("Debris"):AddItem(bodvol,.5)
  562. game:GetService("Debris"):AddItem(rl,.5)
  563. elseif Type=="Normal" then
  564. vp=Instance.new("BodyVelocity")
  565. vp.P=500
  566. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  567. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  568. if KnockbackType==1 then
  569. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  570. elseif KnockbackType==2 then
  571. vp.velocity=Property.CFrame.lookVector*knockback
  572. end
  573. if knockback>0 then
  574. vp.Parent=hit.Parent.Torso
  575. end
  576. game:GetService("Debris"):AddItem(vp,.5)
  577. elseif Type=="Up" then
  578. local bodyVelocity=Instance.new("BodyVelocity")
  579. bodyVelocity.velocity=vt(0,60,0)
  580. bodyVelocity.P=5000
  581. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  582. bodyVelocity.Parent=hit
  583. game:GetService("Debris"):AddItem(bodyVelocity,1)
  584. rl=Instance.new("BodyAngularVelocity")
  585. rl.P=3000
  586. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  587. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  588. rl.Parent=hit
  589. game:GetService("Debris"):AddItem(rl,.5)
  590. elseif Type=="Snare" then
  591. bp=Instance.new("BodyPosition")
  592. bp.P=2000
  593. bp.D=100
  594. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  595. bp.position=hit.Parent.Torso.Position
  596. bp.Parent=hit.Parent.Torso
  597. game:GetService("Debris"):AddItem(bp,1)
  598. elseif Type=="Target" then
  599. if Targetting==false then
  600. ZTarget=hit.Parent.Torso
  601. coroutine.resume(coroutine.create(function(Part)
  602. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  603. swait(5)
  604. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  605. end),ZTarget)
  606. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  607. targetgui=Instance.new("BillboardGui")
  608. targetgui.Parent=ZTarget
  609. targetgui.Size=UDim2.new(10,100,10,100)
  610. targ=Instance.new("ImageLabel")
  611. targ.Parent=targetgui
  612. targ.BackgroundTransparency=1
  613. targ.Image="rbxassetid://4834067"
  614. targ.Size=UDim2.new(1,0,1,0)
  615. cam.CameraType="Scriptable"
  616. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  617. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  618. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  619. Targetting=true
  620. RocketTarget=ZTarget
  621. for i=1,Property do
  622. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  623. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  624. swait()
  625. end
  626. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  627. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  628. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  629. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  630. end
  631. Targetting=false
  632. RocketTarget=nil
  633. targetgui.Parent=nil
  634. cam.CameraType="Custom"
  635. end
  636. end
  637. debounce=Instance.new("BoolValue")
  638. debounce.Name="DebounceHit"
  639. debounce.Parent=hit.Parent
  640. debounce.Value=true
  641. game:GetService("Debris"):AddItem(debounce,Delay)
  642. c=Instance.new("ObjectValue")
  643. c.Name="creator"
  644. c.Value=Player
  645. c.Parent=h
  646. game:GetService("Debris"):AddItem(c,.5)
  647. CRIT=false
  648. hitDeb=true
  649. AttackPos=6
  650. end
  651. end
  652.  
  653. showDamage=function(Char,Dealt,du,Color)
  654.  
  655. function ALLAHUAKBAR()
  656. attack = true
  657. --removed local speak for alot of reasons...
  658. local colors = {"Red","Red","Red"} -- The only 3 colors, adding more will error.
  659. local chat = game:GetService("Chat")
  660. chat:Chat(Head,speak[math.random(1,#speak)], colors[math.random(1,3)] )
  661. for i = 0,1,0.05 do
  662. swait()
  663. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
  664. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3)
  665. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(50)), 0.3)
  666. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  667. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  668. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  669. end
  670. for i = 0,1,0.05 do
  671. swait()
  672. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
  673. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3)
  674. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(80), math.rad(0), math.rad(50)), 0.3)
  675. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  676. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  677. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  678. end
  679. for i = 1,20 do
  680. --so("http://roblox.com/asset/?id=197815953",workspace,1,1)
  681. so("rbxassetid://134854740",Torso,1,1.3)
  682. so("rbxassetid://247893371",workspace,1,1)
  683. so("rbxassetid://137994058",Torso,1,1)
  684. so("rbxassetid://165969964",Torso,1,1)
  685. local S = Instance.new("Explosion",workspace)
  686. S.Position = Torso.Position
  687. S.BlastPressure = 5
  688. S.BlastRadius = 50
  689. S.ExplosionType = 2
  690. end
  691. attack = false
  692. end
  693.  
  694. mouse.Button1Down:connect(function()
  695. ALLAHUAKBAR()
  696. end)
  697.  
  698. mouse.KeyDown:connect(function(k)
  699. k=k:lower()
  700.  
  701. end)
  702.  
  703.  
  704. local sine = 0
  705. local change = 1
  706. local val = 0
  707.  
  708. while true do
  709. swait()
  710. sine = sine + change
  711. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  712. local velderp=RootPart.Velocity.y
  713. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  714. if equipped==true or equipped==false then
  715. if attack==false then
  716. idle=idle+1
  717. else
  718. idle=0
  719. end
  720. if idle>=500 then
  721. if attack==false then
  722. --Sheath()
  723. end
  724. end
  725. if RootPart.Velocity.y > 1 and hitfloor==nil then
  726. Anim="Jump"
  727. if attack==false then
  728. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  729. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  730. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3)
  731. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)), 0.3)
  732. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3)
  733. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3)
  734. end
  735. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  736. Anim="Fall"
  737. if attack==false then
  738. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  739. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  740. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.3)
  741. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)), 0.3)
  742. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  743. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  744. end
  745. elseif torvel<1 and hitfloor~=nil then
  746. Anim="Idle"
  747. if attack==false then
  748. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(10)),.3)
  749. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-10)),.3)
  750. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.3)
  751. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
  752. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  753. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  754. end
  755. elseif torvel>2 and hitfloor~=nil then
  756. Anim="Walk"
  757. if attack==false then
  758. change=3
  759. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  760. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  761. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50*math.cos(sine/20)), math.rad(0), math.rad(10)), 0.3)
  762. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-50*math.cos(sine/20)), math.rad(0), math.rad(-10)), 0.3)
  763. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  764. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  765. end
  766. end
  767. end
  768. if #Effects>0 then
  769. --table.insert(Effects,{prt,"Block1",delay})
  770. for e=1,#Effects do
  771. if Effects[e]~=nil then
  772. --for j=1,#Effects[e] do
  773. local Thing=Effects[e]
  774. if Thing~=nil then
  775. local Part=Thing[1]
  776. local Mode=Thing[2]
  777. local Delay=Thing[3]
  778. local IncX=Thing[4]
  779. local IncY=Thing[5]
  780. local IncZ=Thing[6]
  781. if Thing[1].Transparency<=1 then
  782. if Thing[2]=="Block1" then
  783. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  784. Mesh=Thing[1].Mesh
  785. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  786. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  787. elseif Thing[2]=="Cylinder" then
  788. Mesh=Thing[1].Mesh
  789. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  790. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  791. elseif Thing[2]=="Blood" then
  792. Mesh=Thing[7]
  793. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  794. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  795. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  796. elseif Thing[2]=="Elec" then
  797. Mesh=Thing[1].Mesh
  798. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  799. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  800. elseif Thing[2]=="Disappear" then
  801. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  802. end
  803. else
  804. Part.Parent=nil
  805. table.remove(Effects,e)
  806. end
  807. end
  808. --end
  809. end
  810. end
  811. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement