Advertisement
ghostteen14

Untitled

Jun 10th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 74.22 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152. Player = game.Players.LocalPlayer
  153. char = Player.Character
  154. Cha = char
  155. Mau5 = Player:GetMouse()
  156. hed = char.Head
  157. rarm = char["Right Arm"]
  158. function nooutline(part)
  159. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  160. end
  161. Cha.Head.face.Texture = "http://www.roblox.com/asset/?id=101765221"
  162. Cha.Shirt:Remove()
  163. Cha.Pants:Remove()
  164.  
  165. Shirt = Instance.new("Shirt",Character)
  166. Shirt.Parent = Cha
  167. Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=249639658"
  168.  
  169. Pant = Instance.new("Pants",Character)
  170. Pant.Parent = Cha
  171. Pant.PantsTemplate = "http://www.roblox.com/asset/?id=249639685"
  172. lite = Instance.new("PointLight")
  173. lite.Parent = Cha.Torso
  174. lite.Brightness = 100
  175. lite.Range = 8
  176. lite.Color = Color3.new(1,1,1)
  177. -------------Chakra Balls--------------------
  178. Sphere = Instance.new("Part",Cha)
  179. Sphere.TopSurface = "Smooth"
  180. Sphere.BottomSurface = "Smooth"
  181. Sphere.FormFactor = "Custom"
  182. Sphere.Size = Vector3.new(1,1,1)
  183. Sphere.CanCollide = True
  184. Sphere.BrickColor = BrickColor.new("Really black")
  185. SphereMesh = Instance.new("SpecialMesh", Sphere)
  186. SphereMesh.MeshType = "Sphere"
  187. SphereMesh.Scale = Vector3.new(1,1,1)
  188. SphereWeld = Instance.new("Weld",Cha)
  189. SphereWeld.Part0 = Cha.Torso
  190. SphereWeld.Part1 = Sphere
  191. SphereWeld.C1 = CFrame.new(3, 0, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0)
  192. Sphere2 = Instance.new("Part",Cha)
  193. Sphere2.TopSurface = "Smooth"
  194. Sphere2.BottomSurface = "Smooth"
  195. Sphere2.FormFactor = "Custom"
  196. Sphere2.Size = Vector3.new(1,1,1)
  197. Sphere2.CanCollide = True
  198. Sphere2.BrickColor = BrickColor.new("Really black")
  199. Sphere2Mesh = Instance.new("SpecialMesh", Sphere2)
  200. Sphere2Mesh.MeshType = "Sphere"
  201. Sphere2Mesh.Scale = Vector3.new(1,1,1)
  202. Sphere2Weld = Instance.new("Weld",Cha)
  203. Sphere2Weld.Part0 = Cha.Torso
  204. Sphere2Weld.Part1 = Sphere2
  205. Sphere2Weld.C1 = CFrame.new(-3, 0, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0)
  206. Sphere3 = Instance.new("Part",Cha)
  207. Sphere3.TopSurface = "Smooth"
  208. Sphere3.BottomSurface = "Smooth"
  209. Sphere3.FormFactor = "Custom"
  210. Sphere3.Size = Vector3.new(1,1,1)
  211. Sphere3.CanCollide = True
  212. Sphere3.BrickColor = BrickColor.new("Really black")
  213. Sphere3Mesh = Instance.new("SpecialMesh", Sphere3)
  214. Sphere3Mesh.MeshType = "Sphere"
  215. Sphere3Mesh.Scale = Vector3.new(1,1,1)
  216. Sphere3Weld = Instance.new("Weld",Cha)
  217. Sphere3Weld.Part0 = Cha.Torso
  218. Sphere3Weld.Part1 = Sphere3
  219. Sphere3Weld.C1 = CFrame.new(-2, -2, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0)
  220. Sphere4 = Instance.new("Part",Cha)
  221. Sphere4.TopSurface = "Smooth"
  222. Sphere4.BottomSurface = "Smooth"
  223. Sphere4.FormFactor = "Custom"
  224. Sphere4.Size = Vector3.new(1,1,1)
  225. Sphere4.CanCollide = True
  226. Sphere4.BrickColor = BrickColor.new("Really black")
  227. Sphere4Mesh = Instance.new("SpecialMesh", Sphere4)
  228. Sphere4Mesh.MeshType = "Sphere"
  229. Sphere4Mesh.Scale = Vector3.new(1,1,1)
  230. Sphere4Weld = Instance.new("Weld",Cha)
  231. Sphere4Weld.Part0 = Cha.Torso
  232. Sphere4Weld.Part1 = Sphere4
  233. Sphere4Weld.C1 = CFrame.new(2, -2, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0)
  234. Sphere5 = Instance.new("Part",Cha)
  235. Sphere5.TopSurface = "Smooth"
  236. Sphere5.BottomSurface = "Smooth"
  237. Sphere5.FormFactor = "Custom"
  238. Sphere5.Size = Vector3.new(1,1,1)
  239. Sphere5.CanCollide = True
  240. Sphere5.BrickColor = BrickColor.new("Really black")
  241. Sphere5Mesh = Instance.new("SpecialMesh", Sphere5)
  242. Sphere5Mesh.MeshType = "Sphere"
  243. Sphere5Mesh.Scale = Vector3.new(1,1,1)
  244. Sphere5Weld = Instance.new("Weld",Cha)
  245. Sphere5Weld.Part0 = Cha.Torso
  246. Sphere5Weld.Part1 = Sphere5
  247. Sphere5Weld.C1 = CFrame.new(0, -4, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0)
  248. ----------------------------------------------------
  249. local m = Instance.new("Model")
  250. m.Name = "Hair"
  251. p1 = Instance.new("Part", m)
  252. p1.BrickColor = BrickColor.new("Institutional white")
  253. p1.FormFactor = Enum.FormFactor.Symmetric
  254. p1.Size = Vector3.new(1, 1, 1)
  255. p1.CFrame = CFrame.new(12.5095692, 22.9280014, 28.5988674, -1.79592973e-007, -0.978694081, 0.205298647, -1.48348063e-008, -0.205299929, -0.978699148, 0.999994814, 2.38417414e-007, -2.98021181e-008)
  256. p1.CanCollide = false
  257. p1.Locked = true
  258. p1.BottomSurface = Enum.SurfaceType.Smooth
  259. p1.TopSurface = Enum.SurfaceType.Smooth
  260. b1 = Instance.new("SpecialMesh", p1)
  261. b1.MeshId = "http://www.roblox.com/asset/?id=12212520"
  262. b1.TextureId = ""
  263. b1.MeshType = Enum.MeshType.FileMesh
  264. b1.Name = "Mesh"
  265. b1.VertexColor = Vector3.new(0, 0, 0)
  266. b1.Scale = Vector3.new(1, 1.60000002, 1.29999995)
  267. p2 = Instance.new("Part", m)
  268. p2.BrickColor = BrickColor.new("Pastel brown")
  269. p2.Transparency = 1
  270. p2.Name = "Head"
  271. p2.FormFactor = Enum.FormFactor.Symmetric
  272. p2.Size = Vector3.new(2, 1, 1)
  273. p2.CFrame = CFrame.new(13.299921, 22.8300076, 28.5998688, -1.19988712e-007, 8.94068393e-008, -0.999995589, -1.48348125e-008, 1, -8.94068108e-008, 0.999995589, -1.48348231e-008, 2.39197504e-007)
  274. p2.CanCollide = false
  275. p2.Locked = true
  276. p2.TopSurface = Enum.SurfaceType.Smooth
  277. b2 = Instance.new("SpecialMesh", p2)
  278. b2.MeshType = Enum.MeshType.Head
  279. b2.Name = "Mesh"
  280. b2.Scale = Vector3.new(1.25, 1.25, 1.25)
  281. p3 = Instance.new("Part", m)
  282. p3.BrickColor = BrickColor.new("Institutional white")
  283. p3.FormFactor = Enum.FormFactor.Symmetric
  284. p3.Size = Vector3.new(2, 2, 2)
  285. p3.CFrame = CFrame.new(13.2999649, 23.4000015, 28.5999584, -1.19728938e-007, 5.96046092e-008, -0.999997199, -9.88988447e-009, 1, -5.96045844e-008, 0.999997199, -9.88988802e-009, 1.19728938e-007)
  286. p3.CanCollide = false
  287. p3.Locked = true
  288. p3.BottomSurface = Enum.SurfaceType.Smooth
  289. p3.TopSurface = Enum.SurfaceType.Smooth
  290. b3 = Instance.new("SpecialMesh", p3)
  291. b3.MeshId = "http://www.roblox.com/asset/?id=16627529"
  292. b3.TextureId = ""
  293. b3.MeshType = Enum.MeshType.FileMesh
  294. b3.Name = "Mesh"
  295. b3.VertexColor = Vector3.new(0, 0, 0)
  296. b3.Scale = Vector3.new(1.04999995, 1.04999995, 1.04999995)
  297. p4 = Instance.new("Part", m)
  298. p4.BrickColor = BrickColor.new("Institutional white")
  299. p4.FormFactor = Enum.FormFactor.Symmetric
  300. p4.Size = Vector3.new(1, 1, 1)
  301. p4.CFrame = CFrame.new(13.220191, 23.5300064, 28.5998363, -2.39457108e-007, 1.19209027e-007, -0.99999398, -1.97797441e-008, 1, -1.19208977e-007, 0.99999398, -1.97797512e-008, 2.39457108e-007)
  302. p4.CanCollide = false
  303. p4.Locked = true
  304. p4.BottomSurface = Enum.SurfaceType.Smooth
  305. p4.TopSurface = Enum.SurfaceType.Smooth
  306. b4 = Instance.new("SpecialMesh", p4)
  307. b4.MeshId = "http://www.roblox.com/asset/?id=19326912"
  308. b4.TextureId = ""
  309. b4.MeshType = Enum.MeshType.FileMesh
  310. b4.Name = "Mesh"
  311. b4.VertexColor = Vector3.new(0, 0, 0)
  312. p5 = Instance.new("Part", m)
  313. p5.BrickColor = BrickColor.new("Institutional white")
  314. p5.FormFactor = Enum.FormFactor.Symmetric
  315. p5.Size = Vector3.new(1, 1, 1)
  316. p5.CFrame = CFrame.new(13.299963, 23.1500015, 28.5999584, -4.78911147e-007, 2.384173e-007, -0.999987543, -3.95593887e-008, 1, -2.38417186e-007, 0.999987543, -3.95594029e-008, 4.78911147e-007)
  317. p5.CanCollide = false
  318. p5.Locked = true
  319. p5.BottomSurface = Enum.SurfaceType.Smooth
  320. p5.TopSurface = Enum.SurfaceType.Smooth
  321. b5 = Instance.new("SpecialMesh", p5)
  322. b5.MeshId = "http://www.roblox.com/asset/?id=45916884"
  323. b5.TextureId = ""
  324. b5.MeshType = Enum.MeshType.FileMesh
  325. b5.Name = "Mesh"
  326. b5.VertexColor = Vector3.new(0, 0, 0)
  327. b5.Scale = Vector3.new(1, 0.899999976, 1)
  328. p6 = Instance.new("Part", m)
  329. p6.BrickColor = BrickColor.new("Institutional white")
  330. p6.FormFactor = Enum.FormFactor.Symmetric
  331. p6.Size = Vector3.new(1, 1, 1)
  332. p6.CFrame = CFrame.new(13.1003246, 23.2700119, 28.5500946, -9.57822294e-007, 4.76831474e-007, -0.999987543, -7.91193955e-008, 1, -2.84217094e-014, 0.999987543, -4.04650001e-015, 5.68434189e-014)
  333. p6.CanCollide = false
  334. p6.Locked = true
  335. p6.BottomSurface = Enum.SurfaceType.Smooth
  336. p6.TopSurface = Enum.SurfaceType.Smooth
  337. b6 = Instance.new("SpecialMesh", p6)
  338. b6.MeshId = "http://www.roblox.com/asset/?id=62246019"
  339. b6.TextureId = ""
  340. b6.MeshType = Enum.MeshType.FileMesh
  341. b6.Name = "Mesh"
  342. b6.VertexColor = Vector3.new(0, 0, 0)
  343. p7 = Instance.new("Part", m)
  344. p7.BrickColor = BrickColor.new("Institutional white")
  345. p7.FormFactor = Enum.FormFactor.Symmetric
  346. p7.Size = Vector3.new(1, 1, 1)
  347. p7.CFrame = CFrame.new(13.1008148, 23.0000076, 28.4990215, -9.57822294e-007, 4.76831502e-007, -0.999987543, -7.91194026e-008, 1, 3.5914197e-019, 0.999987543, 3.05883884e-015, 5.68434189e-014)
  348. p7.CanCollide = false
  349. p7.Locked = true
  350. p7.BottomSurface = Enum.SurfaceType.Smooth
  351. p7.TopSurface = Enum.SurfaceType.Smooth
  352. b7 = Instance.new("SpecialMesh", p7)
  353. b7.MeshId = "http://www.roblox.com/asset/?id=76056263"
  354. b7.TextureId = ""
  355. b7.MeshType = Enum.MeshType.FileMesh
  356. b7.Name = "Mesh"
  357. b7.VertexColor = Vector3.new(0, 0, 0)
  358. p8 = Instance.new("Part", m)
  359. p8.BrickColor = BrickColor.new("Institutional white")
  360. p8.FormFactor = Enum.FormFactor.Symmetric
  361. p8.Size = Vector3.new(1, 1, 1)
  362. p8.CFrame = CFrame.new(12.3756638, 22.3460064, 28.5989819, -9.57822294e-007, -0.80510509, 0.593111277, -7.91194026e-008, -0.593119025, -0.805114806, 0.999987543, -1.28919533e-014, 2.06653508e-014)
  363. p8.CanCollide = false
  364. p8.Locked = true
  365. p8.BottomSurface = Enum.SurfaceType.Smooth
  366. p8.TopSurface = Enum.SurfaceType.Smooth
  367. b8 = Instance.new("SpecialMesh", p8)
  368. b8.MeshId = "http://www.roblox.com/asset/?id=12212520"
  369. b8.TextureId = ""
  370. b8.MeshType = Enum.MeshType.FileMesh
  371. b8.Name = "Mesh"
  372. b8.VertexColor = Vector3.new(0, 0, 0)
  373. b8.Scale = Vector3.new(1, 1.60000002, 1.29999995)
  374. p9 = Instance.new("Part", m)
  375. p9.BrickColor = BrickColor.new("Institutional white")
  376. p9.FormFactor = Enum.FormFactor.Symmetric
  377. p9.Size = Vector3.new(2, 1, 2)
  378. p9.CFrame = CFrame.new(13.2349396, 23.2430096, 28.5993462, -9.57822294e-007, -0.0995007455, -0.995025039, -7.91194097e-008, 0.995037317, -0.0995024443, 0.999987543, -5.41274382e-016, -2.16294996e-014)
  379. p9.CanCollide = false
  380. p9.Locked = true
  381. p9.BottomSurface = Enum.SurfaceType.Smooth
  382. p9.TopSurface = Enum.SurfaceType.Smooth
  383. b9 = Instance.new("SpecialMesh", p9)
  384. b9.MeshId = "http://www.roblox.com/asset/?id=12259089"
  385. b9.TextureId = ""
  386. b9.MeshType = Enum.MeshType.FileMesh
  387. b9.Name = "Mesh"
  388. b9.VertexColor = Vector3.new(0, 0, 0)
  389. b9.Scale = Vector3.new(1.01999998, 1.04999995, 1.04999995)
  390. p10 = Instance.new("Part", m)
  391. p10.BrickColor = BrickColor.new("Institutional white")
  392. p10.FormFactor = Enum.FormFactor.Symmetric
  393. p10.Size = Vector3.new(1, 1, 1)
  394. p10.CFrame = CFrame.new(12.9792271, 23.7430058, 28.6003838, -9.57822294e-007, -0.68356514, -0.729872584, -7.91194097e-008, 0.729881346, -0.683573902, 0.999987543, -1.35710662e-014, -1.68509463e-014)
  395. p10.CanCollide = false
  396. p10.Locked = true
  397. p10.BottomSurface = Enum.SurfaceType.Smooth
  398. p10.TopSurface = Enum.SurfaceType.Smooth
  399. b10 = Instance.new("SpecialMesh", p10)
  400. b10.MeshId = "http://www.roblox.com/asset/?id=12212520"
  401. b10.TextureId = ""
  402. b10.MeshType = Enum.MeshType.FileMesh
  403. b10.Name = "Mesh"
  404. b10.VertexColor = Vector3.new(0, 0, 0)
  405. b10.Scale = Vector3.new(1, 1.60000002, 1.29999995)
  406. p11 = Instance.new("Part", m)
  407. p11.BrickColor = BrickColor.new("Institutional white")
  408. p11.FormFactor = Enum.FormFactor.Symmetric
  409. p11.Size = Vector3.new(1, 1, 1)
  410. p11.CFrame = CFrame.new(12.8353081, 23.4680061, 28.5991058, -9.57822294e-007, -0.989463568, -0.144696504, -7.91194026e-008, 0.144697905, -0.989475906, 0.999987543, -2.11154641e-014, -4.7186215e-015)
  411. p11.CanCollide = false
  412. p11.Locked = true
  413. p11.BottomSurface = Enum.SurfaceType.Smooth
  414. p11.TopSurface = Enum.SurfaceType.Smooth
  415. b11 = Instance.new("SpecialMesh", p11)
  416. b11.MeshId = "http://www.roblox.com/asset/?id=12212520"
  417. b11.TextureId = ""
  418. b11.MeshType = Enum.MeshType.FileMesh
  419. b11.Name = "Mesh"
  420. b11.VertexColor = Vector3.new(0, 0, 0)
  421. b11.Scale = Vector3.new(1, 1.60000002, 1.29999995)
  422. w1 = Instance.new("Weld", p1)
  423. w1.Name = "Head_Weld"
  424. w1.Part0 = p1
  425. w1.C0 = CFrame.new(-28.5990181, 16.950285, 19.8713875, 0, 0, 0.999999583, -0.97869873, -0.205299839, 5.96046448e-008, 0.20529972, -0.978699148, -7.4505806e-009)
  426. w1.Part1 = p2
  427. w1.C1 = CFrame.new(-28.5999966, -22.8300076, 13.2999811, 5.96046448e-008, 0, 0.999999642, 0, 1, 0, -0.999999642, 0, 5.96046448e-008)
  428. w2 = Instance.new("Weld", p2)
  429. w2.Name = "Weld"
  430. w2.Part0 = p2
  431. w2.C0 = CFrame.new(-28.5999527, -22.8300056, 13.2999592, -2.5997493e-010, -4.94494357e-009, 0.999998808, 2.98023224e-008, 1, -4.94494712e-009, -0.999998808, -2.98023224e-008, 1.19469163e-007)
  432. w2.Part1 = p3
  433. w2.C1 = CFrame.new(-28.5999947, -23.3999996, 13.2999821, 0, 0, 0.999999583, 0, 1, 0, -0.999999583, 0, 0)
  434. w3 = Instance.new("Weld", p3)
  435. w3.Name = "Weld"
  436. w3.Part0 = p3
  437. w3.C0 = CFrame.new(-28.5999012, -23.3999996, 13.2999363, -1.19728938e-007, -9.88988447e-009, 0.999997199, 5.96046092e-008, 1, -9.88988802e-009, -0.999997199, -5.96045844e-008, 1.19728938e-007)
  438. w3.Part1 = p4
  439. w3.C1 = CFrame.new(-28.5998726, -23.5300045, 13.2202082, 0, 0, 0.999999583, 0, 1, 0, -0.999999583, 0, 0)
  440. w4 = Instance.new("Weld", p4)
  441. w4.Name = "Weld"
  442. w4.Part0 = p4
  443. w4.C0 = CFrame.new(-28.5996857, -23.5300064, 13.2201195, -2.39457108e-007, -1.97797441e-008, 0.99999398, 1.19209027e-007, 1, -1.97797512e-008, -0.99999398, -1.19208977e-007, 2.39457108e-007)
  444. w4.Part1 = p5
  445. w4.C1 = CFrame.new(-28.5999947, -23.1499996, 13.2999821, 0, 0, 0.999999583, 0, 1, 0, -0.999999583, 0, 0)
  446. w5 = Instance.new("Weld", p5)
  447. w5.Name = "Weld"
  448. w5.Part0 = p5
  449. w5.C0 = CFrame.new(-28.5996189, -23.1500015, 13.2998009, -4.78911147e-007, -3.95593887e-008, 0.999987543, 2.384173e-007, 1, -3.95594029e-008, -0.999987543, -2.38417186e-007, 4.78911147e-007)
  450. w5.Part1 = p6
  451. w5.C1 = CFrame.new(-28.5501289, -23.27001, 13.1003361, 0, 0, 0.999999583, 0, 1, 0, -0.999999583, 0, 0)
  452. w6 = Instance.new("Weld", p6)
  453. w6.Name = "Weld"
  454. w6.Part0 = p6
  455. w6.C0 = CFrame.new(-28.5497494, -23.2700157, 13.100173, -9.57822294e-007, -7.91193955e-008, 0.999987543, 4.76831474e-007, 1, -4.04650001e-015, -0.999987543, -2.84217094e-014, 5.68434189e-014)
  456. w6.Part1 = p7
  457. w6.C1 = CFrame.new(-28.4990501, -23.0000057, 13.1008282, 0, 0, 0.999999881, 0, 1, 0, -0.999999881, 0, 0)
  458. w7 = Instance.new("Weld", p7)
  459. w7.Name = "Weld"
  460. w7.Part0 = p7
  461. w7.C0 = CFrame.new(-28.4986763, -23.0000114, 13.1006632, -9.57822294e-007, -7.91194026e-008, 0.999987543, 4.76831502e-007, 1, 3.05883884e-015, -0.999987543, 3.5914197e-019, 5.68434189e-014)
  462. w7.Part1 = p8
  463. w7.C1 = CFrame.new(-28.5990181, 23.2175999, 10.6510067, 0, 0, 0.999999583, -0.805118203, -0.59311378, -5.96046448e-008, 0.593113363, -0.80511874, 0)
  464. w8 = Instance.new("Weld", p8)
  465. w8.Name = "Weld"
  466. w8.Part0 = p8
  467. w8.C0 = CFrame.new(-28.5986366, 23.2175598, 10.6509457, -9.57822294e-007, -7.91194026e-008, 0.999987543, -0.80510509, -0.593119025, -1.28919533e-014, 0.593111277, -0.805114806, 2.06653508e-014)
  468. w8.Part1 = p9
  469. w8.C1 = CFrame.new(-28.5993843, -21.8107243, 15.4820604, 0, 0, 0.999999583, -0.0995036662, 0.995037258, 0, -0.995036721, -0.0995037258, 0)
  470. w9 = Instance.new("Weld", p9)
  471. w9.Name = "Weld"
  472. w9.Part0 = p9
  473. w9.C0 = CFrame.new(-28.598999, -21.8107738, 15.4818439, -9.57822294e-007, -7.91194097e-008, 0.999987543, -0.0995007455, 0.995037317, -5.41274382e-016, -0.995025039, -0.0995024443, -2.16294996e-014)
  474. w9.Part1 = p10
  475. w9.C1 = CFrame.new(-28.6004219, -8.45714283, 25.703455, 0, 0, 0.999999583, -0.683578134, 0.729877055, 2.98023224e-008, -0.729876637, -0.683578491, 8.94069672e-008)
  476. w10 = Instance.new("Weld", p10)
  477. w10.Name = "Weld"
  478. w10.Part0 = p10
  479. w10.C0 = CFrame.new(-28.6000366, -8.4574213, 25.703289, -9.57822294e-007, -7.91194097e-008, 0.999987543, -0.68356514, 0.729881346, -1.35710662e-014, -0.729872584, -0.683573902, -1.68509463e-014)
  480. w10.Part1 = p11
  481. w10.C1 = CFrame.new(-28.5991402, 9.30450344, 25.0782566, 0, 0, 0.999999583, -0.989475787, 0.144696504, 8.94069672e-008, -0.144696444, -0.989476025, 7.4505806e-009)
  482. m.Parent = char
  483. m:MakeJoints()
  484. ----------------------------------------------------
  485. local cor = Instance.new("Part", char.Hair)
  486. cor.Name = "Link"
  487. cor.Locked = true
  488. cor.BottomSurface = 0
  489. cor.CanCollide = false
  490. cor.Size = Vector3.new(1, 9, 1)
  491. cor.Transparency = 1
  492. cor.TopSurface = 0
  493. corw = Instance.new("Weld", cor)
  494. corw.Part0 = hed
  495. corw.Part1 = cor
  496. corw.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  497. corw.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  498. weld1 = Instance.new("Weld", char.Hair)
  499. weld1.Part0 = cor
  500. weld1.Part1 = char.Hair.Head
  501. weld1.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  502. ----------------------------------------------------
  503. local Pole = Instance.new("Part",char)
  504. Pole.Locked = true
  505. Pole.Size = Vector3.new(1,1,1)
  506. Pole.BrickColor = BrickColor.new("Really black")
  507. Pole.Material = "SmoothPlastic"
  508. Pole.CanCollide = false
  509. local pm = Instance.new("CylinderMesh",Pole)
  510. pm.Scale = Vector3.new(.3,7,.3)
  511. nooutline(Pole)
  512. local PoleWeld = Instance.new("Weld")
  513. PoleWeld.Part0 = rarm
  514. PoleWeld.Part1 = Pole
  515. PoleWeld.C0 = CFrame.new(0,-1,-0.65) * CFrame.Angles(math.rad(-90),math.rad(90),0)
  516. PoleWeld.Parent = Pole
  517.  
  518. for i = 1,360*(3/4),5 do
  519. local Part = Instance.new("Part",char)
  520. local pm = Instance.new("CylinderMesh", Part)
  521. Part.BrickColor = BrickColor.new("Really black")
  522. Part.FormFactor = "Custom"
  523. Part.Size = Vector3.new(0.2,0.2,0.2)
  524. Part.CanCollide = false
  525. Part.Locked = true
  526. Part.Material = "SmoothPlastic"
  527. nooutline(Part)
  528. pm.Scale = Vector3.new(0.3/0.2,0.8,0.3/0.2)
  529. local Weld2 = Instance.new("Weld")
  530. Weld2.Part0 = Pole
  531. Weld2.Part1 = Part
  532. Weld2.C0 = CFrame.new(0,4.75,0) * CFrame.Angles(math.rad(90),math.rad(i-45),0) * CFrame.new(0,0,-1) * CFrame.Angles(0,0,math.rad(90))
  533. Weld2.Parent = PoleWeld.Part0
  534. end
  535. -----------------------------------------
  536. ----------------
  537. Player=game:GetService("Players").LocalPlayer
  538. Character=Player.Character
  539. PlayerGui=Player.PlayerGui
  540. Backpack=Player.Backpack
  541. Torso=Character.Torso
  542. Head=Character.Head
  543. Humanoid=Character.Humanoid
  544. m=Instance.new('Model',Character)
  545. LeftArm=Character["Left Arm"]
  546. LeftLeg=Character["Left Leg"]
  547. RightArm=Character["Right Arm"]
  548. RightLeg=Character["Right Leg"]
  549. LS=Torso["Left Shoulder"]
  550. LH=Torso["Left Hip"]
  551. RS=Torso["Right Shoulder"]
  552. RH=Torso["Right Hip"]
  553. Face = Head.face
  554. Neck=Torso.Neck
  555. it=Instance.new
  556. attacktype=1
  557. vt=Vector3.new
  558. cf=CFrame.new
  559. euler=CFrame.fromEulerAnglesXYZ
  560. angles=CFrame.Angles
  561. cloaked=false
  562. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  563. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  564. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  565. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  566. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  567. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  568. RootPart=Character.HumanoidRootPart
  569. RootJoint=RootPart.RootJoint
  570. RootCF=euler(-1.57,0,3.14)
  571. attack = false
  572. attackdebounce = false
  573. deb=false
  574. equipped=true
  575. hand=false
  576. MMouse=nil
  577. combo=0
  578. mana=0
  579. trispeed=.2
  580. attackmode='none'
  581. local idle=0
  582. local Anim="Idle"
  583. local Effects={}
  584. local gun=false
  585. local shoot=false
  586. player=nil
  587. mana=0
  588. Attacking=false
  589. asset = "http://www.roblox.com/asset/?id="
  590. meshes = {["blast"] = 20329976,["ring"] = 3270017,["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["cloud"] = 1095708,["diamond"] = 9756362}
  591. sounds = {["explode"] = 130792180;}
  592. torsomesh = "rbxasset://fonts/torso.mesh"
  593. colours = {"Tr. Red","Black","Tr. Blue","Black","Phosph. White","Royal purple"}
  594. local ASpeed = 10
  595. Humanoid.MaxHealth = 500
  596. wait()
  597. Humanoid.Health=500
  598.  
  599. mouse=Player:GetMouse()
  600. --save shoulders
  601. RSH, LSH=nil, nil
  602. --welds
  603. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  604. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  605. LH=Torso["Left Hip"]
  606. RH=Torso["Right Hip"]
  607. TorsoColor=Torso.BrickColor
  608. function NoOutline(Part)
  609. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  610. end
  611. player=Player
  612. ch=Character
  613. RSH=ch.Torso["Right Shoulder"]
  614. LSH=ch.Torso["Left Shoulder"]
  615. --
  616. --RSH.Parent=nil
  617. --LSH.Parent=nil
  618. --
  619. RW.Name="Right Shoulder"
  620. RW.Part0=ch.Torso
  621. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  622. RW.C1=cf(0, 0.5, 0)
  623. RW.Part1=ch["Right Arm"]
  624. RW.Parent=ch.Torso
  625. --
  626. LW.Name="Left Shoulder"
  627. LW.Part0=ch.Torso
  628. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  629. LW.C1=cf(0, 0.5, 0)
  630. LW.Part1=ch["Left Arm"]
  631. LW.Parent=ch.Torso
  632. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  633. wld = Instance.new("Weld", wp1)
  634. wld.Part0 = wp0
  635. wld.Part1 = wp1
  636. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  637. end
  638. local larm = char["Left Arm"]
  639. local rarm = char["Right Arm"]
  640. local lleg = char["Left Leg"]
  641. local rleg = char["Right Leg"]
  642. local hed = char.Head
  643. local torso = char.Torso
  644. local root = char.HumanoidRootPart
  645. newWeld(torso, lleg, -0.5, -1, 0)
  646. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  647. newWeld(torso, rleg, 0.5, -1, 0)
  648. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  649. Player=game:GetService('Players').LocalPlayer
  650. Character=Player.Character
  651. Mouse=Player:GetMouse()
  652. m=Instance.new('Model',Character)
  653.  
  654.  
  655. local function weldBetween(a, b)
  656. local weldd = Instance.new("ManualWeld")
  657. weldd.Part0 = a
  658. weldd.Part1 = b
  659. weldd.C0 = CFrame.new()
  660. weldd.C1 = b.CFrame:inverse() * a.CFrame
  661. weldd.Parent = a
  662. return weldd
  663. end
  664.  
  665. it=Instance.new
  666.  
  667. function nooutline(part)
  668. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  669. end
  670.  
  671. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  672. local fp=it("Part")
  673. fp.formFactor=formfactor
  674. fp.Parent=parent
  675. fp.Reflectance=reflectance
  676. fp.Transparency=transparency
  677. fp.CanCollide=false
  678. fp.Locked=true
  679. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  680. fp.Name=name
  681. fp.Size=size
  682. fp.Position=Character.Torso.Position
  683. nooutline(fp)
  684. fp.Material=material
  685. fp:BreakJoints()
  686. return fp
  687. end
  688.  
  689. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  690. local mesh=it(Mesh)
  691. mesh.Parent=part
  692. if Mesh=="SpecialMesh" then
  693. mesh.MeshType=meshtype
  694. mesh.MeshId=meshid
  695. end
  696. mesh.Offset=offset
  697. mesh.Scale=scale
  698. return mesh
  699. end
  700.  
  701. function weld(parent,part0,part1,c0,c1)
  702. local weld=it("Weld")
  703. weld.Parent=parent
  704. weld.Part0=part0
  705. weld.Part1=part1
  706. weld.C0=c0
  707. weld.C1=c1
  708. return weld
  709. end
  710.  
  711.  
  712. Player=game:GetService('Players').LocalPlayer
  713. Character=Player.Character
  714. Mouse=Player:GetMouse()
  715. m=Instance.new('Model',Character)
  716.  
  717.  
  718. local function weldBetween(a, b)
  719. local weldd = Instance.new("ManualWeld")
  720. weldd.Part0 = a
  721. weldd.Part1 = b
  722. weldd.C0 = CFrame.new()
  723. weldd.C1 = b.CFrame:inverse() * a.CFrame
  724. weldd.Parent = a
  725. return weldd
  726. end
  727.  
  728. it=Instance.new
  729.  
  730. function nooutline(part)
  731. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  732. end
  733.  
  734.  
  735. function swait(num)
  736. if num==0 or num==nil then
  737. game:service'RunService'.Heartbeat:wait(0)
  738. else
  739. for i=0,num do
  740. game:service'RunService'.Heartbeat:wait(0)
  741. end
  742. end
  743. end
  744.  
  745. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  746. local mesh=it(Mesh)
  747. mesh.Parent=part
  748. if Mesh=="SpecialMesh" then
  749. mesh.MeshType=meshtype
  750. mesh.MeshId=meshid
  751. end
  752. mesh.Offset=offset
  753. mesh.Scale=scale
  754. return mesh
  755. end
  756.  
  757. function weld(parent,part0,part1,c0,c1)
  758. local weld=it("Weld")
  759. weld.Parent=parent
  760. weld.Part0=part0
  761. weld.Part1=part1
  762. weld.C0=c0
  763. weld.C1=c1
  764. return weld
  765. end
  766.  
  767.  
  768. local function CFrameFromTopBack(at, top, back)
  769. local right = top:Cross(back)
  770. return CFrame.new(at.x, at.y, at.z,
  771. right.x, top.x, back.x,
  772. right.y, top.y, back.y,
  773. right.z, top.z, back.z)
  774. end
  775.  
  776. function Triangle(a, b, c)
  777. local edg1 = (c-a):Dot((b-a).unit)
  778. local edg2 = (a-b):Dot((c-b).unit)
  779. local edg3 = (b-c):Dot((a-c).unit)
  780. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  781. a, b, c = a, b, c
  782. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  783. a, b, c = b, c, a
  784. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  785. a, b, c = c, a, b
  786. else
  787. assert(false, "unreachable")
  788. end
  789.  
  790. local len1 = (c-a):Dot((b-a).unit)
  791. local len2 = (b-a).magnitude - len1
  792. local width = (a + (b-a).unit*len1 - c).magnitude
  793.  
  794. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  795.  
  796. local list = {}
  797.  
  798. local Color = BrickColor.new("Really black")
  799.  
  800. if len1 > 0.01 then
  801. local w1 = Instance.new('WedgePart', m)
  802. game:GetService("Debris"):AddItem(w1,5)
  803. w1.Material = "SmoothPlastic"
  804. w1.FormFactor = 'Custom'
  805. w1.BrickColor = Color
  806. w1.Transparency = 0
  807. w1.Reflectance = 0
  808. w1.Material = "SmoothPlastic"
  809. w1.CanCollide = false
  810. NoOutline(w1)
  811. local sz = Vector3.new(0.2, width, len1)
  812. w1.Size = sz
  813. local sp = Instance.new("SpecialMesh",w1)
  814. sp.MeshType = "Wedge"
  815. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  816. w1:BreakJoints()
  817. w1.Anchored = true
  818. w1.Parent = workspace
  819. w1.Transparency = 0.7
  820. table.insert(Effects,{w1,"Disappear",.01})
  821. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  822. table.insert(list,w1)
  823. end
  824.  
  825. if len2 > 0.01 then
  826. local w2 = Instance.new('WedgePart', m)
  827. game:GetService("Debris"):AddItem(w2,5)
  828. w2.Material = "SmoothPlastic"
  829. w2.FormFactor = 'Custom'
  830. w2.BrickColor = Color
  831. w2.Transparency = 0
  832. w2.Reflectance = 0
  833. w2.Material = "SmoothPlastic"
  834. w2.CanCollide = false
  835. NoOutline(w2)
  836. local sz = Vector3.new(0.2, width, len2)
  837. w2.Size = sz
  838. local sp = Instance.new("SpecialMesh",w2)
  839. sp.MeshType = "Wedge"
  840. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  841. w2:BreakJoints()
  842. w2.Anchored = true
  843. w2.Parent = workspace
  844. w2.Transparency = 0.7
  845. table.insert(Effects,{w2,"Disappear",.01})
  846. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  847. table.insert(list,w2)
  848. end
  849. return unpack(list)
  850. end
  851.  
  852.  
  853. so = function(id,par,vol,pit)
  854. coroutine.resume(coroutine.create(function()
  855. local sou = Instance.new("Sound",par or workspace)
  856. sou.Volume=vol
  857. sou.Pitch=pit or 1
  858. sou.SoundId=id
  859. swait()
  860. sou:play()
  861. game:GetService("Debris"):AddItem(sou,6)
  862. end))
  863. end
  864.  
  865. function clerp(a,b,t)
  866. local qa = {QuaternionFromCFrame(a)}
  867. local qb = {QuaternionFromCFrame(b)}
  868. local ax, ay, az = a.x, a.y, a.z
  869. local bx, by, bz = b.x, b.y, b.z
  870. local _t = 1-t
  871. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  872. end
  873.  
  874. function QuaternionFromCFrame(cf)
  875. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  876. local trace = m00 + m11 + m22
  877. if trace > 0 then
  878. local s = math.sqrt(1 + trace)
  879. local recip = 0.5/s
  880. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  881. else
  882. local i = 0
  883. if m11 > m00 then
  884. i = 1
  885. end
  886. if m22 > (i == 0 and m00 or m11) then
  887. i = 2
  888. end
  889. if i == 0 then
  890. local s = math.sqrt(m00-m11-m22+1)
  891. local recip = 0.5/s
  892. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  893. elseif i == 1 then
  894. local s = math.sqrt(m11-m22-m00+1)
  895. local recip = 0.5/s
  896. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  897. elseif i == 2 then
  898. local s = math.sqrt(m22-m00-m11+1)
  899. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  900. end
  901. end
  902. end
  903.  
  904. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  905. local xs, ys, zs = x + x, y + y, z + z
  906. local wx, wy, wz = w*xs, w*ys, w*zs
  907. local xx = x*xs
  908. local xy = x*ys
  909. local xz = x*zs
  910. local yy = y*ys
  911. local yz = y*zs
  912. local zz = z*zs
  913. 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))
  914. end
  915.  
  916. function QuaternionSlerp(a, b, t)
  917. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  918. local startInterp, finishInterp;
  919. if cosTheta >= 0.0001 then
  920. if (1 - cosTheta) > 0.0001 then
  921. local theta = math.acos(cosTheta)
  922. local invSinTheta = 1/math.sin(theta)
  923. startInterp = math.sin((1-t)*theta)*invSinTheta
  924. finishInterp = math.sin(t*theta)*invSinTheta
  925. else
  926. startInterp = 1-t
  927. finishInterp = t
  928. end
  929. else
  930. if (1+cosTheta) > 0.0001 then
  931. local theta = math.acos(-cosTheta)
  932. local invSinTheta = 1/math.sin(theta)
  933. startInterp = math.sin((t-1)*theta)*invSinTheta
  934. finishInterp = math.sin(t*theta)*invSinTheta
  935. else
  936. startInterp = t-1
  937. finishInterp = t
  938. end
  939. end
  940. 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
  941. end
  942.  
  943. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  944. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  945. end
  946.  
  947. local function CFrameFromTopBack(at, top, back)
  948. local right = top:Cross(back)
  949. return CFrame.new(at.x, at.y, at.z,
  950. right.x, top.x, back.x,
  951. right.y, top.y, back.y,
  952. right.z, top.z, back.z)
  953. end
  954.  
  955. function Triangle(a, b, c)
  956. local edg1 = (c-a):Dot((b-a).unit)
  957. local edg2 = (a-b):Dot((c-b).unit)
  958. local edg3 = (b-c):Dot((a-c).unit)
  959. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  960. a, b, c = a, b, c
  961. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  962. a, b, c = b, c, a
  963. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  964. a, b, c = c, a, b
  965. else
  966. assert(false, "unreachable")
  967. end
  968.  
  969. local len1 = (c-a):Dot((b-a).unit)
  970. local len2 = (b-a).magnitude - len1
  971. local width = (a + (b-a).unit*len1 - c).magnitude
  972.  
  973. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  974.  
  975. local list = {}
  976.  
  977. if len1 > 0.01 then
  978. local w1 = Instance.new('WedgePart', m)
  979. game:GetService("Debris"):AddItem(w1,5)
  980. w1.Material = "SmoothPlastic"
  981. w1.FormFactor = 'Custom'
  982. w1.BrickColor = BrickColor.new("Really black")
  983. w1.Transparency = 0
  984. w1.Reflectance = 0
  985. w1.Material = "SmoothPlastic"
  986. w1.CanCollide = false
  987. NoOutline(w1)
  988. local sz = Vector3.new(0.2, width, len1)
  989. w1.Size = sz
  990. local sp = Instance.new("SpecialMesh",w1)
  991. sp.MeshType = "Wedge"
  992. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  993. w1:BreakJoints()
  994. w1.Anchored = true
  995. w1.Parent = workspace
  996. w1.Transparency = 0.7
  997. table.insert(Effects,{w1,"Disappear",.01})
  998. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  999. table.insert(list,w1)
  1000. end
  1001.  
  1002. if len2 > 0.01 then
  1003. local w2 = Instance.new('WedgePart', m)
  1004. game:GetService("Debris"):AddItem(w2,5)
  1005. w2.Material = "SmoothPlastic"
  1006. w2.FormFactor = 'Custom'
  1007. w2.BrickColor = BrickColor.new("Really black")
  1008. w2.Transparency = 0
  1009. w2.Reflectance = 0
  1010. w2.Material = "SmoothPlastic"
  1011. w2.CanCollide = false
  1012. NoOutline(w2)
  1013. local sz = Vector3.new(0.2, width, len2)
  1014. w2.Size = sz
  1015. local sp = Instance.new("SpecialMesh",w2)
  1016. sp.MeshType = "Wedge"
  1017. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  1018. w2:BreakJoints()
  1019. w2.Anchored = true
  1020. w2.Parent = workspace
  1021. w2.Transparency = 0.7
  1022. table.insert(Effects,{w2,"Disappear",.01})
  1023. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1024. table.insert(list,w2)
  1025. end
  1026. return unpack(list)
  1027. end
  1028.  
  1029. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  1030. if hit.Parent==nil then
  1031. return
  1032. end
  1033. h=hit.Parent:FindFirstChild("Humanoid")
  1034. for _,v in pairs(hit.Parent:children()) do
  1035. if v:IsA("Humanoid") then
  1036. h=v
  1037. end
  1038. end
  1039. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1040. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1041. end
  1042. if hit.Parent.className=="Hat" then
  1043. hit=hit.Parent.Parent:findFirstChild("Head")
  1044. end
  1045. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1046. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1047. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1048. return
  1049. end]]
  1050. -- hs(hit,1.2)
  1051. c=Instance.new("ObjectValue")
  1052. c.Name="creator"
  1053. c.Value=game:service("Players").LocalPlayer
  1054. c.Parent=h
  1055. game:GetService("Debris"):AddItem(c,.5)
  1056. Damage=math.random(minim,maxim)
  1057. -- h:TakeDamage(Damage)
  1058. blocked=false
  1059. block=hit.Parent:findFirstChild("Block")
  1060. if block~=nil then
  1061. print(block.className)
  1062. if block.className=="NumberValue" then
  1063. if block.Value>0 then
  1064. blocked=true
  1065. if decreaseblock==nil then
  1066. block.Value=block.Value-1
  1067. end
  1068. end
  1069. end
  1070. if block.className=="IntValue" then
  1071. if block.Value>0 then
  1072. blocked=true
  1073. if decreaseblock~=nil then
  1074. block.Value=block.Value-1
  1075. end
  1076. end
  1077. end
  1078. end
  1079. if blocked==false then
  1080. -- h:TakeDamage(Damage)
  1081. h.Health=h.Health-Damage
  1082. showDamage(hit.Parent,Damage,.5,BrickColor.new("Dark stone grey"))
  1083. else
  1084. h.Health=h.Health-(Damage/2)
  1085. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  1086. end
  1087. if Type=="Knockdown" then
  1088. hum=hit.Parent.Humanoid
  1089. hum.PlatformStand=true
  1090. coroutine.resume(coroutine.create(function(HHumanoid)
  1091. swait(1)
  1092. HHumanoid.PlatformStand=false
  1093. end),hum)
  1094. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1095. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1096. local bodvol=Instance.new("BodyVelocity")
  1097. bodvol.velocity=angle*knockback
  1098. bodvol.P=5000
  1099. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1100. bodvol.Parent=hit
  1101. rl=Instance.new("BodyAngularVelocity")
  1102. rl.P=3000
  1103. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1104. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1105. rl.Parent=hit
  1106. game:GetService("Debris"):AddItem(bodvol,.5)
  1107. game:GetService("Debris"):AddItem(rl,.5)
  1108. elseif Type=="Normal" then
  1109. vp=Instance.new("BodyVelocity")
  1110. vp.P=500
  1111. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1112. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1113. if KnockbackType==1 then
  1114. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1115. elseif KnockbackType==2 then
  1116. vp.velocity=Property.CFrame.lookVector*knockback
  1117. end
  1118. if knockback>0 then
  1119. vp.Parent=hit.Parent.Torso
  1120. end
  1121. game:GetService("Debris"):AddItem(vp,.5)
  1122. elseif Type=="Up" then
  1123. local bodyVelocity=Instance.new("BodyVelocity")
  1124. bodyVelocity.velocity=vt(0,60,0)
  1125. bodyVelocity.P=5000
  1126. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1127. bodyVelocity.Parent=hit
  1128. game:GetService("Debris"):AddItem(bodyVelocity,1)
  1129. rl=Instance.new("BodyAngularVelocity")
  1130. rl.P=3000
  1131. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1132. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  1133. rl.Parent=hit
  1134. game:GetService("Debris"):AddItem(rl,.5)
  1135. elseif Type=="Snare" then
  1136. bp=Instance.new("BodyPosition")
  1137. bp.P=2000
  1138. bp.D=100
  1139. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1140. bp.position=hit.Parent.Torso.Position
  1141. bp.Parent=hit.Parent.Torso
  1142. game:GetService("Debris"):AddItem(bp,1)
  1143. elseif Type=="Target" then
  1144. if Targetting==false then
  1145. ZTarget=hit.Parent.Torso
  1146. coroutine.resume(coroutine.create(function(Part)
  1147. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  1148. swait(5)
  1149. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  1150. end),ZTarget)
  1151. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  1152. targetgui=Instance.new("BillboardGui")
  1153. targetgui.Parent=ZTarget
  1154. targetgui.Size=UDim2.new(10,100,10,100)
  1155. targ=Instance.new("ImageLabel")
  1156. targ.Parent=targetgui
  1157. targ.BackgroundTransparency=1
  1158. targ.Image="rbxassetid://4834067"
  1159. targ.Size=UDim2.new(1,0,1,0)
  1160. cam.CameraType="Scriptable"
  1161. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1162. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  1163. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1164. Targetting=true
  1165. RocketTarget=ZTarget
  1166. for i=1,Property do
  1167. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  1168. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  1169. swait()
  1170. end
  1171. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  1172. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1173. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  1174. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  1175. end
  1176. Targetting=false
  1177. RocketTarget=nil
  1178. targetgui.Parent=nil
  1179. cam.CameraType="Custom"
  1180. end
  1181. end
  1182. debounce=Instance.new("BoolValue")
  1183. debounce.Name="DebounceHit"
  1184. debounce.Parent=hit.Parent
  1185. debounce.Value=true
  1186. game:GetService("Debris"):AddItem(debounce,Delay)
  1187. c=Instance.new("ObjectValue")
  1188. c.Name="creator"
  1189. c.Value=Player
  1190. c.Parent=h
  1191. game:GetService("Debris"):AddItem(c,.5)
  1192. CRIT=false
  1193. hitDeb=true
  1194. AttackPos=6
  1195. end
  1196. end
  1197.  
  1198. showDamage=function(Char,Dealt,du,Color)
  1199. m=Instance.new("Model")
  1200. m.Name=tostring(Dealt)
  1201. h=Instance.new("Humanoid")
  1202. h.Health=0
  1203. h.MaxHealth=0
  1204. h.Parent=m
  1205. c=Instance.new("Part")
  1206. c.Transparency=0
  1207. c.BrickColor=Color
  1208. c.Name="Head"
  1209. c.TopSurface=0
  1210. c.BottomSurface=0
  1211. c.formFactor="Plate"
  1212. c.Size=Vector3.new(1,.4,1)
  1213. ms=Instance.new("CylinderMesh")
  1214. ms.Scale=Vector3.new(.8,.8,.8)
  1215. if CRIT==true then
  1216. ms.Scale=Vector3.new(1,1.25,1)
  1217. end
  1218. ms.Parent=c
  1219. c.Reflectance=0
  1220. Instance.new("BodyGyro").Parent=c
  1221. c.Parent=m
  1222. if Char:findFirstChild("Head")~=nil then
  1223. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1224. elseif Char.Parent:findFirstChild("Head")~=nil then
  1225. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1226. end
  1227. f=Instance.new("BodyPosition")
  1228. f.P=2000
  1229. f.D=100
  1230. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1231. f.position=c.Position+Vector3.new(0,3,0)
  1232. f.Parent=c
  1233. game:GetService("Debris"):AddItem(m,.5+du)
  1234. c.CanCollide=false
  1235. m.Parent=workspace
  1236. c.CanCollide=false
  1237. end
  1238.  
  1239. for i,v in pairs (char:GetChildren()) do if v:IsA("Hat") then
  1240. v:remove()
  1241. end
  1242. end
  1243. local player = game.Players.LocalPlayer
  1244. local pchar = player.Character
  1245. local mouse = player:GetMouse()
  1246. local cam = workspace.CurrentCamera
  1247.  
  1248. local rad = math.rad
  1249.  
  1250. local keysDown = {}
  1251. local flySpeed = 0
  1252. local MAX_FLY_SPEED = 50
  1253.  
  1254. local canFly = false
  1255. local flyToggled = false
  1256.  
  1257. local forward, side = 0, 0
  1258. local lastForward, lastSide = 0, 0
  1259.  
  1260. local floatBP = Instance.new("BodyPosition")
  1261. floatBP.maxForce = Vector3.new(0, math.huge, 0)
  1262. local flyBV = Instance.new("BodyVelocity")
  1263. flyBV.maxForce = Vector3.new(9e9, 9e9, 9e9)
  1264. local turnBG = Instance.new("BodyGyro")
  1265. turnBG.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  1266. mouse.KeyDown:connect(function(key)
  1267. keysDown[key] = true
  1268.  
  1269. if key == "f" then
  1270. flyToggled = not flyToggled
  1271.  
  1272. if not flyToggled then
  1273. floatBP.Parent = nil
  1274. flyBV.Parent = nil
  1275. turnBG.Parent = nil
  1276. pchar.Torso.Velocity = Vector3.new()
  1277. pchar.Humanoid.PlatformStand = false
  1278. end
  1279. end
  1280.  
  1281. end)
  1282. mouse.KeyUp:connect(function(key)
  1283. keysDown[key] = nil
  1284. end)
  1285. local function updateFly()
  1286.  
  1287. if not flyToggled then return end
  1288.  
  1289. lastForward = forward
  1290. lastSide = side
  1291.  
  1292. forward = 0
  1293. side = 0
  1294.  
  1295. if keysDown.w then
  1296. forward = forward + 1
  1297. end
  1298. if keysDown.s then
  1299. forward = forward - 1
  1300. end
  1301. if keysDown.a then
  1302. side = side - 1
  1303. end
  1304. if keysDown.d then
  1305. side = side + 1
  1306. end
  1307.  
  1308. canFly = (forward ~= 0 or side ~= 0)
  1309.  
  1310. if canFly then
  1311. turnBG.Parent = pchar.Torso
  1312. floatBP.Parent = nil
  1313. flyBV.Parent = pchar.Torso
  1314.  
  1315. flySpeed = flySpeed + 1 + (flySpeed / MAX_FLY_SPEED)
  1316. if flySpeed > MAX_FLY_SPEED then flySpeed = MAX_FLY_SPEED end
  1317. else
  1318. floatBP.position = pchar.Torso.Position
  1319. floatBP.Parent = pchar.Torso
  1320.  
  1321. flySpeed = flySpeed - 1
  1322. if flySpeed < 0 then flySpeed = 0 end
  1323. end
  1324.  
  1325. local camCF = cam.CoordinateFrame
  1326. local in_forward = canFly and forward or lastForward
  1327. local in_side = canFly and side or lastSide
  1328.  
  1329. flyBV.velocity = ((camCF.lookVector * in_forward) + (camCF * CFrame.new(in_side,
  1330. in_forward * 0.2, 0).p) - camCF.p) * flySpeed
  1331.  
  1332. turnBG.cframe = camCF * CFrame.Angles(-rad(forward * (flySpeed / MAX_FLY_SPEED)), 0,
  1333. 0)
  1334. end
  1335.  
  1336. game:service'RunService'.RenderStepped:connect(function()
  1337. if flyToggled then
  1338. pchar.Humanoid.PlatformStand = true
  1339. end
  1340. updateFly()
  1341. end)
  1342. ----------------------------------------------------
  1343. mouse.KeyDown:connect(function(key)
  1344. if key == "e" then
  1345. for i,v in pairs(game.Players:getPlayers()) do
  1346. if v.Name~=char.Name then
  1347. for j,k in pairs(v.Character:GetChildren()) do
  1348. if k:IsA("BasePart") and k.Transparency <= 1 then
  1349. Chakra=Instance.new("SelectionBox",cam)
  1350. Chakra.Color = BrickColor.new("Really blue")
  1351. Chakra.Transparency = .5
  1352. Chakra.Adornee = k
  1353. end
  1354. end
  1355. end
  1356. end
  1357. end
  1358. end)
  1359. ----------------------------------------------------
  1360. mouse.KeyUp:connect(function(key)
  1361. if key == "e" then
  1362. for i, v in pairs(cam:children()) do
  1363. if v:IsA("SelectionBox") then
  1364. v:Destroy()
  1365. end
  1366. end
  1367. end
  1368. end)
  1369. local plrs=game:service"Players"
  1370. local p=plrs.LocalPlayer
  1371. local lam=char["Left Arm"]
  1372. local ram=char["Right Arm"]
  1373. local llg=char["Left Leg"]
  1374. local rlg=char["Right Leg"]
  1375. local hed=char.Head
  1376. local tor=char.Torso
  1377. local Cn=CFrame.new
  1378. local CA=CFrame.Angles
  1379. local hrp=char.HumanoidRootPart
  1380. local mr=math.rad
  1381. local mc=math.cos
  1382. local Vn=Vector3.new
  1383. local wrk=game:service"Workspace"
  1384. local deb=game:service"Debris"
  1385. function nwWld(wp0,wp1,wc0)
  1386. wld = Instance.new("Weld",wp1)
  1387. wld.Part0=wp0
  1388. wld.Part1=wp1
  1389. wld.C0=wc0
  1390. return wld
  1391. end
  1392. function FndHm(flnm)
  1393. for i,v in pairs(flnm:GetChildren()) do
  1394. if v:IsA("Humanoid") then
  1395. return v
  1396. end
  1397. end
  1398. end
  1399. local hum=FndHm(char)
  1400. function get(a)
  1401. local cont={}
  1402. for i,v in pairs(a:GetChildren()) do
  1403. if v==char then
  1404. else
  1405. table.insert(cont,v)
  1406. pcall(function()
  1407. for _,b in pairs(get(v)) do
  1408. table.insert(cont,b)
  1409. end
  1410. end)
  1411. end
  1412. end
  1413. return cont
  1414. end
  1415.  
  1416. --
  1417. function inT(qur,tbl)
  1418. local a=false
  1419. for i,v in pairs(tbl) do
  1420. if v==qur then
  1421. a=true
  1422. break
  1423. else
  1424. a=false
  1425. end
  1426. end
  1427. return a
  1428. end
  1429. function nwPrt(prnt,siz,cf,col)
  1430. local prt=Instance.new("Part")
  1431. prt.Parent=prnt
  1432. prt.FormFactor=3
  1433. prt.Name="Part"
  1434. prt.Size=siz
  1435. prt.CanCollide=false
  1436. prt.Anchored=true
  1437. prt.Locked=true
  1438. prt.TopSurface=0
  1439. prt.BottomSurface=0
  1440. prt:BreakJoints()
  1441. prt.CFrame=cf or CFrame.new(30,10,30)
  1442. prt.Material="SmoothPlastic"
  1443. prt.BrickColor=BrickColor.new(col)
  1444. m=Instance.new("SpecialMesh",prt)
  1445. m.MeshType=6
  1446. return prt
  1447. end
  1448. function newRay(start,face,range,wat)
  1449. local rey=Ray.new(start.p,(face.p-start.p).Unit*range)
  1450. hit,pos=Workspace:FindPartOnRayWithIgnoreList(rey,wat)
  1451. return rey,hit,pos
  1452. end
  1453. function ChakraBeam()
  1454. attack=true
  1455. local sine = 0
  1456. local change = 1
  1457. for i = 0,1,0.005 do
  1458. sine = sine + change
  1459. swait()
  1460. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1461. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1462. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-50),math.rad(0),math.rad(0)),.05)
  1463. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(0)),.05)
  1464. PoleWeld.C0=clerp(PoleWeld.C0,cf(0,-1,-1)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1465. SphereWeld.C1=clerp(SphereWeld.C1,cf(3,0-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1466. Sphere2Weld.C1=clerp(Sphere2Weld.C1,cf(-3,0-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1467. Sphere3Weld.C1=clerp(Sphere3Weld.C1,cf(-2,-2-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1468. Sphere4Weld.C1=clerp(Sphere4Weld.C1,cf(2,-2-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1469. Sphere5Weld.C1=clerp(Sphere5Weld.C1,cf(0,-4-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1470. end
  1471. local int=0
  1472. local cho=nwPrt(char,Vn(3,3,3),lam.CFrame*Cn(0,-0.7,0),"Really black")
  1473. cho.Transparency=0.2
  1474. cho.Reflectance=0.1
  1475. cho.Mesh.MeshType=3
  1476. deb:AddItem(cho,20)
  1477. local lfx1=nwPrt(char,Vn(1,1,1),cho.CFrame,"Really black")
  1478. lfx1.Transparency=1
  1479. lfx1.Mesh.MeshId="rbxassetid://9982590"
  1480. lfx1.Mesh.Scale=Vn(2,2,2)
  1481. deb:AddItem(lfx1,20)
  1482. local lfx2=nwPrt(char,Vn(1,1,1),cho.CFrame,"Really black")
  1483. lfx2.Transparency=1
  1484. lfx2.Mesh.MeshType=3
  1485. lfx2.Mesh.Scale=Vn(4,4,4)
  1486. deb:AddItem(lfx2,20)
  1487. local bem=nwPrt(wrk,Vn(0.2,cho.Size.X,cho.Size.X),cho.CFrame,"Really black")
  1488. bem.Name="Bem"
  1489. bem.Transparency=0.2
  1490. bem.Reflectance=0.1
  1491. bem.Mesh.MeshType=4
  1492. deb:AddItem(bem,8)
  1493. local ent=0
  1494. local unt=0
  1495. local ant=0
  1496. local ryt={bem}
  1497. for _,v in pairs(plrs:GetChildren()) do
  1498. pcall(function()
  1499. table.insert(ryt,v.Character)
  1500. end)
  1501. end
  1502. for i=1,300,4 do
  1503. ent=ent+1
  1504. int=int+1
  1505. unt=unt+1
  1506. if ent==2 then
  1507. local htd={char,bem}
  1508. local function het(ofs)
  1509. con1=bem.Touched:connect(function(hit) Damagefunc(hit,10,20,math.random(20,40),"Normal",RootPart,.2,1) end)
  1510. local r1,h1,p1=newRay(bem.CFrame*ofs*Cn(-bem.Size.X/2,0,0),cho.CFrame,bem.Size.X+1,htd)
  1511. if h1~=nil and h1.Parent~=nil then
  1512. if h1.Parent:IsA("Model") then
  1513. pcall(function()
  1514. local ht=h1.Parent
  1515. FndHm(ht).Health=FndHm(ht).Health-4
  1516. coroutine.wrap(function()
  1517. local bv=Instance.new("BodyVelocity",ht:FindFirstChild("Torso"))
  1518. bv.maxForce=Vn(math.huge,math.huge,math.huge)
  1519. local hrpasd=hrp.CFrame
  1520. bv.velocity=hrpasd.lookVector
  1521. wait(0.1)
  1522. bv:Destroy()
  1523. end)()
  1524. table.insert(htd,ht)
  1525. het(ofs)
  1526. end)
  1527. if FndHm(h1.Parent)==nil then
  1528. table.insert(htd,h1)
  1529. het(ofs)
  1530. end
  1531. end
  1532. end
  1533. end
  1534. het(Cn(0,1,0))
  1535. het(Cn(0,0,1))
  1536. het(Cn(0,-1,0))
  1537. het(Cn(0,0,-1))
  1538. ent=0
  1539. end
  1540. if unt==8 then
  1541. local fx1=nwPrt(wrk,Vn(0.2,1,1),bem.CFrame*Cn(-bem.Size.X/2,0,0)*CA(0,0,mr(90)),"Really black")
  1542. fx1.Mesh.MeshId="rbxassetid://20329976"
  1543. fx1.Mesh.Scale=Vn(bem.Size.Y,bem.Size.Y,bem.Size.Y)
  1544. deb:AddItem(fx1,1)
  1545. fx1.Transparency=0.6
  1546. table.insert(ryt,fx1)
  1547. local fx2=nwPrt(wrk,Vn(0.2,1,1),bem.CFrame*Cn(bem.Size.X/2,0,0)*CA(0,0,mr(90)),"Really black")
  1548. fx2.Mesh.MeshId="rbxassetid://20329976"
  1549. fx2.Mesh.Scale=Vn(bem.Size.Y,bem.Size.Y,bem.Size.Y)
  1550. deb:AddItem(fx2,1)
  1551. fx2.Transparency=0.6
  1552. table.insert(ryt,fx2)
  1553. coroutine.wrap(function()
  1554. for i=0.8,1,0.02 do
  1555. fx1.Transparency=i
  1556. local fx1s=fx1.Mesh.Scale
  1557. fx1.Mesh.Scale=Vn(fx1s.X+0.2,fx1s.Y+0.2,fx1s.Z+0.2)
  1558. fx2.Transparency=i
  1559. local fx2s=fx2.Mesh.Scale
  1560. fx2.Mesh.Scale=Vn(fx2s.X+0.2,fx2s.Y+0.2,fx2s.Z+0.2)
  1561. wait()
  1562. end
  1563. fx1:Destroy()
  1564. fx2:Destroy()
  1565. end)()
  1566. unt=0
  1567. end
  1568. local function chk()
  1569. local r2,h2,p2=newRay(bem.CFrame*Cn(-bem.Size.X/2,0,0),cho.CFrame,bem.Size.X,ryt)
  1570. if h2~=nil then
  1571. if h2.Parent~=nil then
  1572. if FndHm(h2.Parent)==nil then
  1573. bem.Size=Vn(((bem.CFrame*Cn(-bem.Size.X/2,0,0)).p-p2).magnitude,bem.Size.Y,bem.Size.Z)
  1574. if h2.Name=="Bem" and unt==7 then
  1575. local p1=nwPrt(bem,Vn(1,5,5),bem.CFrame*Cn(bem.Size.X/2-2,0,0)*CA(0,mr(90),0),"Bright blue")
  1576. p1.Anchored=true
  1577. p1.Transparency=0.6
  1578. local m1=p1.Mesh
  1579. m1.MeshId="rbxassetid://3270017"
  1580. local p2=nwPrt(bem,Vn(1,5,5),bem.CFrame*Cn(bem.Size.X/2-2,0,0)*CA(0,mr(90),0),"Bright blue")
  1581. p2.Anchored=true
  1582. p2.Transparency=0.6
  1583. local m2=p2.Mesh
  1584. m2.MeshId="rbxassetid://3270017"
  1585. m2.Scale=Vector3.new(0.1,0.1,0.1)
  1586. local p3=nwPrt(bem,Vn(1,5,5),bem.CFrame*Cn(bem.Size.X/2-2,0,0)*CA(0,mr(90),0),"Bright blue")
  1587. p3.Anchored=true
  1588. p3.Transparency=0.6
  1589. local m3=p3.Mesh
  1590. m3.MeshId="rbxassetid://3270017"
  1591. m3.Scale=Vector3.new(2,2,2)
  1592. deb:AddItem(p1,5)
  1593. deb:AddItem(p2,5)
  1594. deb:AddItem(p3,5)
  1595. coroutine.wrap(function()
  1596. for i=1,200 do
  1597. m1.Scale=Vector3.new(m1.Scale.X+1,m1.Scale.Y+1,m1.Scale.Z+0.5)
  1598. m2.Scale=Vector3.new(m2.Scale.X+1.25,m2.Scale.Y+1.25,m2.Scale.Z+0.5)
  1599. m3.Scale=Vector3.new(m3.Scale.X+0.75,m3.Scale.Y+0.75,m3.Scale.Z+0.5)
  1600. p1.Transparency=p1.Transparency+0.03
  1601. p2.Transparency=p2.Transparency+0.035
  1602. p3.Transparency=p3.Transparency+0.025
  1603. wait()
  1604. end
  1605. end)()
  1606. end
  1607. else
  1608. table.insert(ryt,h2.Parent)
  1609. chk()
  1610. end
  1611. end
  1612. else
  1613. bem.Size=Vn(bem.Size.X+4,bem.Size.Y,bem.Size.Z)
  1614. end
  1615. end
  1616. chk()
  1617. bem.CFrame=hrp.CFrame*Cn(-1.5,0.3,-1.2-bem.Size.X/2)*CA(0,mr(90),0)
  1618. lfx1.Mesh.Scale=Vn(2+(1*mc(int/18)),2+(1*mc(int/18)),2+(1*mc(int/18)))
  1619. lfx2.Mesh.Scale=Vn(4+(3*mc(int/18)),4+(3*mc(int/18)),4+(3*mc(int/18)))
  1620. lfx1.CFrame=cho.CFrame*CA(mr(10*mc(int/20)),mr(10*mc(int/20)),mr(10*mc(int/20)))
  1621. lfx2.CFrame=cho.CFrame*CA(mr(10*mc(int/18)),mr(10*mc(int/18)),mr(10*mc(int/18)))
  1622. wait()
  1623. end
  1624. pcall(function()
  1625. bem:Destroy()
  1626. cho:Destroy()
  1627. lfx1:Destroy()
  1628. lfx2:Destroy()
  1629. end)
  1630. attack=false
  1631. con1:disconnect()
  1632. end
  1633. function fadein(part)
  1634. part.Transparency=1
  1635. for i=1,100 do
  1636. wait()
  1637. part.Transparency = part.Transparency - 0.01
  1638. end
  1639. end
  1640.  
  1641. function ChakraBall()
  1642. attack=true
  1643. local sine = 0
  1644. local change = 1
  1645. for i = 0,1,0.005 do
  1646. sine = sine + change
  1647. swait()
  1648. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1649. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1650. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-50),math.rad(0),math.rad(0)),.05)
  1651. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(0)),.05)
  1652. PoleWeld.C0=clerp(PoleWeld.C0,cf(0,-1,-1)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1653. SphereWeld.C1=clerp(SphereWeld.C1,cf(3,0-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1654. Sphere2Weld.C1=clerp(Sphere2Weld.C1,cf(-3,0-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1655. Sphere3Weld.C1=clerp(Sphere3Weld.C1,cf(-2,-2-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1656. Sphere4Weld.C1=clerp(Sphere4Weld.C1,cf(2,-2-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1657. Sphere5Weld.C1=clerp(Sphere5Weld.C1,cf(0,-4-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1658. end
  1659. FireBall=Instance.new('Part',Workspace)
  1660. FireBall.Size=Vector3.new(3,3,3)
  1661. FireBall.BrickColor=BrickColor.new("Really black")
  1662. FireBall.CanCollide = True
  1663. FireBall.TopSurface = "Smooth"
  1664. FireBall.BottomSurface = "Smooth"
  1665. FireBall.Position=torso.Position+torso.CFrame.lookVector*20
  1666. FireBall.Transparency = 0
  1667. FireBall.Reflectance = 0.3
  1668. FireBall:BreakJoints()
  1669. FireBallMesh = Instance.new("SpecialMesh", FireBall)
  1670. FireBallMesh.MeshType = "Sphere"
  1671. FireBallMesh.Scale = Vector3.new(1,1,1)
  1672. Shooter = Instance.new('BodyVelocity',FireBall)
  1673. Shooter.maxForce = Vector3.new()*math.huge
  1674. Shooter.velocity = torso.CFrame.lookVector*100
  1675. con1=FireBall.Touched:connect(function(hit) Damagefunc(hit,10,20,math.random(20,40),"Normal",RootPart,.2,1) end)
  1676. wait(5)
  1677. FireBall:Destroy()
  1678. con1:disconnect()
  1679. attack=false
  1680. end
  1681. function InfiniteTsukyomi()
  1682. attack = true
  1683. for i = 0,1,0.005 do
  1684. swait()
  1685. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,100)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1686. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  1687. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(-50)),.05)
  1688. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(50)),.05)
  1689. PoleWeld.C0=clerp(PoleWeld.C0,cf(0,10,0)*angles(math.rad(20),math.rad(100),math.rad(40)),.05)
  1690. end
  1691. Head.face.Texture = "http://www.roblox.com/asset?id=159181532"
  1692. game.Lighting.TimeOfDay = "07:00:00"
  1693. game.Lighting.Ambient = Color3.new(0,0,0)
  1694. sky = Instance.new("Sky")
  1695. sky.Parent = game.Lighting
  1696. sky.SkyboxBk = "http://www.roblox.com/asset/?id=22079760"
  1697. sky.SkyboxDn = "http://www.roblox.com/asset/?id=22079760"
  1698. sky.SkyboxFt = "http://www.roblox.com/asset/?id=22079760"
  1699. sky.SkyboxLf = "http://www.roblox.com/asset/?id=22079760"
  1700. sky.SkyboxRt = "http://www.roblox.com/asset/?id=22079760"
  1701. sky.SkyboxUp = "http://www.roblox.com/asset/?id=22079760"
  1702. attack=false
  1703. end
  1704.  
  1705. attacktype=1
  1706. mouse.Button1Down:connect(function()
  1707. if attacktype == 1 then
  1708. print("You can't attack with your staff yet!")
  1709. end
  1710. end)
  1711.  
  1712. colours = {"Tr. Red","Black","Tr. Blue","Black","Phosph. White","Royal purple"}
  1713. mouse.KeyDown:connect(function(k)
  1714. k:lower()
  1715. if k=="r" and attack == false then
  1716. ChakraBeam()
  1717. end
  1718. if k=="q" and attack == false then
  1719. ChakraBall()
  1720. end
  1721. if k=="p" and attack == false then
  1722. InfiniteTsukyomi()
  1723. end
  1724. if k==" " and attack == false then
  1725. Humanoid.Jump = false
  1726. Torso.Velocity = Vector3.new(0,100,0)
  1727. end
  1728. end)
  1729. function Tween(a,b,c)
  1730. return a+(b-a)*c
  1731. end
  1732.  
  1733. --
  1734. function Avg(a,b)
  1735. return CFrame.new((a.X+b.X)/2,(a.Y+b.Y)/2,(a.Z+b.Z)/2)
  1736. end
  1737.  
  1738. --
  1739. function Lerp(c1,c2,tim)
  1740. local com1={c1.C0.X,c1.C0.Y,c1.C0.Z,c1.C0:toEulerAnglesXYZ()}
  1741. local com2={c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  1742. for i,v in pairs(com1) do
  1743. com1[i]=v+(com2[i]-v)*tim
  1744. end
  1745. return Cn(com1[1],com1[2],com1[3])*CA(select(4,unpack(com1)))
  1746. end
  1747. hld=false
  1748. mouse.KeyDown:connect(function(key)
  1749. key:lower()
  1750. if key == "t" and attack == false then
  1751. attack = true
  1752. hld=true
  1753. for i = 0,1,0.005 do
  1754. swait()
  1755. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.03)
  1756. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),.03)
  1757. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(-50)),.03)
  1758. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(50)),.03)
  1759. PoleWeld.C0=clerp(PoleWeld.C0,cf(10,0,0)*angles(math.rad(100),math.rad(10),math.rad(40)),.03)
  1760. end
  1761. local cho=nwPrt(char,Vn(1,1,1),ram.CFrame*Cn(0,-0.7,0),"Really black")
  1762. cho.Transparency=0.2
  1763. cho.Reflectance=0.1
  1764. cho.Mesh.MeshType=3
  1765. deb:AddItem(cho,20)
  1766. local lfx1=nwPrt(char,Vn(1,1,1),cho.CFrame,"Really black")
  1767. lfx1.Transparency=0.985
  1768. lfx1.Mesh.MeshId="rbxassetid://9982590"
  1769. lfx1.Mesh.Scale=Vn(2,2,2)
  1770. deb:AddItem(lfx1,20)
  1771. local lfx2=nwPrt(char,Vn(1,1,1),cho.CFrame,"Really black")
  1772. lfx2.Transparency=0.9
  1773. lfx2.Mesh.MeshType=3
  1774. lfx2.Mesh.Scale=Vn(4,4,4)
  1775. deb:AddItem(lfx2,20)
  1776. local int=0
  1777. while hld==true do
  1778. int=int+1
  1779. if cho.Size.X<30 then
  1780. local chs=cho.Size
  1781. cho.Size=Vn(chs.X+0.01,chs.Y+0.01,chs.Z+0.01)
  1782. cho.CFrame=ram.CFrame*Cn(0,-1.4,0)
  1783. else
  1784. cho.CFrame=ram.CFrame*Cn(0,-1.4,0)
  1785. end
  1786. cho.Mesh.Scale=Vn(1+(0.05*mc(int/6)),1+(0.05*mc(int/6)),1+(0.05*mc(int/6)))
  1787. lfx1.Mesh.Scale=Vn(2+(1*mc(int/18)),2+(1*mc(int/18)),2+(1*mc(int/18)))
  1788. lfx2.Mesh.Scale=Vn(4+(3*mc(int/18)),4+(3*mc(int/18)),4+(3*mc(int/18)))
  1789. lfx1.CFrame=cho.CFrame*CA(mr(10*mc(int/20)),mr(10*mc(int/20)),mr(10*mc(int/20)))
  1790. lfx2.CFrame=cho.CFrame*CA(mr(10*mc(int/18)),mr(10*mc(int/18)),mr(10*mc(int/18)))
  1791. if int>300 then
  1792. hld=false
  1793. end
  1794. wait()
  1795. end
  1796. for i=1,6 do
  1797. int=int+1
  1798. cho.CFrame=ram.CFrame*Cn(-0.2,-1.4,0)
  1799. lfx1.Mesh.Scale=Vn(2+(1*mc(int/18)),2+(1*mc(int/18)),2+(1*mc(int/18)))
  1800. lfx2.Mesh.Scale=Vn(4+(3*mc(int/18)),4+(3*mc(int/18)),4+(3*mc(int/18)))
  1801. lfx1.CFrame=cho.CFrame*CA(mr(10*mc(int/20)),mr(10*mc(int/20)),mr(10*mc(int/20)))
  1802. lfx2.CFrame=cho.CFrame
  1803. wait()
  1804. end
  1805. local bem=nwPrt(wrk,Vn(0.2,cho.Size.X,cho.Size.X),hrp.CFrame*Cn(0,0.3,-1.4)*CA(0,mr(90),0),"Really black")
  1806. bem.Name="Bem"
  1807. bem.Transparency=0.2
  1808. bem.Reflectance=0.1
  1809. bem.Mesh.MeshType=4
  1810. deb:AddItem(bem,8)
  1811. local ent=0
  1812. local unt=0
  1813. local ant=0
  1814. local ryt={bem}
  1815. for _,v in pairs(plrs:GetChildren()) do
  1816. pcall(function()
  1817. table.insert(ryt,v.Character)
  1818. end)
  1819. end
  1820. for i=1,850,4 do
  1821. ent=ent+1
  1822. int=int+1
  1823. unt=unt+1
  1824. if ent==2 then
  1825. local htd={char,bem}--This is the table
  1826. local function het(ofs)
  1827. local r1,h1,p1=newRay(bem.CFrame*ofs*Cn(-bem.Size.X/2,0,0),bem.CFrame*ofs*Cn(1,0,0),bem.Size.X+1,htd)--The end variable is the table
  1828. if h1~=nil and h1.Parent~=nil then
  1829. if h1.Parent:IsA("Model") then
  1830. pcall(function()
  1831. local ht=h1.Parent
  1832. FndHm(ht).Health=FndHm(ht).Health-(cho.Size.X)
  1833. coroutine.wrap(function()
  1834. local bv=Instance.new("BodyVelocity",ht:FindFirstChild("Torso"))
  1835. bv.maxForce=Vn(math.huge,math.huge,math.huge)
  1836. local hrpasd=hrp.CFrame
  1837. bv.velocity=hrpasd.lookVector * 100
  1838. wait(0.1)
  1839. bv:Destroy()
  1840. end)()
  1841. table.insert(htd,ht)
  1842. het(ofs)
  1843. end)
  1844. if FndHm(h1.Parent)==nil then
  1845. table.insert(htd,h1)
  1846. het(ofs)
  1847. end
  1848. end
  1849. end
  1850. end
  1851. het(Cn(0,1,0))
  1852. het(Cn(0,0,1))
  1853. het(Cn(0,-1,0))
  1854. het(Cn(0,0,-1))
  1855. ent=0
  1856. end
  1857. if unt==44 then
  1858. local fx1=nwPrt(wrk,Vn(0.2,1,1),bem.CFrame*Cn(-bem.Size.X/2,0,0)*CA(0,0,mr(90)),"Really black")
  1859. fx1.Mesh.MeshId="rbxassetid://20329976"
  1860. fx1.Mesh.Scale=Vn(bem.Size.Y,bem.Size.Y,bem.Size.Y)
  1861. deb:AddItem(fx1,1)
  1862. fx1.Transparency=0.6
  1863. table.insert(ryt,fx1)
  1864. local fx2=nwPrt(wrk,Vn(0.2,1,1),bem.CFrame*Cn(bem.Size.X/2,0,0)*CA(0,0,mr(90)),"Really black")
  1865. fx2.Mesh.MeshId="rbxassetid://20329976"
  1866. fx2.Mesh.Scale=Vn(bem.Size.Y,bem.Size.Y,bem.Size.Y)
  1867. deb:AddItem(fx2,1)
  1868. fx2.Transparency=0.6
  1869. table.insert(ryt,fx2)
  1870. coroutine.wrap(function()
  1871. for i=0.8,1,0.02 do
  1872. fx1.Transparency=i
  1873. local fx1s=fx1.Mesh.Scale
  1874. fx1.Mesh.Scale=Vn(fx1s.X+0.2,fx1s.Y+0.2,fx1s.Z+0.2)
  1875. fx2.Transparency=i
  1876. local fx2s=fx2.Mesh.Scale
  1877. fx2.Mesh.Scale=Vn(fx2s.X+0.2,fx2s.Y+0.2,fx2s.Z+0.2)
  1878. wait()
  1879. end
  1880. fx1:Destroy()
  1881. fx2:Destroy()
  1882. end)()
  1883. unt=0
  1884. end
  1885. local function chk()
  1886. local r2,h2,p2=newRay(bem.CFrame*Cn(-bem.Size.X/2,0,0),bem.CFrame*Cn(1,0,0),bem.Size.X,ryt)
  1887. if h2~=nil then
  1888. if h2.Parent~=nil then
  1889. if FndHm(h2.Parent)==nil then
  1890. bem.Size=Vn(((bem.CFrame*Cn(-bem.Size.X/2,0,0)).p-p2).magnitude,bem.Size.Y,bem.Size.Z)
  1891. if h2.Name=="Bem" and unt==7 then
  1892. local p1=nwPrt(bem,Vn(1,5,5),bem.CFrame*Cn(bem.Size.X/2-2,0,0)*CA(0,mr(90),0),"Really black")
  1893. p1.Anchored=true
  1894. p1.Transparency=0.6
  1895. local m1=p1.Mesh
  1896. m1.MeshId="rbxassetid://3270017"
  1897. local p2=nwPrt(bem,Vn(1,5,5),bem.CFrame*Cn(bem.Size.X/2-2,0,0)*CA(0,mr(90),0),"Really black")
  1898. p2.Anchored=true
  1899. p2.Transparency=0.6
  1900. local m2=p2.Mesh
  1901. m2.MeshId="rbxassetid://3270017"
  1902. m2.Scale=Vector3.new(0.1,0.1,0.1)
  1903. local p3=nwPrt(bem,Vn(1,5,5),bem.CFrame*Cn(bem.Size.X/2-2,0,0)*CA(0,mr(90),0),"Really black")
  1904. p3.Anchored=true
  1905. p3.Transparency=0.6
  1906. local m3=p3.Mesh
  1907. m3.MeshId="rbxassetid://3270017"
  1908. m3.Scale=Vector3.new(2,2,2)
  1909. deb:AddItem(p1,5)
  1910. deb:AddItem(p2,5)
  1911. deb:AddItem(p3,5)
  1912. coroutine.wrap(function()
  1913. for i=1,200 do
  1914. m1.Scale=Vector3.new(m1.Scale.X+1,m1.Scale.Y+1,m1.Scale.Z+0.5)
  1915. m2.Scale=Vector3.new(m2.Scale.X+1.25,m2.Scale.Y+1.25,m2.Scale.Z+0.5)
  1916. m3.Scale=Vector3.new(m3.Scale.X+0.75,m3.Scale.Y+0.75,m3.Scale.Z+0.5)
  1917. p1.Transparency=p1.Transparency+0.03
  1918. p2.Transparency=p2.Transparency+0.035
  1919. p3.Transparency=p3.Transparency+0.025
  1920. wait()
  1921. end
  1922. end)()
  1923. end
  1924. else
  1925. table.insert(ryt,h2.Parent)
  1926. chk()
  1927. end
  1928. end
  1929. else
  1930. bem.Size=Vn(bem.Size.X+4,bem.Size.Y,bem.Size.Z)
  1931. end
  1932. end
  1933. chk()
  1934. bem.CFrame=hrp.CFrame*Cn(0,0.3,-1.2-bem.Size.X/2)*CA(0,mr(90),0)
  1935. lfx1.Mesh.Scale=Vn(2+(1*mc(int/18)),2+(1*mc(int/18)),2+(1*mc(int/18)))
  1936. lfx2.Mesh.Scale=Vn(4+(3*mc(int/18)),4+(3*mc(int/18)),4+(3*mc(int/18)))
  1937. lfx1.CFrame=cho.CFrame*CA(mr(10*mc(int/20)),mr(10*mc(int/20)),mr(10*mc(int/20)))
  1938. lfx2.CFrame=cho.CFrame*CA(mr(10*mc(int/18)),mr(10*mc(int/18)),mr(10*mc(int/18)))
  1939. wait()
  1940. end
  1941. pcall(function()
  1942. bem:Destroy()
  1943. cho:Destroy()
  1944. lfx1:Destroy()
  1945. lfx2:Destroy()
  1946. end)
  1947. attack=false
  1948. end
  1949. end)
  1950. mouse.KeyUp:connect(function(key)
  1951. key:lower()
  1952. if key == "t" then
  1953. hld=false
  1954. end
  1955. end)
  1956. mouse.KeyDown:connect(function(key)
  1957. key:lower()
  1958. if key:byte() == 48 then
  1959. Humanoid.WalkSpeed=70
  1960. end
  1961. end)
  1962. mouse.KeyUp:connect(function(key)
  1963. key:lower()
  1964. if key:byte() == 48 then
  1965. Humanoid.WalkSpeed=6
  1966. end
  1967. end)
  1968.  
  1969. Humanoid.WalkSpeed=6
  1970. local sine = 0
  1971. local change = 1
  1972. local val = 0
  1973. --game:GetService("RunService").Heartbeat:connect(function()
  1974. while true do
  1975. swait()
  1976. sine = sine + change
  1977. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1978. local velderp=RootPart.Velocity.y
  1979. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1980. if equipped==true or equipped==false then
  1981. if attack==false then
  1982. idle=idle+1
  1983. else
  1984. idle=0
  1985. end
  1986. if idle>=500 then
  1987. if attack==false then
  1988. --Sheath()
  1989. end
  1990. end
  1991. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1992. Anim="Jump"
  1993. if attack==false then
  1994. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  1995. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  1996. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-50),math.rad(-100),math.rad(30)),.3)
  1997. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-50),math.rad(100),math.rad(-30)),.3)
  1998. lleg.Weld.C0=clerp(lleg.Weld.C0,cf(-0.5,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1999. rleg.Weld.C0=clerp(rleg.Weld.C0,cf(0.5,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  2000. PoleWeld.C0 =clerp(PoleWeld.C0,CFrame.new(0,-1,-0.65)*CFrame.Angles(math.rad(-90),math.rad(90),0),.05)
  2001. end
  2002. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  2003. Anim="Fall"
  2004. if attack==false then
  2005. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  2006. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  2007. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-50),math.rad(-100),math.rad(30)),.3)
  2008. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-50),math.rad(100),math.rad(-30)),.3)
  2009. lleg.Weld.C0=clerp(lleg.Weld.C0,cf(-0.5,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  2010. rleg.Weld.C0=clerp(rleg.Weld.C0,cf(0.5,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  2011. PoleWeld.C0 =clerp(PoleWeld.C0,CFrame.new(0,-1,-0.65)*CFrame.Angles(math.rad(-90),math.rad(90),0),.05)
  2012. end
  2013. elseif torvel<1 and hitfloor~=nil then
  2014. Anim="Idle"
  2015. if attack==false then
  2016. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,1-0.14*math.cos(sine/14))*angles(math.rad(0),math.rad(0),math.rad(20)),.05)
  2017. SphereWeld.C1=clerp(SphereWeld.C1,cf(3,0-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  2018. Sphere2Weld.C1=clerp(Sphere2Weld.C1,cf(-3,0-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  2019. Sphere3Weld.C1=clerp(Sphere3Weld.C1,cf(-2,-2-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  2020. Sphere4Weld.C1=clerp(Sphere4Weld.C1,cf(2,-2-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  2021. Sphere5Weld.C1=clerp(Sphere5Weld.C1,cf(0,-4-0.14*math.cos(-sine/14),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  2022. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(-20)),.05)
  2023. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(20)),.05)
  2024. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(0),math.rad(-10)),.05)
  2025. lleg.Weld.C0=clerp(lleg.Weld.C0,cf(-0.5,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  2026. rleg.Weld.C0=clerp(rleg.Weld.C0,cf(0.5,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  2027. PoleWeld.C0 =clerp(PoleWeld.C0,CFrame.new(0,-1,-0.65)*CFrame.Angles(math.rad(-90),math.rad(90),0),.05)
  2028. end
  2029. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  2030. Anim="Walk"
  2031. if attack==false then
  2032. change=3
  2033. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,1-0.14*math.cos(sine/14))*angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  2034. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  2035. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-20),math.rad(0),math.rad(10)),.3)
  2036. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-20),math.rad(0),math.rad(-10)),.3)
  2037. lleg.Weld.C0=clerp(lleg.Weld.C0,cf(-0.5,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  2038. rleg.Weld.C0=clerp(rleg.Weld.C0,cf(0.5,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  2039. PoleWeld.C0 =clerp(PoleWeld.C0,CFrame.new(0,-1,-0.65)*CFrame.Angles(math.rad(-90),math.rad(90),0),.05)
  2040. end
  2041. elseif torvel>=22 and hitfloor~=nil then
  2042. Anim="Run"
  2043. if attack==false then
  2044. change=5
  2045. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,1-0.14*math.cos(sine/14))*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  2046. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  2047. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-20),math.rad(-100),math.rad(30)),.3)
  2048. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-20),math.rad(100),math.rad(-30)),.3)
  2049. lleg.Weld.C0=clerp(lleg.Weld.C0,cf(-0.5,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  2050. rleg.Weld.C0=clerp(rleg.Weld.C0,cf(0.5,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  2051. PoleWeld.C0 =clerp(PoleWeld.C0,CFrame.new(0,-1,-0.65)*CFrame.Angles(math.rad(-90),math.rad(90),0),.05)
  2052. end
  2053. end
  2054. end
  2055. end
  2056. --end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement