niggerfaggggggot

Untitled

May 12th, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.58 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. Player=game:GetService("Players").LocalPlayer
  30. Character=Player.Character
  31. PlayerGui=Player.PlayerGui
  32. Backpack=Player.Backpack
  33. Torso=Character.Torso
  34. Head=Character.Head
  35. Humanoid=Character.Humanoid
  36. LeftArm=Character["Left Arm"]
  37. LeftLeg=Character["Left Leg"]
  38. RightArm=Character["Right Arm"]
  39. RightLeg=Character["Right Leg"]
  40. LS=Torso["Left Shoulder"]
  41. LH=Torso["Left Hip"]
  42. RS=Torso["Right Shoulder"]
  43. RH=Torso["Right Hip"]
  44. Face = Head.face
  45. Neck=Torso.Neck
  46. it=Instance.new
  47. attacktype=1
  48. vt=Vector3.new
  49. cf=CFrame.new
  50. euler=CFrame.fromEulerAnglesXYZ
  51. angles=CFrame.Angles
  52. cloaked=false
  53. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  54. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  55. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  56. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  57. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  58. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  59. RootPart=Character.HumanoidRootPart
  60. RootJoint=RootPart.RootJoint
  61. RootCF=euler(-1.57,0,3.14)
  62. attack = false
  63. attackdebounce = false
  64. deb=false
  65. equipped=true
  66. hand=false
  67. MMouse=nil
  68. combo=0
  69. mana=0
  70. trispeed=.2
  71. attackmode='none'
  72. local idle=0
  73. local Anim="Idle"
  74. local Effects={}
  75. local gun=false
  76. local shoot=false
  77. player=nil
  78. mana=0
  79. cam = workspace.CurrentCamera
  80. ZTarget = nil
  81. RocketTarget = nil
  82. local m = Instance.new("Model",Character)
  83. m.Name = "WeaponModel"
  84.  
  85. mouse=Player:GetMouse()
  86. --save shoulders
  87. RSH, LSH=nil, nil
  88. --welds
  89. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  90. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  91. LH=Torso["Left Hip"]
  92. RH=Torso["Right Hip"]
  93. TorsoColor=Torso.BrickColor
  94. function NoOutline(Part)
  95. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  96. end
  97. player=Player
  98. ch=Character
  99. RSH=ch.Torso["Right Shoulder"]
  100. LSH=ch.Torso["Left Shoulder"]
  101. --
  102. RSH.Parent=nil
  103. LSH.Parent=nil
  104. --
  105. RW.Name="Right Shoulder"
  106. RW.Part0=ch.Torso
  107. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  108. RW.C1=cf(0, 0.5, 0)
  109. RW.Part1=ch["Right Arm"]
  110. RW.Parent=ch.Torso
  111. --
  112. LW.Name="Left Shoulder"
  113. LW.Part0=ch.Torso
  114. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  115. LW.C1=cf(0, 0.5, 0)
  116. LW.Part1=ch["Left Arm"]
  117. LW.Parent=ch.Torso
  118.  
  119. function swait(num)
  120. if num==0 or num==nil then
  121. game:service'RunService'.Heartbeat:wait(0)
  122. else
  123. for i=0,num do
  124. game:service'RunService'.Heartbeat:wait(0)
  125. end
  126. end
  127. end
  128.  
  129. function nooutline(part)
  130. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  131. end
  132.  
  133. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  134. local fp=it("Part")
  135. fp.formFactor=formfactor
  136. fp.Parent=parent
  137. fp.Reflectance=reflectance
  138. fp.Transparency=transparency
  139. fp.CanCollide=false
  140. fp.Locked=true
  141. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  142. fp.Name=name
  143. fp.Size=size
  144. fp.Position=Character.Torso.Position
  145. nooutline(fp)
  146. fp.Material=material
  147. fp:BreakJoints()
  148. return fp
  149. end
  150.  
  151. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  152. local mesh=it(Mesh)
  153. mesh.Parent=part
  154. if Mesh=="SpecialMesh" then
  155. mesh.MeshType=meshtype
  156. mesh.MeshId=meshid
  157. end
  158. mesh.Offset=offset
  159. mesh.Scale=scale
  160. return mesh
  161. end
  162.  
  163. function weld(parent,part0,part1,c0,c1)
  164. local weld=it("Weld")
  165. weld.Parent=parent
  166. weld.Part0=part0
  167. weld.Part1=part1
  168. weld.C0=c0
  169. weld.C1=c1
  170. return weld
  171. end
  172.  
  173.  
  174. local function CFrameFromTopBack(at, top, back)
  175. local right = top:Cross(back)
  176. return CFrame.new(at.x, at.y, at.z,
  177. right.x, top.x, back.x,
  178. right.y, top.y, back.y,
  179. right.z, top.z, back.z)
  180. end
  181.  
  182. function Triangle(a, b, c)
  183. local edg1 = (c-a):Dot((b-a).unit)
  184. local edg2 = (a-b):Dot((c-b).unit)
  185. local edg3 = (b-c):Dot((a-c).unit)
  186. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  187. a, b, c = a, b, c
  188. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  189. a, b, c = b, c, a
  190. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  191. a, b, c = c, a, b
  192. else
  193. assert(false, "unreachable")
  194. end
  195.  
  196. local len1 = (c-a):Dot((b-a).unit)
  197. local len2 = (b-a).magnitude - len1
  198. local width = (a + (b-a).unit*len1 - c).magnitude
  199.  
  200. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  201.  
  202. local list = {}
  203.  
  204. local TrailColor = ("Dark grey")
  205.  
  206. if len1 > 0.01 then
  207. local w1 = Instance.new('WedgePart', m)
  208. game:GetService("Debris"):AddItem(w1,5)
  209. w1.Material = "SmoothPlastic"
  210. w1.FormFactor = 'Custom'
  211. w1.BrickColor = BrickColor.new(TrailColor)
  212. w1.Transparency = 0
  213. w1.Reflectance = 0
  214. w1.Material = "SmoothPlastic"
  215. w1.CanCollide = false
  216. NoOutline(w1)
  217. local sz = Vector3.new(0.2, width, len1)
  218. w1.Size = sz
  219. local sp = Instance.new("SpecialMesh",w1)
  220. sp.MeshType = "Wedge"
  221. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  222. w1:BreakJoints()
  223. w1.Anchored = true
  224. w1.Parent = workspace
  225. w1.Transparency = 0.7
  226. table.insert(Effects,{w1,"Disappear",.01})
  227. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  228. table.insert(list,w1)
  229. end
  230.  
  231. if len2 > 0.01 then
  232. local w2 = Instance.new('WedgePart', m)
  233. game:GetService("Debris"):AddItem(w2,5)
  234. w2.Material = "SmoothPlastic"
  235. w2.FormFactor = 'Custom'
  236. w2.BrickColor = BrickColor.new(TrailColor)
  237. w2.Transparency = 0
  238. w2.Reflectance = 0
  239. w2.Material = "SmoothPlastic"
  240. w2.CanCollide = false
  241. NoOutline(w2)
  242. local sz = Vector3.new(0.2, width, len2)
  243. w2.Size = sz
  244. local sp = Instance.new("SpecialMesh",w2)
  245. sp.MeshType = "Wedge"
  246. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  247. w2:BreakJoints()
  248. w2.Anchored = true
  249. w2.Parent = workspace
  250. w2.Transparency = 0.7
  251. table.insert(Effects,{w2,"Disappear",.01})
  252. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  253. table.insert(list,w2)
  254. end
  255. return unpack(list)
  256. end
  257.  
  258.  
  259. so = function(id,par,vol,pit)
  260. coroutine.resume(coroutine.create(function()
  261. local sou = Instance.new("Sound",par or workspace)
  262. sou.Volume=vol
  263. sou.Pitch=pit or 1
  264. sou.SoundId=id
  265. swait()
  266. sou:play()
  267. game:GetService("Debris"):AddItem(sou,6)
  268. end))
  269. end
  270.  
  271. function clerp(a,b,t)
  272. local qa = {QuaternionFromCFrame(a)}
  273. local qb = {QuaternionFromCFrame(b)}
  274. local ax, ay, az = a.x, a.y, a.z
  275. local bx, by, bz = b.x, b.y, b.z
  276. local _t = 1-t
  277. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  278. end
  279.  
  280. function QuaternionFromCFrame(cf)
  281. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  282. local trace = m00 + m11 + m22
  283. if trace > 0 then
  284. local s = math.sqrt(1 + trace)
  285. local recip = 0.5/s
  286. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  287. else
  288. local i = 0
  289. if m11 > m00 then
  290. i = 1
  291. end
  292. if m22 > (i == 0 and m00 or m11) then
  293. i = 2
  294. end
  295. if i == 0 then
  296. local s = math.sqrt(m00-m11-m22+1)
  297. local recip = 0.5/s
  298. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  299. elseif i == 1 then
  300. local s = math.sqrt(m11-m22-m00+1)
  301. local recip = 0.5/s
  302. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  303. elseif i == 2 then
  304. local s = math.sqrt(m22-m00-m11+1)
  305. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  306. end
  307. end
  308. end
  309.  
  310. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  311. local xs, ys, zs = x + x, y + y, z + z
  312. local wx, wy, wz = w*xs, w*ys, w*zs
  313. local xx = x*xs
  314. local xy = x*ys
  315. local xz = x*zs
  316. local yy = y*ys
  317. local yz = y*zs
  318. local zz = z*zs
  319. 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))
  320. end
  321.  
  322. function QuaternionSlerp(a, b, t)
  323. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  324. local startInterp, finishInterp;
  325. if cosTheta >= 0.0001 then
  326. if (1 - cosTheta) > 0.0001 then
  327. local theta = math.acos(cosTheta)
  328. local invSinTheta = 1/math.sin(theta)
  329. startInterp = math.sin((1-t)*theta)*invSinTheta
  330. finishInterp = math.sin(t*theta)*invSinTheta
  331. else
  332. startInterp = 1-t
  333. finishInterp = t
  334. end
  335. else
  336. if (1+cosTheta) > 0.0001 then
  337. local theta = math.acos(-cosTheta)
  338. local invSinTheta = 1/math.sin(theta)
  339. startInterp = math.sin((t-1)*theta)*invSinTheta
  340. finishInterp = math.sin(t*theta)*invSinTheta
  341. else
  342. startInterp = t-1
  343. finishInterp = t
  344. end
  345. end
  346. 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
  347. end
  348.  
  349. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  350. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  351. end
  352.  
  353. Damagefunc=function(Part,hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  354. if hit.Parent==nil then
  355. return
  356. end
  357. local h=hit.Parent:FindFirstChild("Humanoid")
  358. for _,v in pairs(hit.Parent:children()) do
  359. if v:IsA("Humanoid") then
  360. h=v
  361. end
  362. end
  363. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  364. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  365. end
  366. if hit.Parent.className=="Hat" then
  367. hit=hit.Parent.Parent:findFirstChild("Head")
  368. end
  369. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  370. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  371. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  372. return
  373. end]]
  374. -- hs(hit,1.2)
  375. local c=Instance.new("ObjectValue")
  376. c.Name="creator"
  377. c.Value=game:service("Players").LocalPlayer
  378. c.Parent=h
  379. game:GetService("Debris"):AddItem(c,.5)
  380. local Damage=math.random(minim,maxim)
  381. -- h:TakeDamage(Damage)
  382. local blocked=false
  383. local block=hit.Parent:findFirstChild("Block")
  384. if block~=nil then
  385. print(block.className)
  386. if block.className=="NumberValue" then
  387. if block.Value>0 then
  388. blocked=true
  389. if decreaseblock==nil then
  390. block.Value=block.Value-1
  391. end
  392. end
  393. end
  394. if block.className=="IntValue" then
  395. if block.Value>0 then
  396. blocked=true
  397. if decreaseblock~=nil then
  398. block.Value=block.Value-1
  399. end
  400. end
  401. end
  402. end
  403. if blocked==false then
  404. -- h:TakeDamage(Damage)
  405. h.Health=h.Health-Damage
  406. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Part.BrickColor.Color)
  407. else
  408. h.Health=h.Health-(Damage/2)
  409. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Bright blue").Color)
  410. end
  411. if Type=="Knockdown" then
  412. local hum=hit.Parent.Humanoid
  413. hum.PlatformStand=true
  414. coroutine.resume(coroutine.create(function(HHumanoid)
  415. swait(1)
  416. HHumanoid.PlatformStand=false
  417. end),hum)
  418. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  419. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  420. local bodvol=Instance.new("BodyVelocity")
  421. bodvol.velocity=angle*knockback
  422. bodvol.P=5000
  423. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  424. bodvol.Parent=hit
  425. local rl=Instance.new("BodyAngularVelocity")
  426. rl.P=3000
  427. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  428. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  429. rl.Parent=hit
  430. game:GetService("Debris"):AddItem(bodvol,.5)
  431. game:GetService("Debris"):AddItem(rl,.5)
  432. elseif Type=="Normal" then
  433. local vp=Instance.new("BodyVelocity")
  434. vp.P=500
  435. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  436. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  437. if KnockbackType==1 then
  438. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  439. elseif KnockbackType==2 then
  440. vp.velocity=Property.CFrame.lookVector*knockback
  441. end
  442. if knockback>0 then
  443. vp.Parent=hit.Parent.Torso
  444. end
  445. game:GetService("Debris"):AddItem(vp,.5)
  446. elseif Type=="Up" then
  447. local bodyVelocity=Instance.new("BodyVelocity")
  448. bodyVelocity.velocity=vt(0,60,0)
  449. bodyVelocity.P=5000
  450. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  451. bodyVelocity.Parent=hit
  452. game:GetService("Debris"):AddItem(bodyVelocity,1)
  453. local rl=Instance.new("BodyAngularVelocity")
  454. rl.P=3000
  455. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  456. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  457. rl.Parent=hit
  458. game:GetService("Debris"):AddItem(rl,.5)
  459. elseif Type=="Snare" then
  460. local bp=Instance.new("BodyPosition")
  461. bp.P=2000
  462. bp.D=100
  463. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  464. bp.position=hit.Parent.Torso.Position
  465. bp.Parent=hit.Parent.Torso
  466. game:GetService("Debris"):AddItem(bp,1)
  467. elseif Type=="Target" then
  468. local Targetting = false
  469. if Targetting==false then
  470. ZTarget=hit.Parent.Torso
  471. coroutine.resume(coroutine.create(function(Part)
  472. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  473. swait(5)
  474. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  475. end),ZTarget)
  476. local TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  477. local targetgui=Instance.new("BillboardGui")
  478. targetgui.Parent=ZTarget
  479. targetgui.Size=UDim2.new(10,100,10,100)
  480. local targ=Instance.new("ImageLabel")
  481. targ.Parent=targetgui
  482. targ.BackgroundTransparency=1
  483. targ.Image="rbxassetid://4834067"
  484. targ.Size=UDim2.new(1,0,1,0)
  485. cam.CameraType="Scriptable"
  486. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  487. local dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  488. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  489. Targetting=true
  490. RocketTarget=ZTarget
  491. for i=1,Property do
  492. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  493. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  494. swait()
  495. end
  496. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  497. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  498. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  499. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  500. end
  501. Targetting=false
  502. RocketTarget=nil
  503. targetgui.Parent=nil
  504. cam.CameraType="Custom"
  505. end
  506. end
  507. local debounce=Instance.new("BoolValue")
  508. debounce.Name="DebounceHit"
  509. debounce.Parent=hit.Parent
  510. debounce.Value=true
  511. game:GetService("Debris"):AddItem(debounce,Delay)
  512. c=Instance.new("ObjectValue")
  513. c.Name="creator"
  514. c.Value=Player
  515. c.Parent=h
  516. game:GetService("Debris"):AddItem(c,.5)
  517. end
  518. end
  519.  
  520.  
  521. function ShowDamage(Pos, Text, Time, Color)
  522. local Rate = (1 / 30)
  523. local Pos = (Pos or Vector3.new(0, 0, 0))
  524. local Text = (Text or "")
  525. local Time = (Time or 2)
  526. local Color = (Color or Color3.new(1, 0, 0))
  527. local EffectPart = part("Custom",workspace,"SmoothPlastic",0,1,BrickColor.new(Color),"Effect",vt(0,0,0))
  528. EffectPart.Anchored = true
  529. local BillboardGui = Instance.new("BillboardGui")
  530. BillboardGui.Size = UDim2.new(3, 0, 3, 0)
  531. BillboardGui.Adornee = EffectPart
  532. local TextLabel = Instance.new("TextLabel")
  533. TextLabel.BackgroundTransparency = 1
  534. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  535. TextLabel.Text = Text
  536. TextLabel.TextColor3 = Color
  537. TextLabel.TextScaled = true
  538. TextLabel.Font = Enum.Font.ArialBold
  539. TextLabel.Parent = BillboardGui
  540. BillboardGui.Parent = EffectPart
  541. game.Debris:AddItem(EffectPart, (Time + 0.1))
  542. EffectPart.Parent = game:GetService("Workspace")
  543. Delay(0, function()
  544. local Frames = (Time / Rate)
  545. for Frame = 1, Frames do
  546. wait(Rate)
  547. local Percent = (Frame / Frames)
  548. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  549. TextLabel.TextTransparency = Percent
  550. end
  551. if EffectPart and EffectPart.Parent then
  552. EffectPart:Destroy()
  553. end
  554. end)
  555. end
  556.  
  557. --example: local con = HitboxB.Touched:connect(function(hit) Damagefunc(Hitbox,hit,Dmg,Dmg,math.random(Knockback,Knockback),"Normal",RootPart,.2,1) end)
  558.  
  559. handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Cool yellow","Handle",Vector3.new(0.34799999, 1.85999942, 0.34799999))
  560. handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0957183838, 0.289899826, 1.02796435, 0.999997258, -4.47034765e-008, -4.76837329e-007, 4.76837158e-007, -4.47016042e-008, -1.00000381, 5.96046448e-008, 0.999994218, -4.47017996e-008))
  561. mesh("CylinderMesh",handle,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  562. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(3.6771996, 0.348000109, 0.620599985))
  563. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0752487183, -3.95978737, -0.00869596004, 0.999994516, 9.53674999e-007, 1.4901282e-008, 9.53674999e-007, 1.00000763, 6.53699317e-013, 1.4901282e-008, 6.50146603e-013, 0.999988437))
  564. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.34799999, 4.75599957, 0.620599985))
  565. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000137329102, -3.495821, -0.00869381428, 0.999994516, 9.53674999e-007, 1.4901282e-008, 9.53674999e-007, 1.00000763, 6.53699317e-013, 1.4901282e-008, 6.50146603e-013, 0.999988437))
  566. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Cool yellow","Part",Vector3.new(3.94400001, 0.579999983, 0.579999983))
  567. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0578308105, -3.95979309, 1.54972076e-005, 0.999994516, 9.53674999e-007, 1.4901282e-008, 9.53674999e-007, 1.00000763, 6.53699317e-013, 1.4901282e-008, 6.50146603e-013, 0.999988437))
  568. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Cool yellow","Part",Vector3.new(0.579999983, 5.10399961, 0.579999983))
  569. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000137329102, -3.43782616, 9.41753387e-006, 0.999994516, 9.53674999e-007, 1.4901282e-008, 9.53674999e-007, 1.00000763, 6.53699317e-013, 1.4901282e-008, 6.50146603e-013, 0.999988437))
  570. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.811999977, 0.69599992, 0.812000036))
  571. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(6.86645508e-005, 1.89788628, 9.65595245e-006, 0.999994516, 9.53674999e-007, 1.4901282e-008, 9.53674999e-007, 1.00000763, 6.53699317e-013, 1.4901282e-008, 6.50146603e-013, 0.999988437))
  572. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  573. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Cool yellow","Part",Vector3.new(0.579999983, 0.811999559, 0.579999983))
  574. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(5.34057617e-005, 1.25990677, 1.13248825e-005, 0.999994516, 9.53674999e-007, 1.4901282e-008, 9.53674999e-007, 1.00000763, 6.53699317e-013, 1.4901282e-008, 6.50146603e-013, 0.999988437))
  575. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  576. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.811999977, 0.34799999, 0.812000036))
  577. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(5.7220459e-005, 1.60789871, 1.40666962e-005, 0.999994516, 9.53674999e-007, 1.4901282e-008, 9.53674999e-007, 1.00000763, 6.53699317e-013, 1.4901282e-008, 6.50146603e-013, 0.999988437))
  578. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  579.  
  580. function attackone()
  581. attack = true
  582. for i = 1,50 do
  583. so("rbxassetid://270657517",workspace,1,1)
  584. end
  585. for i = 1,40 do
  586. swait()
  587. for i = 0,1,0.2 do
  588. swait()
  589. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-30),math.rad(0),math.rad(0)),.3)
  590. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-30),math.rad(0),math.rad(0)),.3)
  591. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(20)), 0.3)
  592. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(-50)), 0.3)
  593. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  594. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  595. end
  596. for i = 0,1,0.2 do
  597. swait()
  598. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  599. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  600. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-20)), 0.3)
  601. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-20)), 0.3)
  602. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
  603. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20)),.3)
  604. end
  605. for i = 0,1,0.2 do
  606. swait()
  607. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-30),math.rad(0),math.rad(0)),.3)
  608. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-30),math.rad(0),math.rad(0)),.3)
  609. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(20)), 0.3)
  610. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(-50)), 0.3)
  611. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  612. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  613. end
  614. for i = 0,1,0.2 do
  615. swait()
  616. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  617. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  618. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
  619. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-20)), 0.3)
  620. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
  621. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20)),.3)
  622. end
  623. end
  624. attack = false
  625. end
  626.  
  627. mouse.Button1Down:connect(function()
  628. if attack == false and attacktype == 1 then
  629. attacktype = 1
  630. attackone()
  631. end
  632. end)
  633.  
  634. mouse.KeyDown:connect(function(k)
  635. k=k:lower()
  636. if attack == false and k == '' then
  637.  
  638. end
  639. end)
  640.  
  641. local sine = 0
  642. local change = 1
  643. local val = 0
  644.  
  645. while true do
  646. swait()
  647. sine = sine + change
  648. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  649. local velderp=RootPart.Velocity.y
  650. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  651. if equipped==true or equipped==false then
  652. if attack==false then
  653. idle=idle+1
  654. else
  655. idle=0
  656. end
  657. if idle>=500 then
  658. if attack==false then
  659. end
  660. end
  661. if RootPart.Velocity.y > 1 and hitfloor==nil then
  662. Anim="Jump"
  663. if attack==false then
  664. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  665. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  666. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(0)), 0.3)
  667. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  668. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  669. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  670. end
  671. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  672. Anim="Fall"
  673. if attack==false then
  674. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  675. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  676. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(0)), 0.3)
  677. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  678. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  679. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  680. end
  681. elseif torvel<1 and hitfloor~=nil then
  682. Anim="Idle"
  683. if attack==false then
  684. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  685. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  686. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(0)), 0.3)
  687. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  688. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  689. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  690. end
  691. elseif torvel>2 and hitfloor~=nil then
  692. Anim="Walk"
  693. if attack==false then
  694. change=3
  695. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  696. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  697. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(0)), 0.3)
  698. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  699. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  700. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  701. end
  702. end
  703. end
  704. if #Effects>0 then
  705. for e=1,#Effects do
  706. if Effects[e]~=nil then
  707. local Thing=Effects[e]
  708. if Thing~=nil then
  709. local Part=Thing[1]
  710. local Mode=Thing[2]
  711. local Delay=Thing[3]
  712. local IncX=Thing[4]
  713. local IncY=Thing[5]
  714. local IncZ=Thing[6]
  715. if Thing[1].Transparency<=1 then
  716. if Thing[2]=="Block1" then
  717. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  718. Mesh=Thing[1].Mesh
  719. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  720. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  721. elseif Thing[2]=="Cylinder" then
  722. Mesh=Thing[1].Mesh
  723. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  724. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  725. elseif Thing[2]=="Blood" then
  726. Mesh=Thing[7]
  727. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  728. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  729. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  730. elseif Thing[2]=="Elec" then
  731. Mesh=Thing[1].Mesh
  732. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  733. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  734. elseif Thing[2]=="Disappear" then
  735. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  736. end
  737. else
  738. Part.Parent=nil
  739. table.remove(Effects,e)
  740. end
  741. end
  742. end
  743. end
  744. end
  745. end
Add Comment
Please, Sign In to add comment