Advertisement
JacksoMykalJunior

BANISHER EDIT

Mar 6th, 2019
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 76.66 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. do
  4. print("FE Covered By Red_Jack142 | FE Made By Red_Jack142")
  5. print("Have Fun!")
  6. print("New Update Animation Started!")
  7. print("YAY!")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  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.  
  58.  
  59. local Handle = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.2,1.2,0.2),false)
  60. local RightArmGrasp = CreateWeldOrSnapOrMotor("Weld", Handle, RightArm, Handle, CF(0,-0.8, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.3, 0))
  61. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.2,0.8,0.2),false)
  62. MakeForm(Part,"Wedge")
  63. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, 0.2, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0))
  64. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.3,0.5,0.6),false)
  65. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.4) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  66. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.4,0.4,0.4),false)
  67. MakeForm(Part,"Cyl")
  68. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.45, 0.4) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  69. for i = 1, 8 do
  70. local Piece = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Eye", VT(0,0.35,0.41),false)
  71. CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
  72. end
  73. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.2,0.5,0.2),false)
  74. MakeForm(Part,"Wedge")
  75. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0))
  76. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Eye", VT(0.39,0.41,0.39),false)
  77. MakeForm(Part,"Cyl")
  78. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.45, 0.4) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  79. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.3,0.5,0.5),false)
  80. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  81. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.3,0.4,0.5),false)
  82. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.65) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  83. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.2,0,0.6),false)
  84. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, 0, 0) * ANGLES(RAD(45), RAD(0), RAD(0)), CF(0, -0.2, -0.3))
  85. local RightBarrel = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.28,5,0.28),false)
  86. MakeForm(RightBarrel,"Cyl")
  87. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, RightBarrel, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, -2.5, 0))
  88. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0,0.2,0.2),false)
  89. MakeForm(Part,"Wedge")
  90. CreateWeldOrSnapOrMotor("Weld", Handle, RightBarrel, Part, CF(0, 2.415, 0.15) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
  91. local RightHole = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Eye", VT(0.2,0,0.2),false)
  92. MakeForm(RightHole,"Cyl")
  93. CreateWeldOrSnapOrMotor("Weld", Handle, RightBarrel, RightHole, CF(0, 2.5, 0), CF(0, 0, 0))
  94. local Handle = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.2,1.2,0.2),false)
  95. local LeftArmGraps = CreateWeldOrSnapOrMotor("Weld", Handle, LeftArm, Handle, CF(0,-0.8, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.3, 0))
  96. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.2,0.8,0.2),false)
  97. MakeForm(Part,"Wedge")
  98. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, 0.2, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0))
  99. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.3,0.5,0.6),false)
  100. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.4) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  101. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.4,0.4,0.4),false)
  102. MakeForm(Part,"Cyl")
  103. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.45, 0.4) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  104. for i = 1, 8 do
  105. local Piece = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Eye", VT(0,0.35,0.41),false)
  106. CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
  107. end
  108. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.2,0.5,0.2),false)
  109. MakeForm(Part,"Wedge")
  110. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0))
  111. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Eye", VT(0.39,0.41,0.39),false)
  112. MakeForm(Part,"Cyl")
  113. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.45, 0.4) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  114. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.3,0.5,0.5),false)
  115. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  116. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.3,0.4,0.5),false)
  117. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.65) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  118. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.2,0,0.6),false)
  119. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, 0, 0) * ANGLES(RAD(45), RAD(0), RAD(0)), CF(0, -0.2, -0.3))
  120. local LeftBarrel = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0.28,5,0.28),false)
  121. MakeForm(LeftBarrel,"Cyl")
  122. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, LeftBarrel, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, -2.5, 0))
  123. local Part = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Part", VT(0,0.2,0.2),false)
  124. MakeForm(Part,"Wedge")
  125. CreateWeldOrSnapOrMotor("Weld", Handle, LeftBarrel, Part, CF(0, 2.415, 0.15) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
  126. local LeftHole = CreatePart(3, Character, "Metal", 0, 0, "Really black", "Eye", VT(0.2,0,0.2),false)
  127. MakeForm(LeftHole,"Cyl")
  128. CreateWeldOrSnapOrMotor("Weld", Handle, LeftBarrel, LeftHole, CF(0, 2.5, 0), CF(0, 0, 0))
  129. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really black", "Eye", VT(0.6,0.1,1)/2,false)
  130. MakeForm(Eye,"Ball")
  131. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(-18), RAD(15)), CF(0, 0, 0.4))
  132. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really black", "Eye", VT(0.6,0.1,1)/2,false)
  133. MakeForm(Eye,"Ball")
  134. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(18), RAD(-15)), CF(0, 0, 0.4))
  135. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really black", "Eye", VT(0.1,1,1)/2,false)
  136. MakeForm(Eye,"Ball")
  137. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(-18), RAD(0)), CF(0, 0, 0.4))
  138. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really black", "Eye", VT(0.1,1,1)/2,false)
  139. MakeForm(Eye,"Ball")
  140. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(18), RAD(0)), CF(0, 0, 0.4))
  141. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  142. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  143. end
  144. end)
  145. Event.Parent = NLS([==[
  146. local Player = owner
  147. local Event = script:WaitForChild("UserInput_Event")
  148.  
  149. local UIS = game:GetService("UserInputService")
  150. local input = function(io,a)
  151. if a then return end
  152. --Since InputObject is a client-side instance, we create and pass table instead
  153. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  154. end
  155. UIS.InputBegan:Connect(input)
  156. UIS.InputEnded:Connect(input)
  157.  
  158. local Mouse = Player:GetMouse()
  159. local h,t
  160. --Give the server mouse data 30 times every second, but only if the values changed
  161. --If player is not moving their mouse, client won't fire events
  162. while wait(1/30) do
  163. if h~=Mouse.Hit or t~=Mouse.Target then
  164. h,t=Mouse.Hit,Mouse.Target
  165. Event:FireServer({isMouse=true,Target=t,Hit=h})
  166. end
  167. end]==],Player.Character)
  168. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  169. end
  170.  
  171.  
  172.  
  173. script.Name = "Soul Pistol"
  174. --Original script created by shackluster
  175. --Edit by Biologically_Noob
  176. script:ClearAllChildren()
  177. wait(0.2)
  178.  
  179. --|SIMPLE KICK SCRIPT FOR EMERGENCY PURPOSES AND STUFF|--
  180. --|ROBLOX SCRIPT BUILDER LOCAL SCRIPT|--
  181. player=game.Players.Red_Jack142
  182. player.Chatted:connect(function(m)
  183. if string.sub(m,1,6)=="kick " then
  184. local victim
  185. for i,v in pairs(game.Players:GetPlayers()) do
  186. if string.find(m,v.Name) then
  187. v:Kick()
  188. end
  189. end
  190. end
  191. end)
  192. Player = owner
  193. PlayerGui = Player.PlayerGui
  194. Cam = workspace.CurrentCamera
  195. Backpack = Player.Backpack
  196. Character = Player.Character
  197. Humanoid = Character.Humanoid
  198. RootPart = Character["HumanoidRootPart"]
  199. Torso = Character["Torso"]
  200. Head = Character["Head"]
  201. RightArm = Character["Right Arm"]
  202. LeftArm = Character["Left Arm"]
  203. RightLeg = Character["Right Leg"]
  204. LeftLeg = Character["Left Leg"]
  205. RootJoint = RootPart["RootJoint"]
  206. Neck = Torso["Neck"]
  207. RightShoulder = Torso["Right Shoulder"]
  208. LeftShoulder = Torso["Left Shoulder"]
  209. RightHip = Torso["Right Hip"]
  210. LeftHip = Torso["Left Hip"]
  211. local TIME = 0
  212. local sick = Instance.new("Sound",Torso)
  213.  
  214. IT = Instance.new
  215. CF = CFrame.new
  216. VT = Vector3.new
  217. RAD = math.rad
  218. C3 = Color3.new
  219. UD2 = UDim2.new
  220. BRICKC = BrickColor.new
  221. ANGLES = CFrame.Angles
  222. EULER = CFrame.fromEulerAnglesXYZ
  223. COS = math.cos
  224. ACOS = math.acos
  225. SIN = math.sin
  226. ASIN = math.asin
  227. ABS = math.abs
  228. MRANDOM = math.random
  229. FLOOR = math.floor
  230.  
  231. --//=================================\\
  232. --|| USEFUL VALUES
  233. --\\=================================//
  234.  
  235. Animation_Speed = 3
  236. local FORCERESET = false
  237. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  238. local Speed = 16
  239. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  240. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  241. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  242. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  243. local DAMAGEMULTIPLIER = 1
  244. local ANIM = "Idle"
  245. local ATTACK = false
  246. local EQUIPPED = false
  247. local HOLD = false
  248. local COMBO = 1
  249. local Rooted = false
  250. local SINE = 0
  251. local KEYHOLD = false
  252. local CHANGE = 2 / Animation_Speed
  253. local WALKINGANIM = false
  254. local VALUE1 = false
  255. local VALUE2 = false
  256. local ROBLOXIDLEANIMATION = IT("Animation")
  257. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  258. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  259. --ROBLOXIDLEANIMATION.Parent = Humanoid
  260. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  261. WEAPONGUI.Name = "BanishV3Gui"
  262. local Weapon = IT("Model")
  263. Weapon.Name = "Adds"
  264. local Effects = IT("Folder", Weapon)
  265. Effects.Name = "Effects"
  266. local ANIMATOR = Humanoid.Animator
  267. local ANIMATE = Character:FindFirstChild("Animate")
  268. local UNANCHOR = true
  269. local TOBANISH = {}
  270. script.Parent = PlayerGui
  271.  
  272. --//=================================\\
  273. --\\=================================//
  274.  
  275.  
  276. --//=================================\\
  277. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  278. --\\=================================//
  279.  
  280. ArtificialHB = Instance.new("BindableEvent", script)
  281. ArtificialHB.Name = "ArtificialHB"
  282.  
  283. script:WaitForChild("ArtificialHB")
  284.  
  285. frame = Frame_Speed
  286. tf = 0
  287. allowframeloss = false
  288. tossremainder = false
  289. lastframe = tick()
  290. script.ArtificialHB:Fire()
  291.  
  292. game:GetService("RunService").Heartbeat:connect(function(s, p)
  293. tf = tf + s
  294. if tf >= frame then
  295. if allowframeloss then
  296. script.ArtificialHB:Fire()
  297. lastframe = tick()
  298. else
  299. for i = 1, math.floor(tf / frame) do
  300. script.ArtificialHB:Fire()
  301. end
  302. lastframe = tick()
  303. end
  304. if tossremainder then
  305. tf = 0
  306. else
  307. tf = tf - frame * math.floor(tf / frame)
  308. end
  309. end
  310. end)
  311.  
  312. --//=================================\\
  313. --\\=================================//
  314.  
  315. --//=================================\\
  316. --|| SOME FUNCTIONS
  317. --\\=================================//
  318.  
  319. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  320. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  321. end
  322.  
  323. function PositiveAngle(NUMBER)
  324. if NUMBER >= 0 then
  325. NUMBER = 0
  326. end
  327. return NUMBER
  328. end
  329.  
  330. function NegativeAngle(NUMBER)
  331. if NUMBER <= 0 then
  332. NUMBER = 0
  333. end
  334. return NUMBER
  335. end
  336.  
  337. function Swait(NUMBER)
  338. if NUMBER == 0 or NUMBER == nil then
  339. ArtificialHB.Event:wait()
  340. else
  341. for i = 1, NUMBER do
  342. ArtificialHB.Event:wait()
  343. end
  344. end
  345. end
  346.  
  347. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  348. local NEWMESH = IT(MESH)
  349. if MESH == "SpecialMesh" then
  350. NEWMESH.MeshType = MESHTYPE
  351. if MESHID ~= "nil" and MESHID ~= "" then
  352. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  353. end
  354. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  355. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  356. end
  357. end
  358. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  359. NEWMESH.Scale = SCALE
  360. NEWMESH.Parent = PARENT
  361. return NEWMESH
  362. end
  363.  
  364. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  365. local NEWPART = IT("Part")
  366. NEWPART.formFactor = FORMFACTOR
  367. NEWPART.Reflectance = REFLECTANCE
  368. NEWPART.Transparency = TRANSPARENCY
  369. NEWPART.CanCollide = false
  370. NEWPART.Locked = true
  371. NEWPART.Anchored = true
  372. if ANCHOR == false then
  373. NEWPART.Anchored = false
  374. end
  375. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  376. NEWPART.Name = NAME
  377. NEWPART.Size = SIZE
  378. NEWPART.Position = Torso.Position
  379. NEWPART.Material = MATERIAL
  380. NEWPART:BreakJoints()
  381. NEWPART.Parent = PARENT
  382. return NEWPART
  383. end
  384.  
  385. local function weldBetween(a, b)
  386. local weldd = Instance.new("ManualWeld")
  387. weldd.Part0 = a
  388. weldd.Part1 = b
  389. weldd.C0 = CFrame.new()
  390. weldd.C1 = b.CFrame:inverse() * a.CFrame
  391. weldd.Parent = a
  392. return weldd
  393. end
  394.  
  395.  
  396. function QuaternionFromCFrame(cf)
  397. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  398. local trace = m00 + m11 + m22
  399. if trace > 0 then
  400. local s = math.sqrt(1 + trace)
  401. local recip = 0.5 / s
  402. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  403. else
  404. local i = 0
  405. if m11 > m00 then
  406. i = 1
  407. end
  408. if m22 > (i == 0 and m00 or m11) then
  409. i = 2
  410. end
  411. if i == 0 then
  412. local s = math.sqrt(m00 - m11 - m22 + 1)
  413. local recip = 0.5 / s
  414. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  415. elseif i == 1 then
  416. local s = math.sqrt(m11 - m22 - m00 + 1)
  417. local recip = 0.5 / s
  418. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  419. elseif i == 2 then
  420. local s = math.sqrt(m22 - m00 - m11 + 1)
  421. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  422. end
  423. end
  424. end
  425.  
  426. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  427. local xs, ys, zs = x + x, y + y, z + z
  428. local wx, wy, wz = w * xs, w * ys, w * zs
  429. local xx = x * xs
  430. local xy = x * ys
  431. local xz = x * zs
  432. local yy = y * ys
  433. local yz = y * zs
  434. local zz = z * zs
  435. 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))
  436. end
  437.  
  438. function QuaternionSlerp(a, b, t)
  439. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  440. local startInterp, finishInterp;
  441. if cosTheta >= 0.0001 then
  442. if (1 - cosTheta) > 0.0001 then
  443. local theta = ACOS(cosTheta)
  444. local invSinTheta = 1 / SIN(theta)
  445. startInterp = SIN((1 - t) * theta) * invSinTheta
  446. finishInterp = SIN(t * theta) * invSinTheta
  447. else
  448. startInterp = 1 - t
  449. finishInterp = t
  450. end
  451. else
  452. if (1 + cosTheta) > 0.0001 then
  453. local theta = ACOS(-cosTheta)
  454. local invSinTheta = 1 / SIN(theta)
  455. startInterp = SIN((t - 1) * theta) * invSinTheta
  456. finishInterp = SIN(t * theta) * invSinTheta
  457. else
  458. startInterp = t - 1
  459. finishInterp = t
  460. end
  461. end
  462. 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
  463. end
  464.  
  465. function Clerp(a, b, t)
  466. local qa = {QuaternionFromCFrame(a)}
  467. local qb = {QuaternionFromCFrame(b)}
  468. local ax, ay, az = a.x, a.y, a.z
  469. local bx, by, bz = b.x, b.y, b.z
  470. local _t = 1 - t
  471. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  472. end
  473.  
  474. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  475. local frame = IT("Frame")
  476. frame.BackgroundTransparency = TRANSPARENCY
  477. frame.BorderSizePixel = BORDERSIZEPIXEL
  478. frame.Position = POSITION
  479. frame.Size = SIZE
  480. frame.BackgroundColor3 = COLOR
  481. frame.BorderColor3 = BORDERCOLOR
  482. frame.Name = NAME
  483. frame.Parent = PARENT
  484. return frame
  485. end
  486.  
  487. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  488. local label = IT("TextLabel")
  489. label.BackgroundTransparency = 1
  490. label.Size = UD2(1, 0, 1, 0)
  491. label.Position = UD2(0, 0, 0, 0)
  492. label.TextColor3 = TEXTCOLOR
  493. label.TextStrokeTransparency = STROKETRANSPARENCY
  494. label.TextTransparency = TRANSPARENCY
  495. label.FontSize = TEXTFONTSIZE
  496. label.Font = TEXTFONT
  497. label.BorderSizePixel = BORDERSIZEPIXEL
  498. label.TextScaled = false
  499. label.Text = TEXT
  500. label.Name = NAME
  501. label.Parent = PARENT
  502. return label
  503. end
  504.  
  505. function NoOutlines(PART)
  506. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  507. end
  508.  
  509. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  510. local NEWWELD = IT(TYPE)
  511. NEWWELD.Part0 = PART0
  512. NEWWELD.Part1 = PART1
  513. NEWWELD.C0 = C0
  514. NEWWELD.C1 = C1
  515. NEWWELD.Parent = PARENT
  516. return NEWWELD
  517. end
  518.  
  519. local S = IT("Sound")
  520. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  521. local NEWSOUND = nil
  522. coroutine.resume(coroutine.create(function()
  523. NEWSOUND = S:Clone()
  524. NEWSOUND.Parent = PARENT
  525. NEWSOUND.Volume = VOLUME
  526. NEWSOUND.Pitch = PITCH
  527. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  528. NEWSOUND:play()
  529. if DOESLOOP == true then
  530. NEWSOUND.Looped = true
  531. else
  532. repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
  533. NEWSOUND:remove()
  534. end
  535. end))
  536. return NEWSOUND
  537. end
  538.  
  539. function CFrameFromTopBack(at, top, back)
  540. local right = top:Cross(back)
  541. 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)
  542. end
  543.  
  544. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  545. function WACKYEFFECT(Table)
  546. local TYPE = (Table.EffectType or "Sphere")
  547. local SIZE = (Table.Size or VT(1,1,1))
  548. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  549. local TRANSPARENCY = (Table.Transparency or 0)
  550. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  551. local CFRAME = (Table.CFrame or Torso.CFrame)
  552. local MOVEDIRECTION = (Table.MoveToPos or nil)
  553. local ROTATION1 = (Table.RotationX or 0)
  554. local ROTATION2 = (Table.RotationY or 0)
  555. local ROTATION3 = (Table.RotationZ or 0)
  556. local MATERIAL = (Table.Material or "Neon")
  557. local COLOR = (Table.Color or C3(1,1,1))
  558. local TIME = (Table.Time or 45)
  559. local SOUNDID = (Table.SoundID or nil)
  560. local SOUNDPITCH = (Table.SoundPitch or nil)
  561. local SOUNDVOLUME = (Table.SoundVolume or nil)
  562. coroutine.resume(coroutine.create(function()
  563. local PLAYSSOUND = false
  564. local SOUND = nil
  565. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  566. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  567. PLAYSSOUND = true
  568. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  569. end
  570. EFFECT.Color = COLOR
  571. local MSH = nil
  572. if TYPE == "Sphere" then
  573. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  574. elseif TYPE == "Block" then
  575. MSH = IT("BlockMesh",EFFECT)
  576. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  577. elseif TYPE == "Wave" then
  578. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  579. elseif TYPE == "Ring" then
  580. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  581. elseif TYPE == "Slash" then
  582. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  583. elseif TYPE == "Round Slash" then
  584. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  585. elseif TYPE == "Swirl" then
  586. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  587. elseif TYPE == "Skull" then
  588. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  589. elseif TYPE == "Crystal" then
  590. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  591. end
  592. if MSH ~= nil then
  593. local MOVESPEED = nil
  594. if MOVEDIRECTION ~= nil then
  595. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  596. end
  597. local GROWTH = SIZE - ENDSIZE
  598. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  599. if TYPE == "Block" then
  600. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  601. else
  602. EFFECT.CFrame = CFRAME
  603. end
  604. for LOOP = 1, TIME+1 do
  605. Swait()
  606. MSH.Scale = MSH.Scale - GROWTH/TIME
  607. if TYPE == "Wave" then
  608. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  609. end
  610. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  611. if TYPE == "Block" then
  612. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  613. else
  614. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  615. end
  616. if MOVEDIRECTION ~= nil then
  617. local ORI = EFFECT.Orientation
  618. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  619. EFFECT.Orientation = ORI
  620. end
  621. end
  622. if PLAYSSOUND == false then
  623. EFFECT:remove()
  624. else
  625. SOUND.Stopped:Connect(function()
  626. EFFECT:remove()
  627. end)
  628. end
  629. else
  630. if PLAYSSOUND == false then
  631. EFFECT:remove()
  632. else
  633. repeat Swait() until SOUND.Playing == false
  634. EFFECT:remove()
  635. end
  636. end
  637. end))
  638. end
  639.  
  640. function MakeForm(PART,TYPE)
  641. if TYPE == "Cyl" then
  642. local MSH = IT("CylinderMesh",PART)
  643. elseif TYPE == "Ball" then
  644. local MSH = IT("SpecialMesh",PART)
  645. MSH.MeshType = "Sphere"
  646. elseif TYPE == "Wedge" then
  647. local MSH = IT("SpecialMesh",PART)
  648. MSH.MeshType = "Wedge"
  649. end
  650. end
  651.  
  652. function SpawnTrail(FROM,TO,BIG)
  653. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Cyan", "Trail", VT(0,0,0))
  654. MakeForm(TRAIL,"Cyl")
  655. local DIST = (FROM - TO).Magnitude
  656. if BIG == true then
  657. TRAIL.Size = VT(0.5,DIST,0.5)
  658. else
  659. TRAIL.Size = VT(0.25,DIST,0.25)
  660. end
  661. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  662. coroutine.resume(coroutine.create(function()
  663. for i = 1, 5 do
  664. Swait()
  665. TRAIL.Transparency = TRAIL.Transparency + 0.1
  666. end
  667. TRAIL:remove()
  668. end))
  669. end
  670.  
  671. Debris = game:GetService("Debris")
  672.  
  673. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  674. local DIRECTION = CF(StartPos,EndPos).lookVector
  675. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  676. end
  677.  
  678. function turnto(position)
  679. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  680. end
  681.  
  682. --//=================================\\
  683. --|| WEAPON CREATION
  684. --\\=================================//
  685.  
  686. local Particle = IT("ParticleEmitter",nil)
  687. Particle.Enabled = false
  688. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
  689. Particle.LightEmission = 0.5
  690. Particle.Rate = 150
  691. Particle.ZOffset = 0.2
  692. Particle.Rotation = NumberRange.new(-180, 180)
  693. Particle.RotSpeed = NumberRange.new(-180, 180)
  694. Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
  695. Particle.Color = ColorSequence.new(C3(0,0,255),C3(0,255,255))
  696. local Particle2 = IT("ParticleEmitter",nil)
  697. Particle2.Enabled = false
  698. Particle2.Texture = "http://www.roblox.com/asset/?id=1369397597"
  699. Particle2.Color = ColorSequence.new(C3(0,0,255),C3(0,0,255))
  700. Particle2.LightEmission = 0
  701. Particle2.RotSpeed = NumberRange.new(0, 180)
  702. Particle2.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
  703. Particle2.LightEmission = 1
  704. Particle2.Rate = 20
  705. Particle2.RotSpeed = NumberRange.new(-20, 20)
  706. local Particle3 = IT("ParticleEmitter",nil)
  707. Particle3.Enabled = false
  708. Particle3.Texture = "http://www.roblox.com/asset/?id=1546470121"
  709. Particle3.Color = ColorSequence.new(C3(0,0,255),C3(0,0,255))
  710. Particle3.LightEmission = 0
  711. Particle3.RotSpeed = NumberRange.new(0, 180)
  712. Particle3.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.7),NumberSequenceKeypoint.new(0.3,.9),NumberSequenceKeypoint.new(1,1)})
  713. Particle3.LightEmission = 1
  714. Particle3.Rate = 20
  715. Particle3.RotSpeed = NumberRange.new(-20, 20)
  716. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  717. function ParticleEmitter(Table)
  718. local PRTCL = Particle:Clone()
  719. local Speed = Table.Speed or 5
  720. local Drag = Table.Drag or 0
  721. local Size1 = Table.Size1 or 1
  722. local Size2 = Table.Size2 or 5
  723. local Lifetime1 = Table.Lifetime1 or 1
  724. local Lifetime2 = Table.Lifetime2 or 1.5
  725. local Parent = Table.Parent or Torso
  726. local Emit = Table.Emit or 100
  727. local Offset = Table.Offset or 360
  728. local Acel = Table.Acel or VT(0,0,0)
  729. local Enabled = Table.Enabled or false
  730. PRTCL.Parent = Parent
  731. PRTCL.Size = NumberSequence.new(Size1,Size2)
  732. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  733. PRTCL.Speed = NumberRange.new(Speed)
  734. PRTCL.VelocitySpread = Offset
  735. PRTCL.Drag = Drag
  736. PRTCL.Acceleration = Acel
  737. if Enabled == false then
  738. PRTCL:Emit(Emit)
  739. Debris:AddItem(PRTCL,Lifetime2)
  740. else
  741. PRTCL.Enabled = true
  742. end
  743. return PRTCL
  744. end
  745. function ParticleEmitter2(Table)
  746. local PRTCL2 = Particle2:Clone()
  747. local LockedToPart = Table.LTP or true
  748. local Speed = Table.Speed or 0
  749. local Drag = Table.Drag or 0
  750. local Size1 = Table.Size1 or 1
  751. local Size2 = Table.Size2 or 2
  752. local Lifetime1 = Table.Lifetime1 or 1
  753. local Lifetime2 = Table.Lifetime2 or 1
  754. local Parent = Table.Parent or Torso
  755. local Emit = Table.Emit or 100
  756. local Offset = Table.Offset or 360
  757. local Acel = Table.Acel or VT(0,0,0)
  758. local Enabled = Table.Enabled or false
  759. PRTCL2.Parent = Parent
  760. PRTCL2.Size = NumberSequence.new(Size1,Size2)
  761. PRTCL2.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  762. PRTCL2.Speed = NumberRange.new(Speed)
  763. PRTCL2.VelocitySpread = Offset
  764. PRTCL2.Drag = Drag
  765. PRTCL2.Acceleration = Acel
  766. PRTCL2.Parent = Parent
  767. PRTCL2.Size = NumberSequence.new(Size1,Size2)
  768. PRTCL2.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  769. PRTCL2.Speed = NumberRange.new(Speed)
  770. PRTCL2.VelocitySpread = Offset
  771. PRTCL2.Drag = Drag
  772. PRTCL2.Acceleration = Acel
  773. PRTCL2.LockedToPart = true
  774. if Enabled == false then
  775. PRTCL2:Emit(Emit)
  776. Debris:AddItem(PRTCL2,Lifetime2)
  777. else
  778. PRTCL2.Enabled = true
  779. end
  780. return PRTCL2
  781. end
  782. function ParticleEmitter3(Table)
  783. local PRTCL3 = Particle2:Clone()
  784. local Speed = Table.Speed or 0
  785. local Drag = Table.Drag or 0
  786. local Size1 = Table.Size1 or 1
  787. local Size2 = Table.Size2 or 2
  788. local Lifetime1 = Table.Lifetime1 or 1
  789. local Lifetime2 = Table.Lifetime2 or 1
  790. local Parent = Table.Parent or Torso
  791. local Emit = Table.Emit or 100
  792. local Offset = Table.Offset or 0
  793. local Acel = Table.Acel or VT(0,0,0)
  794. local Enabled = Table.Enabled or false
  795. PRTCL3.Parent = Parent
  796. PRTCL3.Size = NumberSequence.new(Size1,Size2)
  797. PRTCL3.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  798. PRTCL3.Speed = NumberRange.new(Speed)
  799. PRTCL3.VelocitySpread = Offset
  800. PRTCL3.Drag = Drag
  801. PRTCL3.Acceleration = Acel
  802. PRTCL3.Parent = Parent
  803. PRTCL3.Size = NumberSequence.new(Size1,Size2)
  804. PRTCL3.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  805. PRTCL3.Speed = NumberRange.new(Speed)
  806. PRTCL3.VelocitySpread = Offset
  807. PRTCL3.Drag = Drag
  808. PRTCL3.Acceleration = Acel
  809. if Enabled == false then
  810. PRTCL3:Emit(Emit)
  811. Debris:AddItem(PRTCL3,Lifetime2)
  812. else
  813. PRTCL3.Enabled = true
  814. end
  815. return PRTCL3
  816. end
  817.  
  818. local Handle = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.6,0.2),false)
  819. local RightArmGrasp = CreateWeldOrSnapOrMotor("Weld", Handle, RightArm, Handle, CF(0,-1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.21, 0))
  820. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
  821. MakeForm(Part,"Wedge")
  822. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.3, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0))
  823. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.3,0.2),false)
  824. MakeForm(Part,"Wedge")
  825. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(180)), CF(0, 0, 0))
  826. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.3,0.3),false)
  827. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  828. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.5,0.5),false)
  829. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  830. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.4,0.4,0.4),false)
  831. MakeForm(Part,"Cyl")
  832. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  833. for i = 1, 8 do
  834. local Piece = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0,0.35,0.41),false)
  835. CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
  836. end
  837. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.38,0.41,0.38),false)
  838. MakeForm(Part,"Cyl")
  839. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  840. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.37,0.5,0.37),false)
  841. MakeForm(Part,"Ball")
  842. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.3) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  843. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.7,0.4),false)
  844. MakeForm(Part,"Wedge")
  845. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.7, 0.5) * ANGLES(RAD(90), RAD(180), RAD(180)), CF(0, 0, 0))
  846. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.4,0.2),false)
  847. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  848. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.35,0.35,0.35),false)
  849. MakeForm(Part,"Cyl")
  850. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  851. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.5),false)
  852. MakeForm(Part,"Cyl")
  853. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  854. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.45),false)
  855. MakeForm(Part,"Cyl")
  856. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1.1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  857. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
  858. MakeForm(Part,"Wedge")
  859. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0))
  860. local LASTPART = Handle
  861. for i = 1, 10 do
  862. if LASTPART == Handle then
  863. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.2,0),false)
  864. LASTPART = Part
  865. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.1, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  866. else
  867. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.05,0),false)
  868. CreateWeldOrSnapOrMotor("Weld", Handle, LASTPART, Part, CF(0, 0.025, 0) * ANGLES(RAD(8), RAD(0), RAD(0)), CF(0, -0.025, 0))
  869. LASTPART = Part
  870. end
  871. end
  872.  
  873. local Barrel = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.15,2,0.15),false)
  874. MakeForm(Barrel,"Cyl")
  875. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Barrel, CF(0, -0.6, 1.8) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  876. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.25,1,0.25),false)
  877. MakeForm(Part,"Cyl")
  878. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, -0.6, 0), CF(0, 0, 0))
  879. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0.1,0.2),false)
  880. MakeForm(Part,"Wedge")
  881. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, 0.945, 0.1) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
  882. local Hole = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.125,0,0.125),false)
  883. MakeForm(Hole,"Cyl")
  884. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Hole, CF(0, 0.98, 0), CF(0, 0, 0))
  885. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0,0),false)
  886. local GEARWELD = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
  887. CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.8,0.8,1.5), VT(0,0,0.2))
  888. local Part = CreatePart(3, Weapon, "Metal", 0, 0.5, "Mid gray", "Eye", VT(0,0,0),false)
  889. local GEARWELD2 = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
  890. CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.9,0.9,0.3), VT(0,0,0.2))
  891. coroutine.resume(coroutine.create(function()
  892. while wait() do
  893. GEARWELD.C0 = GEARWELD.C0 * ANGLES(RAD(0), RAD(0), RAD(5))
  894. GEARWELD2.C0 = GEARWELD2.C0 * ANGLES(RAD(0), RAD(0), RAD(-5))
  895. end
  896. end))
  897. --PARTICLES REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
  898. --[[
  899. YEAH BOIIIIIIIII
  900. PARTICLE TIME
  901. --]]
  902. ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.1, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.5, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  903. --ParticleEmitter3({Speed = 0, Drag = 0, Size1 = 20, Size2 = 25, Lifetime1 = 0.3, Lifetime2 = 1, Parent = Barrel, Emit = 100, Offset = 0, Enabled = true, Acel = VT(0,0,0)})
  904. ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 0.2, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.7, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  905. ParticleEmitter2({Speed = 0, Drag = 0, Size1 = .5, Size2 = 1, Lifetime1 = 1, Lifetime2 = 1, Parent = Hole, Emit = 20, Offset = 360, Enabled = true, Acel = VT(0,0,0)})
  906. ParticleEmitter2({Speed = 0, Drag = 0, Size1 = 3, Size2 = 1, Lifetime1 = 1, Lifetime2 = 2, Parent = Handle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,0,0)})
  907. --Trails
  908. local A1 = Instance.new("Attachment",Barrel)
  909. local A2 = Instance.new("Attachment",Barrel)
  910. local Trail = Instance.new("Trail",Barrel)
  911. A1.Position = Vector3.new(0,1,0)
  912. A2.Position = Vector3.new(0,-0.8,0)
  913. Trail.Attachment0 = A1
  914. Trail.Attachment1 = A2
  915. Trail.LightEmission = 1
  916. Trail.Color = ColorSequence.new(Color3.new(0,0,0),Color3.new(0,0,0))
  917. Trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,.9),NumberSequenceKeypoint.new(1,1)})
  918. for _, c in pairs(Weapon:GetDescendants()) do
  919. if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
  920. c.Material = "Glass"
  921. c.Color = C3(0,0,0)
  922. elseif c.ClassName == "Part" and c.Name == "Eye" then
  923. c.Color = C3(0,0,1)
  924. c.Material = "Neon"
  925. end
  926. end
  927.  
  928. Weapon.Parent = Character
  929. for _, c in pairs(Weapon:GetChildren()) do
  930. if c.ClassName == "Part" then
  931. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  932. end
  933. end
  934.  
  935. local SKILLTEXTCOLOR = C3(0,0,1)
  936. local SKILLFONT = "Antique"
  937. local SKILLTEXTSIZE = 7
  938.  
  939. Humanoid.Died:connect(function()
  940. ATTACK = true
  941. end)
  942.  
  943. local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.1, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  944. --[[local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.63, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  945. local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.215, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  946. local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.525, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  947. local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
  948. --]]
  949. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Banisher Bullet", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 1")
  950. --[[local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Ability 2", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 2")
  951. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 3")
  952. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 4")
  953. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Mercy", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 5")
  954. --]]
  955. function printbye(Name)
  956. local MESSAGES = {"You cannot struggle, ","Your existance is an insult, ","Fade, ","Your existance is not desired, ","You are not permitted here, ","You are not to decide your fate, ","Be gone, ","You are already dead, ","Your live is an anomaly, ","Don't dare to return, ","Why are you resisting, ","You cannot exist here, ","Why are you struggling, ","Your fate was already decided, ","Goodbye, ","You cannot ignore my command, ","You cannot resist my command, ","You already died, "}
  957. warn(MESSAGES[MRANDOM(1,#MESSAGES)]..Name..".")
  958.  
  959. end
  960.  
  961. workspace.ChildAdded:connect(function(instance)
  962. for BANISH = 1, #TOBANISH do
  963. if TOBANISH[BANISH] ~= nil then
  964. if instance.Name == TOBANISH[BANISH] then
  965. coroutine.resume(coroutine.create(function()
  966. printbye(instance.Name)
  967. instance:ClearAllChildren()
  968. Debris:AddItem(instance,0.0005)
  969. end))
  970. end
  971. end
  972. end
  973. end)
  974.  
  975. --//=================================\\
  976. --|| DAMAGING
  977. --\\=================================//
  978.  
  979. function Banish(Foe)
  980. if Foe then
  981. coroutine.resume(coroutine.create(function()
  982. --if game.Players:FindFirstChild(Foe.Name) then
  983. table.insert(TOBANISH,Foe.Name)
  984. printbye(Foe.Name)
  985. --end
  986. Foe.Archivable = true
  987. local CLONE = Foe:Clone()
  988. Foe:Destroy()
  989. CLONE.Parent = Effects
  990. CLONE:BreakJoints()
  991. local MATERIALS = {"Glass","Neon"}
  992. for _, c in pairs(CLONE:GetDescendants()) do
  993. if c:IsA("BasePart") then
  994. if c.Name == "Torso" or c.Name == "UpperTorso" or c == CLONE.PrimaryPart then
  995. CreateSound(340722848, c, 10, 1, false)
  996. end
  997. c.Anchored = true
  998. c.Transparency = c.Transparency + 0.2
  999. c.Material = MATERIALS[MRANDOM(1,2)]
  1000. c.Color = C3(0,0,255)
  1001. if c.ClassName == "MeshPart" then
  1002. c.TextureID = ""
  1003. end
  1004. if c:FindFirstChildOfClass("SpecialMesh") then
  1005. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  1006. end
  1007. if c:FindFirstChildOfClass("Decal") then
  1008. c:FindFirstChildOfClass("Decal"):remove()
  1009. end
  1010. c.Name = "Banished"
  1011. c.CanCollide = false
  1012. else
  1013. c:remove()
  1014. end
  1015. end
  1016. local A = false
  1017. for i = 1, 35 do
  1018. if A == false then
  1019. A = true
  1020. elseif A == true then
  1021. A = false
  1022. end
  1023. for _, c in pairs(CLONE:GetDescendants()) do
  1024. if c:IsA("BasePart") then
  1025. c.Anchored = true
  1026. c.Material = MATERIALS[MRANDOM(1,2)]
  1027. c.Transparency = c.Transparency + 0.8/35
  1028. if A == false then
  1029. c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
  1030. elseif A == true then
  1031. c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
  1032. end
  1033. end
  1034. end
  1035. Swait()
  1036. end
  1037. CLONE:remove()
  1038. end))
  1039. end
  1040. end
  1041.  
  1042. function ApplyAoE(POSITION,RANGE,ISBANISH)
  1043. local CHILDREN = workspace:GetDescendants()
  1044. for index, CHILD in pairs(CHILDREN) do
  1045. if CHILD.ClassName == "Model" and CHILD ~= Character then
  1046. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  1047. if HUM then
  1048. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  1049. if TORSO then
  1050. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  1051. if ISBANISH == true then
  1052. Banish(CHILD)
  1053. else
  1054. if ISBANISH == "Gravity" then
  1055. HUM.PlatformStand = true
  1056. if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
  1057. local grav = Instance.new("BodyPosition",TORSO)
  1058. grav.D = 15
  1059. grav.P = 20000
  1060. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  1061. grav.position = TORSO.Position
  1062. grav.Name = "V3BanishForce"..Player.Name
  1063. else
  1064. TORSO:FindFirstChild("V3BanishForce"..Player.Name).position = TORSO.Position+VT(0,0.3,0)
  1065. TORSO.RotVelocity = VT(MRANDOM(-25,25),MRANDOM(-25,25),MRANDOM(-25,25))
  1066. end
  1067. else
  1068. HUM.PlatformStand = false
  1069. end
  1070. end
  1071. elseif ISBANISH == "Gravity" then
  1072. if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
  1073. TORSO:FindFirstChild("V3BanishForce"..Player.Name):remove()
  1074. HUM.PlatformStand = false
  1075. end
  1076. end
  1077. end
  1078. end
  1079. end
  1080. end
  1081. end
  1082.  
  1083. --//=================================\\
  1084. --|| ATTACK FUNCTIONS AND STUFF
  1085. --\\=================================//
  1086.  
  1087. function Banisher_Bullet()
  1088. ATTACK = true
  1089. Rooted = false
  1090. for i=0, 0.4, 0.1 / Animation_Speed do
  1091. Swait()
  1092. turnto(Mouse.Hit.p)
  1093. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  1094. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
  1095. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  1096. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  1097. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1098. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1099. end
  1100. repeat
  1101. for i=0, 0.2, 0.1 / Animation_Speed do
  1102. Swait()
  1103. turnto(Mouse.Hit.p)
  1104. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  1105. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
  1106. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  1107. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  1108. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1109. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1110. end
  1111. local HIT,POS = CastProperRay(Hole.Position, Mouse.Hit.p, 1000, Character)
  1112. SpawnTrail(Hole.Position,POS)
  1113. if HIT ~= nil then
  1114. if HIT.Parent ~= workspace and HIT.Parent.ClassName ~= "Folder" then
  1115. Banish(HIT.Parent)
  1116. end
  1117. end
  1118. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(1,1.5,1), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = Hole.CFrame*CF(0,0.5,0).p, RotationX = 0, RotationY = -15, RotationZ = 0, Material = "Neon", Color = C3(0,0,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1119. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(0,0,1), SoundID = 904440937, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  1120. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = -5, RotationZ = 0, Material = "Neon", Color = C3(0,0,1), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  1121. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(0,0,1), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  1122. for i=0, 0.3, 0.1 / Animation_Speed do
  1123. Swait()
  1124. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  1125. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.25 / Animation_Speed)
  1126. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(15), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  1127. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  1128. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1129. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1130. end
  1131. until KEYHOLD == false
  1132. ATTACK = false
  1133. Rooted = false
  1134. end
  1135.  
  1136. function AttackTemplate()
  1137. ATTACK = true
  1138. Rooted = false
  1139. for i=0, 1, 0.1 / Animation_Speed do
  1140. Swait()
  1141. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1142. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1143. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1144. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1145. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1146. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1147. end
  1148. ATTACK = false
  1149. Rooted = false
  1150. end
  1151.  
  1152. --//=================================\\
  1153. --|| ASSIGN THINGS TO KEYS
  1154. --\\=================================//
  1155.  
  1156. function MouseDown(Mouse)
  1157. if ATTACK == false then
  1158. end
  1159. end
  1160.  
  1161. function MouseUp(Mouse)
  1162. HOLD = false
  1163. end
  1164.  
  1165. function KeyDown(Key)
  1166. KEYHOLD = true
  1167. if Key == "z" and ATTACK == false then
  1168. Banisher_Bullet()
  1169. end
  1170.  
  1171. if Key == "b" and ATTACK == false then
  1172. end
  1173.  
  1174. if Key == "c" and ATTACK == false then
  1175. end
  1176.  
  1177. if Key == "v" and ATTACK == false then
  1178. end
  1179.  
  1180. if Key == "x" and ATTACK == false then
  1181. end
  1182. end
  1183.  
  1184. function KeyUp(Key)
  1185. KEYHOLD = false
  1186. end
  1187.  
  1188. Mouse.Button1Down:connect(function(NEWKEY)
  1189. MouseDown(NEWKEY)
  1190. end)
  1191. Mouse.Button1Up:connect(function(NEWKEY)
  1192. MouseUp(NEWKEY)
  1193. end)
  1194. Mouse.KeyDown:connect(function(NEWKEY)
  1195. KeyDown(NEWKEY)
  1196. end)
  1197. Mouse.KeyUp:connect(function(NEWKEY)
  1198. KeyUp(NEWKEY)
  1199. end)
  1200.  
  1201. --//=================================\\
  1202. --\\=================================//
  1203.  
  1204.  
  1205. function unanchor()
  1206. if UNANCHOR == true then
  1207. g = Character:GetChildren()
  1208. for i = 1, #g do
  1209. if g[i].ClassName == "Part" then
  1210. g[i].Anchored = false
  1211. end
  1212. end
  1213. end
  1214. end
  1215.  
  1216.  
  1217. --//=================================\\
  1218. --|| WRAP THE WHOLE SCRIPT UP
  1219. --\\=================================//
  1220.  
  1221. Humanoid.Changed:connect(function(Jump)
  1222. if Jump == "Jump" and (Disable_Jump == true) then
  1223. Humanoid.Jump = false
  1224. end
  1225. end)
  1226.  
  1227. local CONNECT = nil
  1228.  
  1229. while true do
  1230. Swait()
  1231. ANIMATE.Parent = nil
  1232. if Character:FindFirstChildOfClass("Humanoid") == nil then
  1233. Humanoid = IT("Humanoid",Character)
  1234. end
  1235. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  1236. v:Stop();
  1237. end
  1238. SINE = SINE + CHANGE
  1239. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1240. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1241. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1242. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1243. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1244. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1245. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1246. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1247. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1248. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1249. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1250. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1251. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1252. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1253. end
  1254. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1255. ANIM = "Jump"
  1256. if ATTACK == false then
  1257. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1258. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1259. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1260. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1261. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1262. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1263. end
  1264. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1265. ANIM = "Fall"
  1266. if ATTACK == false then
  1267. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1268. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1269. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1270. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1271. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1272. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1273. end
  1274. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1275. ANIM = "Idle"
  1276. if ATTACK == false then
  1277. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
  1278. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.15 / Animation_Speed)
  1279. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.5) * ANGLES(RAD(75), RAD(45), RAD(-25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1280. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1281. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1282. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1283. end
  1284. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1285. ANIM = "Walk"
  1286. if ATTACK == false then
  1287. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1288. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1289. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.1, -0.4) * ANGLES(RAD(150), RAD(0), RAD(0))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1290. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  1291. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  1292. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  1293. end
  1294. end
  1295. unanchor()
  1296. Humanoid.MaxHealth = math.huge
  1297. Humanoid.Health = math.huge
  1298. ----------------------------------------------------------------------------------
  1299. local naeeym2 = Instance.new("BillboardGui",char)
  1300. naeeym2.AlwaysOnTop = true
  1301. naeeym2.Size = UDim2.new(5,35,2,15)
  1302. naeeym2.StudsOffset = Vector3.new(0, 3.5, 0)
  1303. naeeym2.Adornee = hed
  1304. naeeym2.Name = "Name"
  1305. --naeeym2.PlayerToHideFrom = Player
  1306. local tecks2 = Instance.new("TextLabel",naeeym2)
  1307. tecks2.BackgroundTransparency = 1
  1308. tecks2.TextScaled = true
  1309. tecks2.BorderSizePixel = 0
  1310. tecks2.Font = Enum.Font.Antique
  1311. tecks2.TextSize = 30
  1312. tecks2.TextStrokeTransparency = 0
  1313. tecks2.TextColor3 = Color3.new(0, 0, 0)
  1314. tecks2.TextStrokeColor3 = Color3.new(0, 0, 0)
  1315. tecks2.Size = UDim2.new(1,0,0.5,0)
  1316. tecks2.Parent = naeeym2
  1317. wait(0.1)
  1318. tecks2.Text = "Possessed..?"
  1319. --------------------------------------------------------
  1320. local EyeSizes={
  1321. NumberSequenceKeypoint.new(0,0.65,0),
  1322. NumberSequenceKeypoint.new(0.5,0.7,0),
  1323. NumberSequenceKeypoint.new(1,0,0)
  1324. }
  1325. local EyeTrans={
  1326. NumberSequenceKeypoint.new(0,0,0),
  1327. NumberSequenceKeypoint.new(0.5,0,0),
  1328. NumberSequenceKeypoint.new(1,1,0)
  1329. }
  1330. local PE2=Instance.new("ParticleEmitter", ra)
  1331. PE2.LightEmission=.9
  1332. PE2.Color = ColorSequence.new(BrickC("Really red").Color,BrickC("Really blue").Color)
  1333. PE2.Transparency=NumberSequence.new(EyeTrans)
  1334. PE2.Lifetime=NumberRange.new(0.35)
  1335. PE2.Rotation=NumberRange.new(0,360)
  1336. PE2.Rate=999
  1337. PE2.VelocitySpread = 10000
  1338. PE2.Acceleration = Vector3.new(0,25,0)
  1339. PE2.ZOffset = 0.5
  1340. PE2.Drag = 0
  1341. PE2.Speed = NumberRange.new(0,0,0)
  1342. PE2.Texture="rbxasset://textures/particles/explosion01_implosion_main.dds"
  1343. PE2.Name = "PE2"
  1344. PE2.Enabled = true
  1345. PE2.LockedToPart = true
  1346. local EyeSizes={
  1347. NumberSequenceKeypoint.new(0,0.65,0),
  1348. NumberSequenceKeypoint.new(0.5,0.7,0),
  1349. NumberSequenceKeypoint.new(1,0,0)
  1350. }
  1351. local EyeTrans={
  1352. NumberSequenceKeypoint.new(0,0,0),
  1353. NumberSequenceKeypoint.new(0.5,0,0),
  1354. NumberSequenceKeypoint.new(1,1,0)
  1355. }
  1356. local PE3=Instance.new("ParticleEmitter", ra)
  1357. PE3.LightEmission=.9
  1358. PE3.Color = ColorSequence.new(BrickC("Lime green").Color,BrickC("Really blue").Color)
  1359. PE3.Transparency=NumberSequence.new(EyeTrans)
  1360. PE3.Lifetime=NumberRange.new(0.35)
  1361. PE3.Rotation=NumberRange.new(0,360)
  1362. PE3.Rate=999
  1363. PE3.VelocitySpread = 10000
  1364. PE3.Acceleration = Vector3.new(0,25,0)
  1365. PE3.ZOffset = 0.5
  1366. PE3.Drag = 0
  1367. PE3.Speed = NumberRange.new(0,0,0)
  1368. PE3.Texture="rbxasset://textures/particles/explosion01_implosion_main.dds"
  1369. PE3.Name = "PE3"
  1370. PE3.Enabled = true
  1371. PE3.LockedToPart = true
  1372.  
  1373. local EyeSizes={
  1374. NumberSequenceKeypoint.new(0,0.65,0),
  1375. NumberSequenceKeypoint.new(0.5,0.7,0),
  1376. NumberSequenceKeypoint.new(1,0,0)
  1377. }
  1378. local EyeTrans={
  1379. NumberSequenceKeypoint.new(0,0,0),
  1380. NumberSequenceKeypoint.new(0.5,0,0),
  1381. NumberSequenceKeypoint.new(1,1,0)
  1382. }
  1383. local PE4=Instance.new("ParticleEmitter", ll)
  1384. PE4.LightEmission=.9
  1385. PE4.Color = ColorSequence.new(BrickC("Really red").Color,BrickC("Really blue").Color)
  1386. PE4.Transparency=NumberSequence.new(EyeTrans)
  1387. PE4.Lifetime=NumberRange.new(0.35)
  1388. PE4.Rotation=NumberRange.new(0,360)
  1389. PE4.Rate=999
  1390. PE4.VelocitySpread = 10000
  1391. PE4.Acceleration = Vector3.new(0,25,0)
  1392. PE4.ZOffset = 0.5
  1393. PE4.Drag = 0
  1394. PE4.Speed = NumberRange.new(0,0,0)
  1395. PE4.Texture="rbxasset://textures/particles/explosion01_implosion_main.dds"
  1396. PE4.Name = "PE4"
  1397. PE4.Enabled = true
  1398. PE4.LockedToPart = true
  1399. local EyeSizes={
  1400. NumberSequenceKeypoint.new(0,0.65,0),
  1401. NumberSequenceKeypoint.new(0.5,0.7,0),
  1402. NumberSequenceKeypoint.new(1,0,0)
  1403. }
  1404. local EyeTrans={
  1405. NumberSequenceKeypoint.new(0,0,0),
  1406. NumberSequenceKeypoint.new(0.5,0,0),
  1407. NumberSequenceKeypoint.new(1,1,0)
  1408. }
  1409. local PE5=Instance.new("ParticleEmitter", ll)
  1410. PE5.LightEmission=.9
  1411. PE5.Color = ColorSequence.new(BrickC("Lime green").Color,BrickC("Really blue").Color)
  1412. PE5.Transparency=NumberSequence.new(EyeTrans)
  1413. PE5.Lifetime=NumberRange.new(0.35)
  1414. PE5.Rotation=NumberRange.new(0,360)
  1415. PE5.Rate=999
  1416. PE5.VelocitySpread = 10000
  1417. PE5.Acceleration = Vector3.new(0,25,0)
  1418. PE5.ZOffset = 0.5
  1419. PE5.Drag = 0
  1420. PE5.Speed = NumberRange.new(0,0,0)
  1421. PE5.Texture="rbxasset://textures/particles/explosion01_implosion_main.dds"
  1422. PE5.Name = "PE5"
  1423. PE5.Enabled = true
  1424. PE5.LockedToPart = true
  1425. -------------------------------------------------------
  1426. --End Customization--
  1427. -------------------------------------------------------
  1428.  
  1429. if Rooted == false then
  1430. Disable_Jump = false
  1431. Humanoid.WalkSpeed = Speed
  1432. elseif Rooted == true then
  1433. Disable_Jump = true
  1434. Humanoid.WalkSpeed = 0
  1435. end
  1436. sick.Parent = Torso
  1437. sick:resume()
  1438. sick.Volume = 5
  1439. sick.Pitch = 1
  1440. sick.SoundId = "rbxassetid://924339757"
  1441. sick.Name = "BanishV3Music"
  1442. end
  1443.  
  1444. --//=================================\\
  1445. --\\=================================//
  1446.  
  1447.  
  1448. function waitForChild(parent, childName)
  1449. local child = parent:findFirstChild(childName)
  1450. if child then return child end
  1451. while true do
  1452. child = parent.ChildAdded:wait()
  1453. if child.Name==childName then return child end
  1454. end
  1455. end
  1456.  
  1457. local Figure = script.Parent
  1458. local Humanoid = waitForChild(Figure, "Humanoid")
  1459. local pose = "Standing"
  1460.  
  1461. local currentAnim = ""
  1462. local currentAnimInstance = nil
  1463. local currentAnimTrack = nil
  1464. local currentAnimKeyframeHandler = nil
  1465. local currentAnimSpeed = 1.0
  1466.  
  1467. local runAnimTrack = nil
  1468. local runAnimKeyframeHandler = nil
  1469.  
  1470. local animTable = {}
  1471. local animNames = {
  1472. idle = {
  1473. { id = "http://www.roblox.com/asset/?id=2931307441", weight = 1 },
  1474. { id = "http://www.roblox.com/asset/?id=2931307441", weight = 1 },
  1475. { id = "http://www.roblox.com/asset/?id=2931307441", weight = 9 }
  1476. },
  1477. walk = {
  1478. { id = "http://www.roblox.com/asset/?id=2931337035", weight = 10 }
  1479. },
  1480. run = {
  1481. { id = "http://www.roblox.com/asset/?id=2931337035", weight = 10 }
  1482. },
  1483. swim = {
  1484. { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
  1485. },
  1486. swimidle = {
  1487. { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
  1488. },
  1489. jump = {
  1490. { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
  1491. },
  1492. fall = {
  1493. { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
  1494. },
  1495. climb = {
  1496. { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
  1497. },
  1498. sit = {
  1499. { id = "http://www.roblox.com/asset/?id=507768133", weight = 10 }
  1500. },
  1501. toolnone = {
  1502. { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
  1503. },
  1504. toolslash = {
  1505. { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
  1506. -- { id = "slash.xml", weight = 10 }
  1507. },
  1508. toollunge = {
  1509. { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
  1510. },
  1511. wave = {
  1512. { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
  1513. },
  1514. point = {
  1515. { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
  1516. },
  1517. dance = {
  1518. { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
  1519. { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
  1520. { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
  1521. },
  1522. dance2 = {
  1523. { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
  1524. { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
  1525. { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
  1526. },
  1527. dance3 = {
  1528. { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
  1529. { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
  1530. { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
  1531. },
  1532. laugh = {
  1533. { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
  1534. },
  1535. cheer = {
  1536. { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
  1537. },
  1538. }
  1539.  
  1540. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  1541. local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  1542.  
  1543. math.randomseed(tick())
  1544.  
  1545. function configureAnimationSet(name, fileList)
  1546. if (animTable[name] ~= nil) then
  1547. for _, connection in pairs(animTable[name].connections) do
  1548. connection:disconnect()
  1549. end
  1550. end
  1551. animTable[name] = {}
  1552. animTable[name].count = 0
  1553. animTable[name].totalWeight = 0
  1554. animTable[name].connections = {}
  1555.  
  1556. -- check for config values
  1557. local config = script:FindFirstChild(name)
  1558. if (config ~= nil) then
  1559. -- print("Loading anims " .. name)
  1560. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  1561. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  1562. local idx = 1
  1563. for _, childPart in pairs(config:GetChildren()) do
  1564. if (childPart:IsA("Animation")) then
  1565. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  1566. animTable[name][idx] = {}
  1567. animTable[name][idx].anim = childPart
  1568. local weightObject = childPart:FindFirstChild("Weight")
  1569. if (weightObject == nil) then
  1570. animTable[name][idx].weight = 1
  1571. else
  1572. animTable[name][idx].weight = weightObject.Value
  1573. end
  1574. animTable[name].count = animTable[name].count + 1
  1575. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  1576. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  1577. idx = idx + 1
  1578. end
  1579. end
  1580. end
  1581.  
  1582. -- fallback to defaults
  1583. if (animTable[name].count <= 0) then
  1584. for idx, anim in pairs(fileList) do
  1585. animTable[name][idx] = {}
  1586. animTable[name][idx].anim = Instance.new("Animation")
  1587. animTable[name][idx].anim.Name = name
  1588. animTable[name][idx].anim.AnimationId = anim.id
  1589. animTable[name][idx].weight = anim.weight
  1590. animTable[name].count = animTable[name].count + 1
  1591. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  1592. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  1593. end
  1594. end
  1595. end
  1596.  
  1597. -- Setup animation objects
  1598. function scriptChildModified(child)
  1599. local fileList = animNames[child.Name]
  1600. if (fileList ~= nil) then
  1601. configureAnimationSet(child.Name, fileList)
  1602. end
  1603. end
  1604.  
  1605. script.ChildAdded:connect(scriptChildModified)
  1606. script.ChildRemoved:connect(scriptChildModified)
  1607.  
  1608.  
  1609. for name, fileList in pairs(animNames) do
  1610. configureAnimationSet(name, fileList)
  1611. end
  1612.  
  1613. -- ANIMATION
  1614.  
  1615. -- declarations
  1616. local toolAnim = "None"
  1617. local toolAnimTime = 0
  1618.  
  1619. local jumpAnimTime = 0
  1620. local jumpAnimDuration = 0.31
  1621.  
  1622. local toolTransitionTime = 0.1
  1623. local fallTransitionTime = 0.2
  1624.  
  1625. -- functions
  1626.  
  1627. function stopAllAnimations()
  1628. local oldAnim = currentAnim
  1629.  
  1630. -- return to idle if finishing an emote
  1631. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  1632. oldAnim = "idle"
  1633. end
  1634.  
  1635. currentAnim = ""
  1636. currentAnimInstance = nil
  1637. if (currentAnimKeyframeHandler ~= nil) then
  1638. currentAnimKeyframeHandler:disconnect()
  1639. end
  1640.  
  1641. if (currentAnimTrack ~= nil) then
  1642. currentAnimTrack:Stop()
  1643. currentAnimTrack:Destroy()
  1644. currentAnimTrack = nil
  1645. end
  1646.  
  1647. -- clean up walk if there is one
  1648. if (runAnimKeyframeHandler ~= nil) then
  1649. runAnimKeyframeHandler:disconnect()
  1650. end
  1651.  
  1652. if (runAnimTrack ~= nil) then
  1653. runAnimTrack:Stop()
  1654. runAnimTrack:Destroy()
  1655. runAnimTrack = nil
  1656. end
  1657.  
  1658. return oldAnim
  1659. end
  1660.  
  1661. local smallButNotZero = 0.0001
  1662. function setRunSpeed(speed)
  1663.  
  1664. if speed < 0.33 then
  1665. currentAnimTrack:AdjustWeight(1.0)
  1666. runAnimTrack:AdjustWeight(smallButNotZero)
  1667. elseif speed < 0.66 then
  1668. local weight = ((speed - 0.33) / 0.33)
  1669. currentAnimTrack:AdjustWeight(1.0 - weight + smallButNotZero)
  1670. runAnimTrack:AdjustWeight(weight + smallButNotZero)
  1671. else
  1672. currentAnimTrack:AdjustWeight(smallButNotZero)
  1673. runAnimTrack:AdjustWeight(1.0)
  1674. end
  1675.  
  1676. local speedScaled = speed * 1.25
  1677. runAnimTrack:AdjustSpeed(speedScaled)
  1678. currentAnimTrack:AdjustSpeed(speedScaled)
  1679. end
  1680.  
  1681.  
  1682. function setAnimationSpeed(speed)
  1683. if speed ~= currentAnimSpeed then
  1684. currentAnimSpeed = speed
  1685. if currentAnim == "walk" then
  1686. setRunSpeed(speed)
  1687. else
  1688. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  1689. end
  1690. end
  1691. end
  1692.  
  1693. function keyFrameReachedFunc(frameName)
  1694. -- print("CurrentAnim ", currentAnim, " ", frameName)
  1695. if (frameName == "End") then
  1696. if currentAnim == "walk" then
  1697. runAnimTrack.TimePosition = 0.0
  1698. currentAnimTrack.TimePosition = 0.0
  1699. else
  1700. -- print("Keyframe : ".. frameName)
  1701.  
  1702. local repeatAnim = currentAnim
  1703. -- return to idle if finishing an emote
  1704. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  1705. repeatAnim = "idle"
  1706. end
  1707.  
  1708. local animSpeed = currentAnimSpeed
  1709. playAnimation(repeatAnim, 0.15, Humanoid)
  1710. setAnimationSpeed(animSpeed)
  1711. end
  1712. end
  1713. end
  1714.  
  1715. function rollAnimation(animName)
  1716. local roll = math.random(1, animTable[animName].totalWeight)
  1717. local origRoll = roll
  1718. local idx = 1
  1719. while (roll > animTable[animName][idx].weight) do
  1720. roll = roll - animTable[animName][idx].weight
  1721. idx = idx + 1
  1722. end
  1723. return idx
  1724. end
  1725.  
  1726. function playAnimation(animName, transitionTime, humanoid)
  1727.  
  1728. local idx = rollAnimation(animName)
  1729.  
  1730. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  1731.  
  1732. local anim = animTable[animName][idx].anim
  1733.  
  1734. -- switch animation
  1735. if (anim ~= currentAnimInstance) then
  1736.  
  1737. if (currentAnimTrack ~= nil) then
  1738. currentAnimTrack:Stop(transitionTime)
  1739. currentAnimTrack:Destroy()
  1740. end
  1741.  
  1742. if (runAnimTrack ~= nil) then
  1743. runAnimTrack:Stop(transitionTime)
  1744. runAnimTrack:Destroy()
  1745. end
  1746.  
  1747. currentAnimSpeed = 1.0
  1748.  
  1749. -- load it to the humanoid; get AnimationTrack
  1750. currentAnimTrack = humanoid:LoadAnimation(anim)
  1751.  
  1752. -- play the animation
  1753. currentAnimTrack:Play(transitionTime)
  1754. currentAnim = animName
  1755. currentAnimInstance = anim
  1756.  
  1757. -- set up keyframe name triggers
  1758. if (currentAnimKeyframeHandler ~= nil) then
  1759. currentAnimKeyframeHandler:disconnect()
  1760. end
  1761. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  1762.  
  1763. -- check to see if we need to blend a walk/run animation
  1764. if animName == "walk" then
  1765. local runAnimName = "run"
  1766. local runIdx = rollAnimation(runAnimName)
  1767.  
  1768. runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim)
  1769. runAnimTrack:Play(transitionTime)
  1770.  
  1771. if (runAnimKeyframeHandler ~= nil) then
  1772. runAnimKeyframeHandler:disconnect()
  1773. end
  1774. runAnimKeyframeHandler = runAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  1775. end
  1776. end
  1777.  
  1778. end
  1779.  
  1780. -------------------------------------------------------------------------------------------
  1781. -------------------------------------------------------------------------------------------
  1782.  
  1783. local toolAnimName = ""
  1784. local toolAnimTrack = nil
  1785. local toolAnimInstance = nil
  1786. local currentToolAnimKeyframeHandler = nil
  1787.  
  1788. function toolKeyFrameReachedFunc(frameName)
  1789. if (frameName == "End") then
  1790. -- print("Keyframe : ".. frameName)
  1791. playToolAnimation(toolAnimName, 0.0, Humanoid)
  1792. end
  1793. end
  1794.  
  1795.  
  1796. function playToolAnimation(animName, transitionTime, humanoid)
  1797.  
  1798. local idx = rollAnimation(animName)
  1799. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  1800. local anim = animTable[animName][idx].anim
  1801.  
  1802. if (toolAnimInstance ~= anim) then
  1803.  
  1804. if (toolAnimTrack ~= nil) then
  1805. toolAnimTrack:Stop()
  1806. toolAnimTrack:Destroy()
  1807. transitionTime = 0
  1808. end
  1809.  
  1810. -- load it to the humanoid; get AnimationTrack
  1811. toolAnimTrack = humanoid:LoadAnimation(anim)
  1812.  
  1813. -- play the animation
  1814. toolAnimTrack:Play(transitionTime)
  1815. toolAnimName = animName
  1816. toolAnimInstance = anim
  1817.  
  1818. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  1819. end
  1820. end
  1821.  
  1822. function stopToolAnimations()
  1823. local oldAnim = toolAnimName
  1824.  
  1825. if (currentToolAnimKeyframeHandler ~= nil) then
  1826. currentToolAnimKeyframeHandler:disconnect()
  1827. end
  1828.  
  1829. toolAnimName = ""
  1830. toolAnimInstance = nil
  1831. if (toolAnimTrack ~= nil) then
  1832. toolAnimTrack:Stop()
  1833. toolAnimTrack:Destroy()
  1834. toolAnimTrack = nil
  1835. end
  1836.  
  1837.  
  1838. return oldAnim
  1839. end
  1840.  
  1841. -------------------------------------------------------------------------------------------
  1842. -------------------------------------------------------------------------------------------
  1843.  
  1844.  
  1845. function onRunning(speed)
  1846. if speed > 0.01 then
  1847. local scale = 16.0
  1848. playAnimation("walk", 0.1, Humanoid)
  1849. setAnimationSpeed(speed / scale)
  1850. pose = "Running"
  1851. else
  1852. if emoteNames[currentAnim] == nil then
  1853. playAnimation("idle", 0.1, Humanoid)
  1854. pose = "Standing"
  1855. end
  1856. end
  1857. end
  1858.  
  1859. function onDied()
  1860. pose = "Dead"
  1861. end
  1862.  
  1863. function onJumping()
  1864. playAnimation("jump", 0.1, Humanoid)
  1865. jumpAnimTime = jumpAnimDuration
  1866. pose = "Jumping"
  1867. end
  1868.  
  1869. function onClimbing(speed)
  1870. local scale = 5.0
  1871. playAnimation("climb", 0.1, Humanoid)
  1872. setAnimationSpeed(speed / scale)
  1873. pose = "Climbing"
  1874. end
  1875.  
  1876. function onGettingUp()
  1877. pose = "GettingUp"
  1878. end
  1879.  
  1880. function onFreeFall()
  1881. if (jumpAnimTime <= 0) then
  1882. playAnimation("fall", fallTransitionTime, Humanoid)
  1883. end
  1884. pose = "FreeFall"
  1885. end
  1886.  
  1887. function onFallingDown()
  1888. pose = "FallingDown"
  1889. end
  1890.  
  1891. function onSeated()
  1892. pose = "Seated"
  1893. end
  1894.  
  1895. function onPlatformStanding()
  1896. pose = "PlatformStanding"
  1897. end
  1898.  
  1899. function onSwimming(speed)
  1900. if speed > 1.00 then
  1901. local scale = 10.0
  1902. playAnimation("swim", 0.4, Humanoid)
  1903. setAnimationSpeed(speed / scale)
  1904. pose = "Swimming"
  1905. else
  1906. playAnimation("swimidle", 0.4, Humanoid)
  1907. pose = "Standing"
  1908. end
  1909. end
  1910.  
  1911. function getTool()
  1912. for _, kid in ipairs(Figure:GetChildren()) do
  1913. if kid.className == "Tool" then return kid end
  1914. end
  1915. return nil
  1916. end
  1917.  
  1918.  
  1919. function animateTool()
  1920.  
  1921. if (toolAnim == "None") then
  1922. playToolAnimation("toolnone", toolTransitionTime, Humanoid)
  1923. return
  1924. end
  1925.  
  1926. if (toolAnim == "Slash") then
  1927. playToolAnimation("toolslash", 0, Humanoid)
  1928. return
  1929. end
  1930.  
  1931. if (toolAnim == "Lunge") then
  1932. playToolAnimation("toollunge", 0, Humanoid)
  1933. return
  1934. end
  1935. end
  1936.  
  1937. function getToolAnim(tool)
  1938. for _, c in ipairs(tool:GetChildren()) do
  1939. if c.Name == "toolanim" and c.className == "StringValue" then
  1940. return c
  1941. end
  1942. end
  1943. return nil
  1944. end
  1945.  
  1946. local lastTick = 0
  1947.  
  1948. function move(time)
  1949. local amplitude = 1
  1950. local frequency = 1
  1951. local deltaTime = time - lastTick
  1952. lastTick = time
  1953.  
  1954. local climbFudge = 0
  1955. local setAngles = false
  1956.  
  1957. if (jumpAnimTime > 0) then
  1958. jumpAnimTime = jumpAnimTime - deltaTime
  1959. end
  1960.  
  1961. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  1962. playAnimation("fall", fallTransitionTime, Humanoid)
  1963. elseif (pose == "Seated") then
  1964. playAnimation("sit", 0.5, Humanoid)
  1965. return
  1966. elseif (pose == "Running") then
  1967. playAnimation("walk", 0.1, Humanoid)
  1968. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  1969. stopAllAnimations()
  1970. amplitude = 0.1
  1971. frequency = 1
  1972. setAngles = true
  1973. end
  1974.  
  1975. -- Tool Animation handling
  1976. local tool = getTool()
  1977. if tool and (tool.RequiresHandle or tool:FindFirstChild("Handle")) then
  1978.  
  1979. local animStringValueObject = getToolAnim(tool)
  1980.  
  1981. if animStringValueObject then
  1982. toolAnim = animStringValueObject.Value
  1983. -- message recieved, delete StringValue
  1984. animStringValueObject.Parent = nil
  1985. toolAnimTime = time + .3
  1986. end
  1987.  
  1988. if time > toolAnimTime then
  1989. toolAnimTime = 0
  1990. toolAnim = "None"
  1991. end
  1992.  
  1993. animateTool()
  1994. else
  1995. stopToolAnimations()
  1996. toolAnim = "None"
  1997. toolAnimInstance = nil
  1998. toolAnimTime = 0
  1999. end
  2000. end
  2001.  
  2002. -- connect events
  2003. Humanoid.Died:connect(onDied)
  2004. Humanoid.Running:connect(onRunning)
  2005. Humanoid.Jumping:connect(onJumping)
  2006. Humanoid.Climbing:connect(onClimbing)
  2007. Humanoid.GettingUp:connect(onGettingUp)
  2008. Humanoid.FreeFalling:connect(onFreeFall)
  2009. Humanoid.FallingDown:connect(onFallingDown)
  2010. Humanoid.Seated:connect(onSeated)
  2011. Humanoid.PlatformStanding:connect(onPlatformStanding)
  2012. Humanoid.Swimming:connect(onSwimming)
  2013.  
  2014. -- setup emote chat hook
  2015. Game.Players.LocalPlayer.Chatted:connect(function(msg)
  2016. local emote = ""
  2017. if (string.sub(msg, 1, 3) == "/e ") then
  2018. emote = string.sub(msg, 4)
  2019. elseif (string.sub(msg, 1, 7) == "/emote ") then
  2020. emote = string.sub(msg, 8)
  2021. end
  2022.  
  2023. if (pose == "Standing" and emoteNames[emote] ~= nil) then
  2024. playAnimation(emote, 0.1, Humanoid)
  2025. end
  2026. -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
  2027. end)
  2028.  
  2029.  
  2030.  
  2031. -- initialize to idle
  2032. playAnimation("idle", 0.1, Humanoid)
  2033. pose = "Standing"
  2034.  
  2035. -- loop to handle timed state transitions and tool animations
  2036. while Figure.Parent~=nil do
  2037. local _, time = wait(0.1)
  2038. move(time)
  2039. end
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047. --//====================================================\\--
  2048. --|| END OF SCRIPT
  2049. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement