Advertisement
Void_scripter0

t pose

Jun 7th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.56 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,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
  5.  
  6.  
  7.  
  8. wait(0.2)
  9.  
  10.  
  11.  
  12. Player = game:GetService("Players").LocalPlayer
  13. PlayerGui = Player.PlayerGui
  14. Cam = workspace.CurrentCamera
  15. Backpack = Player.Backpack
  16. Character = Player.Character
  17. Humanoid = Character.Humanoid
  18. Mouse = Player:GetMouse()
  19. RootPart = Character["HumanoidRootPart"]
  20. Torso = Character["Torso"]
  21. Head = Character["Head"]
  22. RightArm = Character["Right Arm"]
  23. LeftArm = Character["Left Arm"]
  24. RightLeg = Character["Right Leg"]
  25. LeftLeg = Character["Left Leg"]
  26. RootJoint = RootPart["RootJoint"]
  27. Neck = Torso["Neck"]
  28. RightShoulder = Torso["Right Shoulder"]
  29. LeftShoulder = Torso["Left Shoulder"]
  30. RightHip = Torso["Right Hip"]
  31. LeftHip = Torso["Left Hip"]
  32. local bgmusic = Instance.new("Sound")
  33. bgmusic.Volume = 20
  34. bgmusic.SoundId = "rbxassetid://3180460921"
  35. bgmusic.Looped = true
  36. bgmusic.Parent = owner.Character.Torso
  37. bgmusic:Play()
  38.  
  39. IT = Instance.new
  40. CF = CFrame.new
  41. VT = Vector3.new
  42. RAD = math.rad
  43. C3 = Color3.new
  44. UD2 = UDim2.new
  45. BRICKC = BrickColor.new
  46. ANGLES = CFrame.Angles
  47. EULER = CFrame.fromEulerAnglesXYZ
  48. COS = math.cos
  49. ACOS = math.acos
  50. SIN = math.sin
  51. ASIN = math.asin
  52. ABS = math.abs
  53. MRANDOM = math.random
  54. FLOOR = math.floor
  55.  
  56. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  57. local NEWMESH = IT(MESH)
  58. if MESH == "SpecialMesh" then
  59. NEWMESH.MeshType = MESHTYPE
  60. if MESHID ~= "nil" and MESHID ~= "" then
  61. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  62. end
  63. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  64. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  65. end
  66. end
  67. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  68. NEWMESH.Scale = SCALE
  69. NEWMESH.Parent = PARENT
  70. return NEWMESH
  71. end
  72.  
  73. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
  74. local NEWPART = IT("Part")
  75. NEWPART.formFactor = FORMFACTOR
  76. NEWPART.Reflectance = REFLECTANCE
  77. NEWPART.Transparency = TRANSPARENCY
  78. NEWPART.CanCollide = false
  79. NEWPART.Locked = true
  80. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  81. NEWPART.Name = NAME
  82. NEWPART.Size = SIZE
  83. NEWPART.Position = Torso.Position
  84. NEWPART.Material = MATERIAL
  85. NEWPART:BreakJoints()
  86. NEWPART.Parent = PARENT
  87. return NEWPART
  88. end
  89.  
  90.  
  91. --//=================================\\
  92. --|| CUSTOMIZATION
  93. --\\=================================//
  94.  
  95. Class_Name = "Template"
  96. Weapon_Name = "Add-ons"
  97.  
  98. Custom_Colors = {
  99. Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
  100. Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
  101.  
  102. Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
  103. Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
  104. Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
  105. Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
  106. Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
  107.  
  108. Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
  109. Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
  110. Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
  111. Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
  112. Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
  113. }
  114.  
  115.  
  116. Player_Size = 1 --Size of the player.
  117. Animation_Speed = 1
  118. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  119.  
  120. local Speed = 75
  121. local Effects2 = {}
  122.  
  123. --//=================================\\
  124. --|| END OF CUSTOMIZATION
  125. --\\=================================//
  126.  
  127. local function weldBetween(a, b)
  128. local weldd = Instance.new("ManualWeld")
  129. weldd.Part0 = a
  130. weldd.Part1 = b
  131. weldd.C0 = CFrame.new()
  132. weldd.C1 = b.CFrame:inverse() * a.CFrame
  133. weldd.Parent = a
  134. return weldd
  135. end
  136.  
  137. function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
  138. local acs = Instance.new("Part")
  139. acs.CanCollide = false
  140. acs.Anchored = false
  141. acs.Size = Vector3.new(0,0,0)
  142. acs.CFrame = attachmentpart.CFrame
  143. acs.Parent = Character
  144. acs.BrickColor = color
  145. local meshs = Instance.new("SpecialMesh")
  146. meshs.MeshId = mesh
  147. meshs.TextureId = texture
  148. meshs.Parent = acs
  149. meshs.Scale = scale
  150. meshs.Offset = offset
  151. weldBetween(attachmentpart,acs)
  152. end
  153.  
  154. function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
  155. if TYPE == "Gem" then
  156. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  157. acs.Anchored = false
  158. acs.CanCollide = false
  159. acs.CFrame = PART.CFrame
  160. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
  161. weldBetween(PART,acs)
  162. elseif TYPE == "Skull" then
  163. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  164. acs.Anchored = false
  165. acs.CanCollide = false
  166. acs.CFrame = PART.CFrame
  167. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
  168. weldBetween(PART,acs)
  169. elseif TYPE == "Eye" then
  170. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  171. acs.Anchored = false
  172. acs.CanCollide = false
  173. acs.CFrame = PART.CFrame
  174. local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
  175. weldBetween(PART,acs)
  176. end
  177. end
  178.  
  179. --//=================================\\
  180. --|| USEFUL VALUES
  181. --\\=================================//
  182.  
  183. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  184. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  185. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  186. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  187. local CO1 = 0
  188. local CO2 = 0
  189. local CO3 = 0
  190. local CO4 = 0
  191. local CHANGEDEFENSE = 0
  192. local CHANGEDAMAGE = 0
  193. local CHANGEMOVEMENT = 0
  194. local ANIM = "Idle"
  195. local ATTACK = false
  196. local EQUIPPED = false
  197. local HOLD = false
  198. local COMBO = 1
  199. local LASTPOINT = nil
  200. local BLCF = nil
  201. local SCFR = nil
  202. local STAGGERHITANIM = false
  203. local STAGGERANIM = false
  204. local STUNANIM = false
  205. local CRITCHANCENUMBER = 0
  206. local IDLENUMBER = 0
  207. local DONUMBER = 0
  208. local HANDIDLE = false
  209. local SINE = 0
  210. local CHANGE = 2 / Animation_Speed
  211. local WALKINGANIM = false
  212. local WALK = 0
  213. local DISABLEJUMPING = false
  214. local HASBEENBLOCKED = false
  215. local STUNDELAYNUMBER = 0
  216. local MANADELAYNUMBER = 0
  217. local SECONDARYMANADELAYNUMBER = 0
  218. local ROBLOXIDLEANIMATION = IT("Animation")
  219. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  220. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  221. --ROBLOXIDLEANIMATION.Parent = Humanoid
  222. local WEAPONGUI = IT("ScreenGui", nil)
  223. WEAPONGUI.Name = "Weapon GUI"
  224. local WEAPONTOOL = IT("HopperBin", nil)
  225. WEAPONTOOL.Name = Weapon_Name
  226. local Weapon = IT("Model")
  227. Weapon.Name = Weapon_Name
  228. local Effects = IT("Folder", Weapon)
  229. Effects.Name = "Effects"
  230. local ANIMATOR = Humanoid.Animator
  231. local ANIMATE = Character.Animate
  232. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  233. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  234. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  235. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  236. local UNANCHOR = true
  237.  
  238. --//=================================\\
  239. --\\=================================//
  240.  
  241. --//=================================\\
  242. --|| STATS
  243. --\\=================================//
  244.  
  245. if Character:FindFirstChild("Stats") ~= nil then
  246. Character:FindFirstChild("Stats").Parent = nil
  247. end
  248.  
  249. local Stats = IT("Folder", nil)
  250. Stats.Name = "Stats"
  251. local ChangeStat = IT("Folder", Stats)
  252. ChangeStat.Name = "ChangeStat"
  253. local Defense = IT("NumberValue", Stats)
  254. Defense.Name = "Defense"
  255. Defense.Value = 1
  256. local Movement = IT("NumberValue", Stats)
  257. Movement.Name = "Movement"
  258. Movement.Value = 1
  259. local Damage = IT("NumberValue", Stats)
  260. Damage.Name = "Damage"
  261. Damage.Value = 1
  262. local Mana = IT("NumberValue", Stats)
  263. Mana.Name = "Mana"
  264. Mana.Value = 0
  265. local SecondaryMana = IT("NumberValue", Stats)
  266. SecondaryMana.Name = "SecondaryMana"
  267. SecondaryMana.Value = 0
  268. local CanCrit = IT("BoolValue", Stats)
  269. CanCrit.Name = "CanCrit"
  270. CanCrit.Value = false
  271. local CritChance = IT("NumberValue", Stats)
  272. CritChance.Name = "CritChance"
  273. CritChance.Value = 20
  274. local CanPenetrateArmor = IT("BoolValue", Stats)
  275. CanPenetrateArmor.Name = "CanPenetrateArmor"
  276. CanPenetrateArmor.Value = false
  277. local AntiTeamKill = IT("BoolValue", Stats)
  278. AntiTeamKill.Name = "AntiTeamKill"
  279. AntiTeamKill.Value = false
  280. local Rooted = IT("BoolValue", Stats)
  281. Rooted.Name = "Rooted"
  282. Rooted.Value = false
  283. local Block = IT("BoolValue", Stats)
  284. Block.Name = "Block"
  285. Block.Value = false
  286. local RecentEnemy = IT("ObjectValue", Stats)
  287. RecentEnemy.Name = "RecentEnemy"
  288. RecentEnemy.Value = nil
  289. local StaggerHit = IT("BoolValue", Stats)
  290. StaggerHit.Name = "StaggerHit"
  291. StaggerHit.Value = false
  292. local Stagger = IT("BoolValue", Stats)
  293. Stagger.Name = "Stagger"
  294. Stagger.Value = false
  295. local Stun = IT("BoolValue", Stats)
  296. Stun.Name = "Stun"
  297. Stun.Value = false
  298. local StunValue = IT("NumberValue", Stats)
  299. StunValue.Name = "StunValue"
  300. StunValue.Value = 0
  301.  
  302.  
  303. --//=================================\\
  304. --\\=================================//
  305.  
  306.  
  307. abss = Instance.new("BillboardGui")
  308. abss.Size = UDim2.new(10,0,10,0)
  309. abss.Enabled = false
  310. abss.AlwaysOnTop = true
  311. img2 = Instance.new("ImageLabel",abss)
  312. img2.Position = UDim2.new(0.35,0,0.35,0)
  313. img2.Size = UDim2.new(0.3,0,0.3,0)
  314. img2.Image = "rbxassetid://108413215"
  315. img2.BackgroundTransparency = 1
  316. img2.ImageColor3 = Color3.new(1,1,1)
  317.  
  318. local boop = nil
  319.  
  320.  
  321. --//=================================\\
  322. --|| DEBUFFS / BUFFS
  323. --\\=================================//
  324.  
  325. local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
  326. DEFENSECHANGE1.Name = "ChangeDefense"
  327. DEFENSECHANGE1.Value = 0
  328.  
  329. local MOVEMENTCHANGE1 = IT("NumberValue", nil)
  330. MOVEMENTCHANGE1.Name = "ChangeMovement"
  331. MOVEMENTCHANGE1.Value = 0
  332.  
  333. --//=================================\\
  334. --\\=================================//
  335.  
  336.  
  337.  
  338.  
  339.  
  340. --//=================================\\
  341. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  342. --\\=================================//
  343.  
  344. ArtificialHB = Instance.new("BindableEvent", script)
  345. ArtificialHB.Name = "ArtificialHB"
  346.  
  347. script:WaitForChild("ArtificialHB")
  348.  
  349. frame = Frame_Speed
  350. tf = 0
  351. allowframeloss = false
  352. tossremainder = false
  353. lastframe = tick()
  354. script.ArtificialHB:Fire()
  355.  
  356. game:GetService("RunService").Heartbeat:connect(function(s, p)
  357. tf = tf + s
  358. if tf >= frame then
  359. if allowframeloss then
  360. script.ArtificialHB:Fire()
  361. lastframe = tick()
  362. else
  363. for i = 1, math.floor(tf / frame) do
  364. script.ArtificialHB:Fire()
  365. end
  366. lastframe = tick()
  367. end
  368. if tossremainder then
  369. tf = 0
  370. else
  371. tf = tf - frame * math.floor(tf / frame)
  372. end
  373. end
  374. end)
  375.  
  376. --//=================================\\
  377. --\\=================================//
  378.  
  379.  
  380.  
  381.  
  382.  
  383. --//=================================\\
  384. --|| SOME FUNCTIONS
  385. --\\=================================//
  386.  
  387. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  388. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  389. end
  390.  
  391. function PositiveAngle(NUMBER)
  392. if NUMBER >= 0 then
  393. NUMBER = 0
  394. end
  395. return NUMBER
  396. end
  397.  
  398. function NegativeAngle(NUMBER)
  399. if NUMBER <= 0 then
  400. NUMBER = 0
  401. end
  402. return NUMBER
  403. end
  404.  
  405. function Swait(NUMBER)
  406. if NUMBER == 0 or NUMBER == nil then
  407. ArtificialHB.Event:wait()
  408. else
  409. for i = 1, NUMBER do
  410. ArtificialHB.Event:wait()
  411. end
  412. end
  413. end
  414.  
  415. function QuaternionFromCFrame(cf)
  416. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  417. local trace = m00 + m11 + m22
  418. if trace > 0 then
  419. local s = math.sqrt(1 + trace)
  420. local recip = 0.5 / s
  421. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  422. else
  423. local i = 0
  424. if m11 > m00 then
  425. i = 1
  426. end
  427. if m22 > (i == 0 and m00 or m11) then
  428. i = 2
  429. end
  430. if i == 0 then
  431. local s = math.sqrt(m00 - m11 - m22 + 1)
  432. local recip = 0.5 / s
  433. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  434. elseif i == 1 then
  435. local s = math.sqrt(m11 - m22 - m00 + 1)
  436. local recip = 0.5 / s
  437. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  438. elseif i == 2 then
  439. local s = math.sqrt(m22 - m00 - m11 + 1)
  440. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  441. end
  442. end
  443. end
  444.  
  445. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  446. local xs, ys, zs = x + x, y + y, z + z
  447. local wx, wy, wz = w * xs, w * ys, w * zs
  448. local xx = x * xs
  449. local xy = x * ys
  450. local xz = x * zs
  451. local yy = y * ys
  452. local yz = y * zs
  453. local zz = z * zs
  454. 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))
  455. end
  456.  
  457. function QuaternionSlerp(a, b, t)
  458. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  459. local startInterp, finishInterp;
  460. if cosTheta >= 0.0001 then
  461. if (1 - cosTheta) > 0.0001 then
  462. local theta = ACOS(cosTheta)
  463. local invSinTheta = 1 / SIN(theta)
  464. startInterp = SIN((1 - t) * theta) * invSinTheta
  465. finishInterp = SIN(t * theta) * invSinTheta
  466. else
  467. startInterp = 1 - t
  468. finishInterp = t
  469. end
  470. else
  471. if (1 + cosTheta) > 0.0001 then
  472. local theta = ACOS(-cosTheta)
  473. local invSinTheta = 1 / SIN(theta)
  474. startInterp = SIN((t - 1) * theta) * invSinTheta
  475. finishInterp = SIN(t * theta) * invSinTheta
  476. else
  477. startInterp = t - 1
  478. finishInterp = t
  479. end
  480. end
  481. 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
  482. end
  483.  
  484. function Clerp(a, b, t)
  485. local qa = {QuaternionFromCFrame(a)}
  486. local qb = {QuaternionFromCFrame(b)}
  487. local ax, ay, az = a.x, a.y, a.z
  488. local bx, by, bz = b.x, b.y, b.z
  489. local _t = 1 - t
  490. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  491. end
  492.  
  493. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  494. local frame = IT("Frame")
  495. frame.BackgroundTransparency = TRANSPARENCY
  496. frame.BorderSizePixel = BORDERSIZEPIXEL
  497. frame.Position = POSITION
  498. frame.Size = SIZE
  499. frame.BackgroundColor3 = COLOR
  500. frame.BorderColor3 = BORDERCOLOR
  501. frame.Name = NAME
  502. frame.Parent = PARENT
  503. return frame
  504. end
  505.  
  506. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  507. local label = IT("TextLabel")
  508. label.BackgroundTransparency = 1
  509. label.Size = UD2(1, 0, 1, 0)
  510. label.Position = UD2(0, 0, 0, 0)
  511. label.TextColor3 = C3(255, 255, 255)
  512. label.TextStrokeTransparency = STROKETRANSPARENCY
  513. label.TextTransparency = TRANSPARENCY
  514. label.FontSize = TEXTFONTSIZE
  515. label.Font = TEXTFONT
  516. label.BorderSizePixel = BORDERSIZEPIXEL
  517. label.TextScaled = true
  518. label.Text = TEXT
  519. label.Name = NAME
  520. label.Parent = PARENT
  521. return label
  522. end
  523.  
  524. function NoOutlines(PART)
  525. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  526. end
  527.  
  528.  
  529. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  530. local NEWWELD = IT(TYPE)
  531. NEWWELD.Part0 = PART0
  532. NEWWELD.Part1 = PART1
  533. NEWWELD.C0 = C0
  534. NEWWELD.C1 = C1
  535. NEWWELD.Parent = PARENT
  536. return NEWWELD
  537. end
  538.  
  539. function CreateSound(ID, PARENT, VOLUME, PITCH)
  540. coroutine.resume(coroutine.create(function()
  541. local NEWSOUND = IT("Sound", PARENT)
  542. NEWSOUND.Volume = VOLUME
  543. NEWSOUND.Pitch = PITCH
  544. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  545. Swait()
  546. NEWSOUND:play()
  547. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  548. end))
  549. end
  550.  
  551. function CFrameFromTopBack(at, top, back)
  552. local right = top:Cross(back)
  553. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  554. end
  555.  
  556. function Lightning(POSITION1, POSITION2, MULTIPLIERTIME, LIGHTNINGDELAY, OFFSET, BRICKCOLOR, MATERIAL, SIZE, TRANSPARENCY, LASTINGTIME)
  557. local MAGNITUDE = (POSITION1 - POSITION2).magnitude
  558. local CURRENTPOSITION = POSITION1
  559. local LIGHTNINGOFFSET = {-OFFSET, OFFSET}
  560. coroutine.resume(coroutine.create(function()
  561. for i = 1, MULTIPLIERTIME do
  562. local LIGHTNINGPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR,"Effect", VT(SIZE * Player_Size, SIZE * Player_Size, MAGNITUDE / MULTIPLIERTIME))
  563. LIGHTNINGPART.Anchored = true
  564. local LIGHTNINGOFFSET2 = VT(LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)])
  565. local LIGHTNINGPOSITION1 = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME).p + LIGHTNINGOFFSET2
  566. if MULTIPLIERTIME == i then
  567. local LIGHTNINGMAGNITUDE1 = (CURRENTPOSITION - POSITION2).magnitude
  568. LIGHTNINGPART.Size = VT(SIZE * Player_Size, SIZE * Player_Size, LIGHTNINGMAGNITUDE1)
  569. LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, -LIGHTNINGMAGNITUDE1 / 2)
  570. else
  571. LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, LIGHTNINGPOSITION1) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2)
  572. end
  573. CURRENTPOSITION=LIGHTNINGPART.CFrame * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2).p
  574. game.Debris:AddItem(LIGHTNINGPART, LASTINGTIME)
  575. coroutine.resume(coroutine.create(function()
  576. while LIGHTNINGPART.Transparency ~= 1 do
  577. --local StartTransparency = tra
  578. for i=0, 1, LASTINGTIME do
  579. Swait()
  580. LIGHTNINGPART.Transparency = LIGHTNINGPART.Transparency + (0.1 / LASTINGTIME)
  581. end
  582. end
  583. end))
  584. Swait(LIGHTNINGDELAY / Animation_Speed)
  585. end
  586. end))
  587. end
  588.  
  589. function MagicBlock(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  590. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  591. EFFECTPART.Anchored = true
  592. EFFECTPART.CFrame = CFRAME
  593. local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  594. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  595. coroutine.resume(coroutine.create(function(PART, MESH)
  596. for i = 0, 1, delay do
  597. Swait()
  598. PART.CFrame = PART.CFrame * ROTATION
  599. PART.Transparency = i
  600. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  601. end
  602. PART.Parent = nil
  603. end), EFFECTPART, EFFECTMESH)
  604. end
  605.  
  606. function MagicSphere(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  607. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  608. EFFECTPART.Anchored = true
  609. EFFECTPART.CFrame = CFRAME
  610. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Sphere", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  611. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  612. coroutine.resume(coroutine.create(function(PART, MESH)
  613. for i = 0, 1, delay do
  614. Swait()
  615. PART.CFrame = PART.CFrame * ROTATION
  616. PART.Transparency = i
  617. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  618. end
  619. PART.Parent = nil
  620. end), EFFECTPART, EFFECTMESH)
  621. end
  622.  
  623. function MagicCylinder(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  624. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  625. EFFECTPART.Anchored = true
  626. EFFECTPART.CFrame = CFRAME
  627. local EFFECTMESH = CreateMesh("CylinderMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  628. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  629. coroutine.resume(coroutine.create(function(PART, MESH)
  630. for i = 0, 1, delay do
  631. Swait()
  632. PART.CFrame = PART.CFrame * ROTATION
  633. PART.Transparency = i
  634. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  635. end
  636. PART.Parent = nil
  637. end), EFFECTPART, EFFECTMESH)
  638. end
  639.  
  640. function MagicHead(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  641. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  642. EFFECTPART.Anchored = true
  643. EFFECTPART.CFrame = CFRAME
  644. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Head", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  645. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  646. coroutine.resume(coroutine.create(function(PART, MESH)
  647. for i = 0, 1, delay do
  648. Swait()
  649. PART.CFrame = PART.CFrame * ROTATION
  650. PART.Transparency = i
  651. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  652. end
  653. PART.Parent = nil
  654. end), EFFECTPART, EFFECTMESH)
  655. end
  656.  
  657. function MagicRing(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  658. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  659. EFFECTPART.Anchored = true
  660. EFFECTPART.CFrame = CFRAME
  661. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "3270017", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  662. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  663. coroutine.resume(coroutine.create(function(PART, MESH)
  664. for i = 0, 1, delay do
  665. Swait()
  666. PART.CFrame = PART.CFrame * ROTATION
  667. PART.Transparency = i
  668. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  669. end
  670. PART.Parent = nil
  671. end), EFFECTPART, EFFECTMESH)
  672. end
  673.  
  674. function MagicWave(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  675. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  676. EFFECTPART.Anchored = true
  677. EFFECTPART.CFrame = CFRAME
  678. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "20329976", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), VT(0, 0, (-0.1 * Z1)) + (OFFSET * Player_Size))
  679. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  680. coroutine.resume(coroutine.create(function(PART, MESH)
  681. for i = 0, 1, delay do
  682. Swait()
  683. PART.CFrame = PART.CFrame * ROTATION
  684. PART.Transparency = i
  685. MESH.Offset = VT(0, 0, (-0.1 * MESH.Scale.Z))
  686. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  687. end
  688. PART.Parent = nil
  689. end), EFFECTPART, EFFECTMESH)
  690. end
  691.  
  692. function MagicCrystal(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  693. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  694. EFFECTPART.Anchored = true
  695. EFFECTPART.CFrame = CFRAME
  696. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "9756362", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  697. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  698. coroutine.resume(coroutine.create(function(PART, MESH)
  699. for i = 0, 1, delay do
  700. Swait()
  701. PART.CFrame = PART.CFrame * ROTATION
  702. PART.Transparency = i
  703. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  704. end
  705. PART.Parent = nil
  706. end), EFFECTPART, EFFECTMESH)
  707. end
  708.  
  709. function MagicSwirl(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  710. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  711. EFFECTPART.Anchored = true
  712. EFFECTPART.CFrame = CFRAME
  713. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1051557", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  714. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  715. coroutine.resume(coroutine.create(function(PART, MESH)
  716. for i = 0, 1, delay do
  717. Swait()
  718. PART.CFrame = PART.CFrame * ROTATION
  719. PART.Transparency = i
  720. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  721. end
  722. PART.Parent = nil
  723. end), EFFECTPART, EFFECTMESH)
  724. end
  725.  
  726. function MagicSharpCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  727. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  728. EFFECTPART.Anchored = true
  729. EFFECTPART.CFrame = CFRAME
  730. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1778999", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  731. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  732. coroutine.resume(coroutine.create(function(PART, MESH)
  733. for i = 0, 1, delay do
  734. Swait()
  735. PART.CFrame = PART.CFrame * ROTATION
  736. PART.Transparency = i
  737. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  738. end
  739. PART.Parent = nil
  740. end), EFFECTPART, EFFECTMESH)
  741. end
  742.  
  743. function MagicFlatCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  744. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  745. EFFECTPART.Anchored = true
  746. EFFECTPART.CFrame = CFRAME
  747. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1033714", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  748. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  749. coroutine.resume(coroutine.create(function(PART, MESH)
  750. for i = 0, 1, delay do
  751. Swait()
  752. PART.CFrame = PART.CFrame * ROTATION
  753. PART.Transparency = i
  754. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  755. end
  756. PART.Parent = nil
  757. end), EFFECTPART, EFFECTMESH)
  758. end
  759.  
  760. function MagicSpikedCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  761. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  762. EFFECTPART.Anchored = true
  763. EFFECTPART.CFrame = CFRAME
  764. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1323306", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  765. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  766. coroutine.resume(coroutine.create(function(PART, MESH)
  767. for i = 0, 1, delay do
  768. Swait()
  769. PART.CFrame = PART.CFrame * ROTATION
  770. PART.Transparency = i
  771. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  772. end
  773. PART.Parent = nil
  774. end), EFFECTPART, EFFECTMESH)
  775. end
  776.  
  777. function MagicFlatCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  778. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  779. EFFECTPART.Anchored = true
  780. EFFECTPART.CFrame = CFRAME
  781. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1078075", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  782. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  783. coroutine.resume(coroutine.create(function(PART, MESH)
  784. for i = 0, 1, delay do
  785. Swait()
  786. PART.CFrame = PART.CFrame * ROTATION
  787. PART.Transparency = i
  788. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  789. end
  790. PART.Parent = nil
  791. end), EFFECTPART, EFFECTMESH)
  792. end
  793.  
  794. function MagicSkull(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  795. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  796. EFFECTPART.Anchored = true
  797. EFFECTPART.CFrame = CFRAME
  798. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  799. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  800. coroutine.resume(coroutine.create(function(PART, MESH)
  801. for i = 0, 1, delay do
  802. Swait()
  803. PART.CFrame = PART.CFrame * ROTATION
  804. PART.Transparency = i
  805. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  806. end
  807. PART.Parent = nil
  808. end), EFFECTPART, EFFECTMESH)
  809. end
  810.  
  811. function ElectricEffect(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X, Y, Z, delay)
  812. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  813. EFFECTPART.Anchored = true
  814. EFFECTPART.CFrame = CFRAME
  815. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X * Player_Size, Y * Player_Size, Z * Player_Size), OFFSET * Player_Size)
  816. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  817. local XVALUE = MRANDOM()
  818. local YVALUE = MRANDOM()
  819. local ZVALUE = MRANDOM()
  820. coroutine.resume(coroutine.create(function(PART, MESH, THEXVALUE, THEYVALUE, THEZVALUE)
  821. for i = 0, 1, delay do
  822. Swait()
  823. PART.CFrame = PART.CFrame * ROTATION
  824. PART.Transparency = i
  825. THEXVALUE = THEXVALUE - 0.1 * (delay * 10)
  826. THEYVALUE = THEYVALUE - 0.1 * (delay * 10)
  827. THEZVALUE = THEZVALUE - 0.1 * (delay * 10)
  828. MESH.Scale = MESH.Scale + VT(THEXVALUE * Player_Size, THEYVALUE * Player_Size, THEZVALUE * Player_Size)
  829. end
  830. PART.Parent = nil
  831. end), EFFECTPART, EFFECTMESH, XVALUE, YVALUE, ZVALUE)
  832. end
  833.  
  834. function TrailEffect(BRICKCOLOR, MATERIAL, CURRENTCFRAME, OLDCFRAME, MESHTYPE, REFLECTANCE, SIZE, ROTATION, X, Y, Z, delay)
  835. local MAGNITUDECFRAME = (CURRENTCFRAME.p - OLDCFRAME.p).magnitude
  836. if MAGNITUDECFRAME > (1 / 100) then
  837. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT(1, MAGNITUDECFRAME, 1))
  838. EFFECTPART.Anchored = true
  839. EFFECTPART.CFrame = CF((CURRENTCFRAME.p + OLDCFRAME.p) / 2, OLDCFRAME.p) * ANGLES(RAD(90), 0, 0)
  840. local THEMESHTYPE = "BlockMesh"
  841. if MESHTYPE == "Cylinder" then
  842. THEMESHTYPE = "CylinderMesh"
  843. end
  844. local EFFECTMESH = CreateMesh(THEMESHTYPE, EFFECTPART, "", "", "", VT(0 + SIZE * Player_Size, 1, 0 + SIZE * Player_Size), VT(0, 0, 0))
  845. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  846. coroutine.resume(coroutine.create(function(PART, MESH)
  847. for i = 0, 1, delay do
  848. Swait()
  849. PART.CFrame = PART.CFrame * ROTATION
  850. PART.Transparency = i
  851. MESH.Scale = MESH.Scale + VT(X * Player_Size, Y * Player_Size, Z * Player_Size)
  852. end
  853. PART.Parent = nil
  854. end), EFFECTPART, EFFECTMESH)
  855. end
  856. end
  857.  
  858. function ClangEffect(BRICKCOLOR, MATERIAL, CFRAME, ANGLE, DURATION, SIZE, POWER, REFLECTANCE, X, Y, Z, delay)
  859. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 1, BRICKCOLOR, "Effect", VT())
  860. EFFECTPART.Anchored = true
  861. EFFECTPART.CFrame = CFRAME
  862. local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(0, 0, 0), VT(0, 0, 0))
  863. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  864. local THELASTPOINT = CFRAME
  865. coroutine.resume(coroutine.create(function(PART)
  866. for i = 1, DURATION do
  867. Swait()
  868. PART.CFrame = PART.CFrame * ANGLES(RAD(ANGLE), 0, 0) * CF(0, POWER * Player_Size, 0)
  869. TrailEffect(BRICKCOLOR, MATERIAL, PART.CFrame, THELASTPOINT, "Cylinder", REFLECTANCE, SIZE * Player_Size, ANGLES(0, 0, 0), X * Player_Size, Y * Player_Size, Z * Player_Size, delay)
  870. THELASTPOINT = PART.CFrame
  871. end
  872. PART.Parent = nil
  873. end), EFFECTPART)
  874. end
  875.  
  876. --local list={}
  877. function Triangle(Color, Material, a, b, c, delay)
  878. local edge1 = (c - a):Dot((b - a).unit)
  879. local edge2 = (a - b):Dot((c - b).unit)
  880. local edge3 = (b - c):Dot((a - c).unit)
  881. if edge1 <= (b - a).magnitude and edge1 >= 0 then
  882. a, b, c=a, b, c
  883. elseif edge2 <= (c - b).magnitude and edge2 >= 0 then
  884. a, b, c=b, c, a
  885. elseif edge3 <= (a - c).magnitude and edge3 >= 0 then
  886. a, b, c=c, a, b
  887. else
  888. assert(false, "unreachable")
  889. end
  890. local len1 = (c - a):Dot((b - a).unit)
  891. local len2 = (b - a).magnitude - len1
  892. local width = (a + (b - a).unit * len1 - c).magnitude
  893. local maincf = CFrameFromTopBack(a, (b - a):Cross(c - b).unit, - (b - a).unit)
  894. if len1 > 1 / 100 then
  895. local sz = VT(0.2, width, len1)
  896. local w1 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz)
  897. local sp = CreateMesh("SpecialMesh", w1, "Wedge", "", "", VT(0, 1, 1) * sz / w1.Size, VT(0, 0, 0))
  898. w1.Anchored = true
  899. w1.CFrame = maincf * ANGLES(math.pi, 0, math.pi / 2) * CF(0, width / 2, len1 / 2)
  900. coroutine.resume(coroutine.create(function()
  901. for i = 0.5, 1, delay * (2 / Animation_Speed) do
  902. Swait()
  903. w1.Transparency = i
  904. end
  905. w1.Parent = nil
  906. end))
  907. game:GetService("Debris"):AddItem(w1, 10)
  908. --table.insert(list, w1)
  909. end
  910. if len2 > 1 / 100 then
  911. local sz = VT(0.2, width, len2)
  912. local w2 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz)
  913. local sp = CreateMesh("SpecialMesh", w2, "Wedge", "", "", VT(0, 1, 1) * sz / w2.Size, VT(0, 0, 0))
  914. w2.Anchored = true
  915. w2.CFrame = maincf * ANGLES(math.pi, math.pi, -math.pi / 2) * CF(0, width / 2, -len1 - len2 / 2)
  916. coroutine.resume(coroutine.create(function()
  917. for i = 0.5, 1, delay * (2 / Animation_Speed) do
  918. Swait()
  919. w2.Transparency = i
  920. end
  921. w2.Parent = nil
  922. end))
  923. game:GetService("Debris"):AddItem(w2, 10)
  924. --table.insert(list, w2)
  925. end
  926. --return unpack(list)
  927. end
  928.  
  929. --[[Usage:
  930. local Pos = Part
  931. local Offset = Part.CFrame * CF(0, 0, 0)
  932. local Color = "Institutional white"
  933. local Material = "Neon"
  934. local TheDelay = 0.01
  935. local Height = 4
  936. BLCF = Offset
  937. if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then
  938. local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay)
  939. if a then game:GetService("Debris"):AddItem(a, 1) end
  940. if b then game:GetService("Debris"):AddItem(b, 1) end
  941. local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay)
  942. if a then game:GetService("Debris"):AddItem(a, 1) end
  943. if b then game:GetService("Debris"):AddItem(b, 1) end
  944. SCFR = BLCF
  945. elseif not SCFR then
  946. SCFR = BLCF
  947. end
  948. --
  949. BLCF = nil
  950. SCFR = nil
  951. --]]
  952.  
  953. --//=================================\\
  954. --\\=================================//
  955.  
  956.  
  957. --//=================================\\
  958. --|| WEAPON CREATION
  959. --\\=================================//
  960.  
  961. if Player_Size ~= 1 then
  962. for _, v in pairs (Weapon:GetChildren()) do
  963. if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then
  964. local p1 = v.Part1
  965. v.Part1 = nil
  966. local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components()
  967. v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
  968. v.Part1 = p1
  969. elseif v.ClassName == "Part" then
  970. for _, b in pairs (v:GetChildren()) do
  971. if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then
  972. b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size)
  973. end
  974. end
  975. end
  976. end
  977. end
  978.  
  979. for _, c in pairs(Weapon:GetChildren()) do
  980. if c.ClassName == "Part" then
  981. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  982. end
  983. end
  984.  
  985. Weapon.Parent = Character
  986.  
  987. Humanoid.Died:connect(function()
  988. ATTACK = true
  989. end)
  990.  
  991. print(Class_Name.." loaded.")
  992.  
  993. --//=================================\\
  994. --\\=================================//
  995.  
  996.  
  997.  
  998.  
  999.  
  1000. --//=================================\\
  1001. --|| DAMAGE FUNCTIONS
  1002. --\\=================================//
  1003.  
  1004. function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
  1005. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  1006. STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
  1007. local BODYGYRO = IT("BodyGyro", STATPART)
  1008. local BODYPOSITION = IT("BodyPosition", STATPART)
  1009. BODYPOSITION.P = 2000
  1010. BODYPOSITION.D = 100
  1011. BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
  1012. if LABELTYPE == "Normal" then
  1013. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
  1014. elseif LABELTYPE == "Debuff" then
  1015. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2))
  1016. elseif LABELTYPE == "Interruption" then
  1017. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2))
  1018. end
  1019. game:GetService("Debris"):AddItem(STATPART ,5)
  1020. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  1021. BILLBOARDGUI.Adornee = STATPART
  1022. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  1023. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  1024. BILLBOARDGUI.AlwaysOnTop = false
  1025. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  1026. TEXTLABEL.BackgroundTransparency = 1
  1027. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  1028. TEXTLABEL.Text = TEXT
  1029. TEXTLABEL.Font = "SciFi"
  1030. TEXTLABEL.FontSize="Size42"
  1031. TEXTLABEL.TextColor3 = COLOR
  1032. TEXTLABEL.TextStrokeTransparency = 1
  1033. TEXTLABEL.TextScaled = true
  1034. TEXTLABEL.TextWrapped = true
  1035. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  1036. wait(0.2)
  1037. for i=1, 5 do
  1038. wait()
  1039. THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0)
  1040. end
  1041. wait(1.2)
  1042. for i=1, 5 do
  1043. wait()
  1044. THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2
  1045. THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2
  1046. THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0)
  1047. end
  1048. THEPART.Parent = nil
  1049. end),STATPART, BODYPOSITION, TEXTLABEL)
  1050. end
  1051.  
  1052.  
  1053. --//=================================\\
  1054. --|| DAMAGING
  1055. --\\=================================//
  1056.  
  1057.  
  1058.  
  1059. function dealdamage(hit,min,max,maxstrength,beserk,critrate,critmultiplier)
  1060. if hit.Parent ~= Character and hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChild("HitBy"..Player.Name) == nil then
  1061. local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
  1062. local dmg = math.random(min,max)
  1063. if humanoid.Health > 0 then
  1064. if beserk == true then
  1065. humanoid.Health = 0
  1066. else
  1067. CreateSound("260430060", hit, 1.2, MRANDOM(7, 12) / 10)
  1068. hit.Velocity = CFrame.new(Torso.Position,hit.Position).lookVector*5*maxstrength
  1069. if math.random(1,100) < critrate+1 then
  1070. humanoid.Health = humanoid.Health - dmg*critmultiplier
  1071. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0))
  1072. else
  1073. humanoid.Health = humanoid.Health - dmg
  1074. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), dmg, C3(255/255, 0, 0))
  1075. end
  1076. local defence = Instance.new("BoolValue",hit.Parent)
  1077. defence.Name = ("HitBy"..Player.Name)
  1078. game:GetService("Debris"):AddItem(defence, 0.5)
  1079. end
  1080. end
  1081. end
  1082. end
  1083.  
  1084. function killnearest(position,range,maxstrength)
  1085. for i,v in ipairs(workspace:GetChildren()) do
  1086. local body = v:GetChildren()
  1087. for part = 1, #body do
  1088. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  1089. if(body[part].Position - position).Magnitude < range then
  1090. if v.ClassName == "Model" then
  1091. v:BreakJoints()
  1092. end
  1093. --table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2})
  1094. body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength
  1095. end
  1096. end
  1097. end
  1098. if v.ClassName == "Part" then
  1099. if v.Anchored == false and (v.Position - position).Magnitude < range then
  1100. --table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2})
  1101. v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
  1102. end
  1103. end
  1104. end
  1105. end
  1106.  
  1107. --//=================================\\
  1108. --|| ATTACK FUNCTIONS AND STUFF
  1109. --\\=================================//
  1110.  
  1111. --//=================================\\
  1112. --\\=================================//
  1113.  
  1114.  
  1115. function unanchor()
  1116. if UNANCHOR == true then
  1117. g = Character:GetChildren()
  1118. for i = 1, #g do
  1119. if g[i].ClassName == "Part" then
  1120. g[i].Anchored = false
  1121. end
  1122. end
  1123. end
  1124. end
  1125.  
  1126.  
  1127. --//=================================\\
  1128. --|| WRAP THE WHOLE SCRIPT UP
  1129. --\\=================================//
  1130.  
  1131. Humanoid.Changed:connect(function(Jump)
  1132. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  1133. Humanoid.Jump = false
  1134. end
  1135. end)
  1136. Rooted = true
  1137. ANIMATE.Parent = nil
  1138. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1139. IDLEANIMATION:Play()
  1140. Swait()
  1141. Rooted = false
  1142.  
  1143. local loop = 0
  1144.  
  1145. while true do
  1146. Swait()
  1147. SINE = SINE + CHANGE
  1148. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1149. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1150. local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  1151. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  1152. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1153. if ATTACK == false then
  1154. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size + 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1155. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1156. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1157. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1158. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1159. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1160. end
  1161. if #Effects2>0 then
  1162. for e=1,#Effects2 do
  1163. if Effects2[e]~=nil then
  1164. local Thing=Effects2[e]
  1165. if Thing~=nil then
  1166. local Part=Thing[1]
  1167. local Mode=Thing[2]
  1168. local Delay=Thing[3]
  1169. local IncX=Thing[4]
  1170. local IncY=Thing[5]
  1171. local IncZ=Thing[6]
  1172. local Part2=Thing[8]
  1173. if Thing[1].Transparency<=1 then
  1174. if Thing[2]=="Block1" then
  1175. Thing[1].CFrame=Part2.CFrame
  1176. Mesh=Thing[1].Mesh
  1177. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1178. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1179. elseif Thing[2]=="Cylinder" then
  1180. Mesh=Thing[1].Mesh
  1181. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1182. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1183. elseif Thing[2]=="Blood" then
  1184. Mesh=Thing[7]
  1185. Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
  1186. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1187. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1188. elseif Thing[2]=="Elec" then
  1189. Mesh=Thing[1].Mesh
  1190. Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
  1191. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1192. elseif Thing[2]=="Disappear" then
  1193. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1194. end
  1195. else
  1196. Part.Parent=nil
  1197. table.remove(Effects2,e)
  1198. end
  1199. end
  1200. end
  1201. end
  1202. end
  1203. unanchor()
  1204. Humanoid.MaxHealth = "inf"
  1205. Humanoid.Health = "inf"
  1206. if Rooted == false then
  1207. Disable_Jump = false
  1208. Humanoid.WalkSpeed = Speed
  1209. elseif Rooted == true then
  1210. Disable_Jump = true
  1211. Humanoid.WalkSpeed = 0
  1212. end
  1213. if target ~= nil then
  1214. loop = loop + 1
  1215. if loop == 35 then
  1216. if target:FindFirstChild("HumanoidRootPart") then
  1217. CreateSound("161164363", target.HumanoidRootPart, 10, 1.1)
  1218. end
  1219. loop = 0
  1220. end
  1221. end
  1222. end
  1223. Character.Head.face.Texture = "rbxassetid://282463320"
  1224. Player = owner
  1225. Character = Player.Character
  1226. local txt = Instance.new("BillboardGui", Character)
  1227. txt.Adornee = Character.Head
  1228. txt.Name = "_status"
  1229. txt.Size = UDim2.new(2, 0, 1.2, 0)
  1230. txt.StudsOffset = Vector3.new(-9, 8, 0)
  1231. local text = Instance.new("TextLabel", txt)
  1232. text.Size = UDim2.new(10, 0, 7, 0)
  1233. text.FontSize = "Size10"
  1234. text.TextScaled = true
  1235. text.TextTransparency = 0
  1236. text.BackgroundTransparency = 1
  1237. text.TextTransparency = 0
  1238. text.TextStrokeTransparency = 0
  1239. text.Font = "Comic Sans MS"
  1240. text.TextStrokeColor3 = Color3.new(0,0,0)
  1241. text.Text = "Inserted T pose"
  1242. wait (2)
  1243. text.Text = "T pose"
  1244. text.Text = "T pose"
  1245. --//=================================\\
  1246. --\\=================================//
  1247.  
  1248.  
  1249.  
  1250.  
  1251. --//====================================================\\--
  1252. --|| END OF SCRIPT
  1253. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement