sneakydodge123

dj

Oct 11th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.69 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145.  
  146. ChangeClothes=function(p)
  147. wait(2) -- Wait for character to load
  148. p.CharacterAdded:wait() --
  149. for _,v in next, p.Character:GetChildren() do
  150. if v:IsA"Shirt" then
  151. v.ShirtTemplate="http://www.roblox.com/asset/?id=717278466";
  152. elseif v:IsA"Pants" then
  153. v.PantsTemplate="http://www.roblox.com/asset/?id=344534684";
  154. end
  155. end
  156. end
  157.  
  158. game:service'Players'.PlayerAdded:connect(ChangeClothes)
  159.  
  160.  
  161. wait(1 / 60)
  162. -- Trail Made by Gallizur
  163. --R15 Compatible in TrailSettings
  164. local Player = game:GetService('Players').LocalPlayer
  165. repeat wait() until Player.Character
  166. local Character = Player.Character
  167.  
  168. --All The Settings for Trails in this Script
  169. TrailSettings = {
  170. Lifetime = 0.5,
  171. Texture = 'rbxassetid://31270182',
  172. --Color1 is for UpperBody and Accessories, Color2 is for Lower Body
  173. Color1 = ColorSequence.new(BrickColor.new('Toothpaste').Color,BrickColor.new('Cyan').Color),
  174. Color2 = ColorSequence.new(BrickColor.new('Institutional white').Color,BrickColor.new('New Yeller').Color),
  175. AllBody = true,
  176. UpperBodyOnly = false,
  177. LowerBodyOnly = false,
  178. Accessories = false,
  179. Extras = true,
  180. R15 = false, --Change to true if you're using R15
  181. R15Parts = {
  182. 'UpperTorso',
  183. 'LowerTorso',
  184. }
  185. }
  186.  
  187. local Trail; --Making other Trails uses this in this Script
  188.  
  189. --UpperBody Function
  190. UpperBody = function()
  191. if TrailSettings.R15 == false then
  192. A0 = Instance.new('Attachment',Character.Torso)
  193. A1 = Instance.new('Attachment',Character.Head)
  194. A2 = Instance.new('Attachment',Character['Right Arm'])
  195. A3 = Instance.new('Attachment',Character['Left Arm'])
  196. Trail = Instance.new('Trail',Character)
  197. Trail.Attachment0 = A0
  198. Trail.Attachment1 = A1
  199. Trail.Texture = TrailSettings.Texture
  200. Trail.Color = TrailSettings.Color1
  201. Trail.Lifetime = TrailSettings.Lifetime
  202. local Trail2 = Trail:Clone()
  203. Trail2.Parent = Character
  204. Trail2.Attachment1 = A2
  205. local Trail3 = Trail:Clone()
  206. Trail3.Parent = Character
  207. Trail3.Attachment1 = A3
  208. local Trail6 = Trail:Clone()
  209. Trail6.Parent = Character
  210. Trail6.Attachment0 = A1
  211. Trail6.Attachment1 = A2
  212. local Trail7 = Trail:Clone()
  213. Trail7.Parent = Character
  214. Trail7.Attachment0 = A1
  215. Trail7.Attachment1 = A3
  216. else
  217. A0 = Instance.new('Attachment',Character[TrailSettings.R15Parts[1]])
  218. A0R = Instance.new('Attachment',Character[TrailSettings.R15Parts[2]])
  219. A1 = Instance.new('Attachment',Character.Head)
  220. A2 = Instance.new('Attachment',Character['RightUpperArm'])
  221. A2R = Instance.new('Attachment',Character['RightLowerArm'])
  222. A3 = Instance.new('Attachment',Character['LeftUpperArm'])
  223. A3R = Instance.new('Attachment',Character['LeftLowerArm'])
  224. Trail = Instance.new('Trail',Character)
  225. Trail.Attachment0 = A0
  226. Trail.Attachment1 = A1
  227. Trail.Texture = TrailSettings.Texture
  228. Trail.Color = TrailSettings.Color1
  229. Trail.Lifetime = TrailSettings.Lifetime
  230. local Trail2 = Trail:Clone()
  231. Trail2.Parent = Character
  232. Trail2.Attachment1 = A2
  233. local Trail3 = Trail:Clone()
  234. Trail3.Parent = Character
  235. Trail3.Attachment1 = A3
  236. local Trail6 = Trail:Clone()
  237. Trail6.Parent = Character
  238. Trail6.Attachment0 = A1
  239. Trail6.Attachment1 = A2
  240. local Trail7 = Trail:Clone()
  241. Trail7.Parent = Character
  242. Trail7.Attachment0 = A1
  243. Trail7.Attachment1 = A3
  244. --R15 Trails
  245. local Trail1R = Trail:Clone()
  246. Trail1R.Parent = Character
  247. Trail1R.Attachment1 = A2R
  248. local Trail2R = Trail:Clone()
  249. Trail2R.Parent = Character
  250. Trail2R.Attachment1 = A3R
  251. local Trail6R = Trail:Clone()
  252. Trail6.Parent = Character
  253. Trail6.Attachment0 = A1
  254. Trail6.Attachment1 = A2R
  255. local Trail7R = Trail:Clone()
  256. Trail7.Parent = Character
  257. Trail7.Attachment0 = A1
  258. Trail7.Attachment1 = A3R
  259. end
  260. end
  261.  
  262. --Lower Body Function
  263. LowerBody = function()
  264. if TrailSettings.R15 == false then
  265. A4 = Instance.new('Attachment',Character['Right Leg'])
  266. A5 = Instance.new('Attachment',Character['Left Leg'])
  267. local Trail4 = Trail:Clone()
  268. Trail4.Parent = Character
  269. Trail4.Attachment1 = A4
  270. local Trail5 = Trail:Clone()
  271. Trail5.Parent = Character
  272. Trail5.Attachment1 = A5
  273. local Trail8 = Trail:Clone()
  274. Trail8.Parent = Character
  275. Trail8.Attachment0 = A2
  276. Trail8.Attachment1 = A4
  277. Trail8.Color = TrailSettings.Color2
  278. local Trail9 = Trail:Clone()
  279. Trail9.Parent = Character
  280. Trail9.Attachment0 = A3
  281. Trail9.Attachment1 = A5
  282. Trail9.Color = TrailSettings.Color2
  283. local FT = Trail:Clone()
  284. FT.Parent = Character
  285. FT.Attachment0 = A4
  286. FT.Attachment1 = A5
  287. FT.Color = TrailSettings.Color2
  288. else
  289. A4 = Instance.new('Attachment',Character['RightLowerLeg'])
  290. A4R = Instance.new('Attachment',Character['RightUpperLeg'])
  291. A5 = Instance.new('Attachment',Character['LeftLowerLeg'])
  292. A5R = Instance.new('Attachment',Character['LeftUpperLeg'])
  293. local Trail4 = Trail:Clone()
  294. Trail4.Parent = Character
  295. Trail4.Attachment1 = A4
  296. local Trail5 = Trail:Clone()
  297. Trail5.Parent = Character
  298. Trail5.Attachment1 = A5
  299. local Trail8 = Trail:Clone()
  300. Trail8.Parent = Character
  301. Trail8.Attachment0 = A2
  302. Trail8.Attachment1 = A4
  303. Trail8.Color = TrailSettings.Color2
  304. local Trail9 = Trail:Clone()
  305. Trail9.Parent = Character
  306. Trail9.Attachment0 = A3
  307. Trail9.Attachment1 = A5
  308. Trail9.Color = TrailSettings.Color2
  309. local FT = Trail:Clone()
  310. FT.Parent = Character
  311. FT.Attachment0 = A4
  312. FT.Attachment1 = A5
  313. FT.Color = TrailSettings.Color2
  314. --R15 Trails
  315. local Trail3R = Trail:Clone()
  316. Trail3R.Parent = Character
  317. Trail3R.Attachment1 = A4R
  318. local Trail4R = Trail:Clone()
  319. Trail4R.Parent = Character
  320. Trail4R.Attachment1 = A5R
  321. local Trail8 = Trail:Clone()
  322. Trail8.Parent = Character
  323. Trail8.Attachment0 = A2R
  324. Trail8.Attachment1 = A4R
  325. Trail8.Color = TrailSettings.Color2
  326. local Trail9 = Trail:Clone()
  327. Trail9.Parent = Character
  328. Trail9.Attachment0 = A3R
  329. Trail9.Attachment1 = A5R
  330. Trail9.Color = TrailSettings.Color2
  331. local FT2R = Trail:Clone()
  332. FT2R.Parent = Character
  333. FT2R.Attachment0 = A4R
  334. FT2R.Attachment1 = A5R
  335. FT2R.Color = TrailSettings.Color2
  336. end
  337. end
  338.  
  339. --All Body Function calling Both Functions
  340. AllBody = function()
  341. UpperBody()
  342. LowerBody()
  343. end
  344.  
  345. --Checking to make sure that Only some Variables are Selected else do All Body
  346. if TrailSettings.AllBody == true and TrailSettings.UpperBodyOnly == true and TrailSettings.LowerBodyOnly == true then
  347. TrailSettings.UpperBodyOnly = false
  348. TrailSettings.LowerBodyOnly = false
  349. elseif TrailSettings.AllBody == true and TrailSettings.UpperBodyOnly == false and TrailSettings.LowerBodyOnly == true then
  350. TrailSettings.UpperBodyOnly = false
  351. TrailSettings.LowerBodyOnly = false
  352. elseif TrailSettings.AllBody == true and TrailSettings.UpperBodyOnly == true and TrailSettings.LowerBodyOnly == false then
  353. TrailSettings.UpperBodyOnly = false
  354. TrailSettings.LowerBodyOnly = false
  355. elseif TrailSettings.AllBody == false and TrailSettings.UpperBodyOnly == true and TrailSettings.LowerBodyOnly == true then
  356. TrailSettings.AllBody = true
  357. TrailSettings.UpperBodyOnly = false
  358. TrailSettings.LowerBodyOnly = false
  359. end
  360.  
  361. --Call Trail Functions
  362. if TrailSettings.UpperBodyOnly == true then
  363. UpperBody()
  364. print('Called Upper Body Trail')
  365. elseif TrailSettings.LowerBodyOnly == true then
  366. LowerBody()
  367. print('Called Lower Body Trail')
  368. elseif TrailSettings.AllBody == true then
  369. AllBody()
  370. print('Called Full Body Trail')
  371. end
  372.  
  373. --Trails for Accessories
  374. if TrailSettings.Accessories == true then
  375. for Index,Item in pairs(Character:GetChildren()) do
  376. if Item:IsA'Accessory' then
  377. local AA = Instance.new('Attachment',Item.Handle)
  378. local ATrail = Trail:Clone()
  379. ATrail.Parent = Character
  380. ATrail.Attachment1 = AA
  381. end
  382. end
  383. end
  384.  
  385. --Extras
  386. if TrailSettings.Extras == true then
  387. --Making an Invisible Platform Part
  388. local a = Instance.new('Part',Character)
  389. a.CanCollide = false
  390. a.Size = Vector3.new(2,.2,2)
  391. a.Transparency = 1
  392.  
  393. --Constantly putting it under your feet
  394. if TrailSettings.R15 == false then
  395. spawn(function()
  396. game:GetService('RunService').RenderStepped:connect(function()
  397. a.CFrame = Character.Torso.CFrame * CFrame.new(0,-3,0)
  398. end)
  399. end)
  400. else
  401. spawn(function()
  402. game:GetService('RunService').RenderStepped:connect(function()
  403. a.CFrame = Character[TrailSettings.R15Parts[2]].CFrame * CFrame.new(0,-2,0)
  404. end)
  405. end)
  406. end
  407.  
  408. --Make a Trail from both feet to the Platform
  409. spawn(function()
  410. repeat wait() until Trail
  411. local AB = Instance.new('Attachment',a)
  412. local ABT = Trail:Clone()
  413. ABT.Parent = Character
  414. ABT.Attachment0 = A4
  415. ABT.Attachment1 = AB
  416. ABT.Color = TrailSettings.Color2
  417. local ABT2 = Trail:Clone()
  418. ABT2.Parent = Character
  419. ABT2.Attachment0 = A5
  420. ABT2.Attachment1 = AB
  421. ABT2.Color = TrailSettings.Color2
  422. end)
  423. end
  424.  
  425. Effects = { }
  426. local Player = game.Players.localPlayer
  427. local Character = Player.Character
  428. local Humanoid = Character.Humanoid
  429. local Mouse = Player:GetMouse()
  430. local LeftArm = Character["Left Arm"]
  431. local RightArm = Character["Right Arm"]
  432. local LeftLeg = Character["Left Leg"]
  433. local RightLeg = Character["Right Leg"]
  434. local Head = Character.Head
  435. local Torso = Character.Torso
  436. local Camera = game.Workspace.CurrentCamera
  437. local RootPart = Character.HumanoidRootPart
  438. local RootJoint = RootPart.RootJoint
  439. local attack = false
  440. local Anim = 'Idle'
  441. local attacktype = 1
  442. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  443. local velocity = RootPart.Velocity.y
  444. local sine = 0
  445. local change = 1
  446. local Create = LoadLibrary("RbxUtility").Create
  447. local sick = Instance.new("Sound",Character.Torso)
  448. sick.SoundId = "rbxassetid://933368565"
  449. sick.Looped = true
  450. sick.Pitch = 1
  451. sick.Volume = 1
  452. sick:Play()
  453.  
  454. local m = Create("Model"){
  455. Parent = Character,
  456. Name = "WeaponModel",
  457. }
  458.  
  459. Humanoid.Animator.Parent = nil
  460. Character.Animate.Parent = nil
  461.  
  462. local newMotor = function(part0, part1, c0, c1)
  463. local w = Create('Motor'){
  464. Parent = part0,
  465. Part0 = part0,
  466. Part1 = part1,
  467. C0 = c0,
  468. C1 = c1,
  469. }
  470. return w
  471. end
  472.  
  473. function clerp(a, b, t)
  474. return a:lerp(b, t)
  475. end
  476.  
  477. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  478. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  479.  
  480. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  481. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  482. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  483. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  484. RootJoint.C1 = CFrame.new(0, 0, 0)
  485. RootJoint.C0 = CFrame.new(0, 0, 0)
  486. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  487. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  488.  
  489. local rarmc1 = RW.C1
  490. local larmc1 = LW.C1
  491. local rlegc1 = RH.C1
  492. local llegc1 = LH.C1
  493.  
  494. local resetc1 = false
  495.  
  496. function PlayAnimationFromTable(table, speed, bool)
  497. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  498. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  499. RW.C0 = clerp(RW.C0, table[3], speed)
  500. LW.C0 = clerp(LW.C0, table[4], speed)
  501. RH.C0 = clerp(RH.C0, table[5], speed)
  502. LH.C0 = clerp(LH.C0, table[6], speed)
  503. if bool == true then
  504. if resetc1 == false then
  505. resetc1 = true
  506. RootJoint.C1 = RootJoint.C1
  507. Torso.Neck.C1 = Torso.Neck.C1
  508. RW.C1 = rarmc1
  509. LW.C1 = larmc1
  510. RH.C1 = rlegc1
  511. LH.C1 = llegc1
  512. end
  513. end
  514. end
  515.  
  516. ArtificialHB = Create("BindableEvent", script){
  517. Parent = script,
  518. Name = "Heartbeat",
  519. }
  520.  
  521. script:WaitForChild("Heartbeat")
  522.  
  523. frame = 1 / 30
  524. tf = 0
  525. allowframeloss = false
  526. tossremainder = false
  527. lastframe = tick()
  528. script.Heartbeat:Fire()
  529.  
  530. game:GetService("RunService").Heartbeat:connect(function(s, p)
  531. tf = tf + s
  532. if tf >= frame then
  533. if allowframeloss then
  534. script.Heartbeat:Fire()
  535. lastframe = tick()
  536. else
  537. for i = 1, math.floor(tf / frame) do
  538. script.Heartbeat:Fire()
  539. end
  540. lastframe = tick()
  541. end
  542. if tossremainder then
  543. tf = 0
  544. else
  545. tf = tf - frame * math.floor(tf / frame)
  546. end
  547. end
  548. end)
  549.  
  550. function swait(num)
  551. if num == 0 or num == nil then
  552. ArtificialHB.Event:wait()
  553. else
  554. for i = 0, num do
  555. ArtificialHB.Event:wait()
  556. end
  557. end
  558. end
  559.  
  560. function RemoveOutlines(part)
  561. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  562. end
  563.  
  564. CFuncs = {
  565. Part = {
  566. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  567. local Part = Create("Part"){
  568. Parent = Parent,
  569. Reflectance = Reflectance,
  570. Transparency = Transparency,
  571. CanCollide = false,
  572. Locked = true,
  573. BrickColor = BrickColor.new(tostring(BColor)),
  574. Name = Name,
  575. Size = Size,
  576. Material = Material,
  577. }
  578. RemoveOutlines(Part)
  579. return Part
  580. end;
  581. };
  582.  
  583. Mesh = {
  584. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  585. local Msh = Create(Mesh){
  586. Parent = Part,
  587. Offset = OffSet,
  588. Scale = Scale,
  589. }
  590. if Mesh == "SpecialMesh" then
  591. Msh.MeshType = MeshType
  592. Msh.MeshId = MeshId
  593. end
  594. return Msh
  595. end;
  596. };
  597.  
  598. Weld = {
  599. Create = function(Parent, Part0, Part1, C0, C1)
  600. local Weld = Create("Weld"){
  601. Parent = Parent,
  602. Part0 = Part0,
  603. Part1 = Part1,
  604. C0 = C0,
  605. C1 = C1,
  606. }
  607. return Weld
  608. end;
  609. };
  610.  
  611. Sound = {
  612. Create = function(id, par, vol, pit)
  613. coroutine.resume(coroutine.create(function()
  614. local Sound = Create("Sound"){
  615. Volume = vol,
  616. Pitch = pit or 1,
  617. SoundId = "rbxassetid://" .. id,
  618. Parent = par or workspace,
  619. }
  620. Sound:play()
  621. game:GetService("Debris"):AddItem(Sound, 10)
  622. end))
  623. end;
  624. };
  625.  
  626. Decal = {
  627. Create = function(Color, Texture, Transparency, Name, Parent)
  628. local Decal = Create("Decal"){
  629. Color3 = Color,
  630. Texture = "rbxassetid://" .. Texture,
  631. Transparency = Transparency,
  632. Name = Name,
  633. Parent = Parent,
  634. }
  635. return Decal
  636. end;
  637. };
  638.  
  639. BillboardGui = {
  640. Create = function(Parent, Image, Position, Size)
  641. local BillPar = CFuncs.Part.Create(Parent, "SmoothPlastic", 0, 1, BrickColor.new("New Yeller"), "BillboardGuiPart", Vector3.new(1, 1, 1))
  642. BillPar.CFrame = CFrame.new(Position)
  643. local Bill = Create("BillboardGui"){
  644. Parent = BillPar,
  645. Adornee = BillPar,
  646. Size = UDim2.new(1, 0, 1, 0),
  647. SizeOffset = Vector2.new(Size, Size),
  648. }
  649. local d = Create("ImageLabel", Bill){
  650. Parent = Bill,
  651. BackgroundTransparency = 1,
  652. Size = UDim2.new(1, 0, 1, 0),
  653. Image = "rbxassetid://" .. Image,
  654. }
  655. return BillPar
  656. end
  657. };
  658.  
  659. ParticleEmitter = {
  660. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  661. local Particle = Create("ParticleEmitter"){
  662. Parent = Parent,
  663. Color = ColorSequence.new(Color1, Color2),
  664. LightEmission = LightEmission,
  665. Size = Size,
  666. Texture = Texture,
  667. Transparency = Transparency,
  668. ZOffset = ZOffset,
  669. Acceleration = Accel,
  670. Drag = Drag,
  671. LockedToPart = LockedToPart,
  672. VelocityInheritance = VelocityInheritance,
  673. EmissionDirection = EmissionDirection,
  674. Enabled = Enabled,
  675. Lifetime = LifeTime,
  676. Rate = Rate,
  677. Rotation = Rotation,
  678. RotSpeed = RotSpeed,
  679. Speed = Speed,
  680. VelocitySpread = VelocitySpread,
  681. }
  682. return Particle
  683. end;
  684. };
  685.  
  686. CreateTemplate = {
  687.  
  688. };
  689. }
  690.  
  691. function rayCast(Position, Direction, Range, Ignore)
  692. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  693. end
  694.  
  695. FindNearestTorso = function(pos)
  696. local list = (game.Workspace:children())
  697. local torso = nil
  698. local dist = 1000
  699. local temp, human, temp2 = nil, nil, nil
  700. for x = 1, #list do
  701. temp2 = list[x]
  702. if temp2.className == "Model" and temp2.Name ~= Character.Name then
  703. temp = temp2:findFirstChild("Torso")
  704. human = temp2:findFirstChild("Humanoid")
  705. if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
  706. local dohit = true
  707. if dohit == true then
  708. torso = temp
  709. dist = (temp.Position - pos).magnitude
  710. end
  711. end
  712. end
  713. end
  714. return torso, dist
  715. end
  716.  
  717. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  718. if hit.Parent == nil then
  719. return
  720. end
  721. local h = hit.Parent:FindFirstChild("Humanoid")
  722. for _, v in pairs(hit.Parent:children()) do
  723. if v:IsA("Humanoid") then
  724. h = v
  725. end
  726. end
  727. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  728. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  729. if hit.Parent.DebounceHit.Value == true then
  730. return
  731. end
  732. end
  733. local c = Create("ObjectValue"){
  734. Name = "creator",
  735. Value = game:service("Players").LocalPlayer,
  736. Parent = h,
  737. }
  738. game:GetService("Debris"):AddItem(c, .5)
  739. if HitSound ~= nil and HitPitch ~= nil then
  740. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  741. end
  742. local Damage = math.random(minim, maxim)
  743. local blocked = false
  744. local block = hit.Parent:findFirstChild("Block")
  745. if block ~= nil then
  746. if block.className == "IntValue" then
  747. if block.Value > 0 then
  748. blocked = true
  749. block.Value = block.Value - 1
  750. print(block.Value)
  751. end
  752. end
  753. end
  754. if blocked == false then
  755. h.Health = h.Health - Damage
  756. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color)
  757. else
  758. h.Health = h.Health - (Damage / 2)
  759. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color)
  760. end
  761. if Type == "Knockdown" then
  762. local hum = hit.Parent.Humanoid
  763. hum.PlatformStand = true
  764. coroutine.resume(coroutine.create(function(HHumanoid)
  765. swait(1)
  766. HHumanoid.PlatformStand = false
  767. end), hum)
  768. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  769. local bodvol = Create("BodyVelocity"){
  770. velocity = angle * knockback,
  771. P = 5000,
  772. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  773. Parent = hit,
  774. }
  775. local rl = Create("BodyAngularVelocity"){
  776. P = 3000,
  777. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  778. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  779. Parent = hit,
  780. }
  781. game:GetService("Debris"):AddItem(bodvol, .5)
  782. game:GetService("Debris"):AddItem(rl, .5)
  783. elseif Type == "Normal" then
  784. local vp = Create("BodyVelocity"){
  785. P = 500,
  786. maxForce = Vector3.new(math.huge, 0, math.huge),
  787. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  788. }
  789. if knockback > 0 then
  790. vp.Parent = hit.Parent.Torso
  791. end
  792. game:GetService("Debris"):AddItem(vp, .5)
  793. elseif Type == "Up" then
  794. local bodyVelocity = Create("BodyVelocity"){
  795. velocity = Vector3.new(0, 20, 0),
  796. P = 5000,
  797. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  798. Parent = hit,
  799. }
  800. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  801. elseif Type == "DarkUp" then
  802. coroutine.resume(coroutine.create(function()
  803. for i = 0, 1, 0.1 do
  804. swait()
  805. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  806. end
  807. end))
  808. local bodyVelocity = Create("BodyVelocity"){
  809. velocity = Vector3.new(0, 20, 0),
  810. P = 5000,
  811. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  812. Parent = hit,
  813. }
  814. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  815. elseif Type == "Snare" then
  816. local bp = Create("BodyPosition"){
  817. P = 2000,
  818. D = 100,
  819. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  820. position = hit.Parent.Torso.Position,
  821. Parent = hit.Parent.Torso,
  822. }
  823. game:GetService("Debris"):AddItem(bp, 1)
  824. elseif Type == "Freeze" then
  825. local BodPos = Create("BodyPosition"){
  826. P = 50000,
  827. D = 1000,
  828. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  829. position = hit.Parent.Torso.Position,
  830. Parent = hit.Parent.Torso,
  831. }
  832. local BodGy = Create("BodyGyro") {
  833. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  834. P = 20e+003,
  835. Parent = hit.Parent.Torso,
  836. cframe = hit.Parent.Torso.CFrame,
  837. }
  838. hit.Parent.Torso.Anchored = true
  839. coroutine.resume(coroutine.create(function(Part)
  840. swait(1.5)
  841. Part.Anchored = false
  842. end), hit.Parent.Torso)
  843. game:GetService("Debris"):AddItem(BodPos, 3)
  844. game:GetService("Debris"):AddItem(BodGy, 3)
  845. end
  846. local debounce = Create("BoolValue"){
  847. Name = "DebounceHit",
  848. Parent = hit.Parent,
  849. Value = true,
  850. }
  851. game:GetService("Debris"):AddItem(debounce, Delay)
  852. c = Create("ObjectValue"){
  853. Name = "creator",
  854. Value = Player,
  855. Parent = h,
  856. }
  857. game:GetService("Debris"):AddItem(c, .5)
  858. end
  859. end
  860.  
  861. function ShowDamage(Pos, Text, Time, Color)
  862. local Rate = (1 / 30)
  863. local Pos = (Pos or Vector3.new(0, 0, 0))
  864. local Text = (Text or "")
  865. local Time = (Time or 2)
  866. local Color = (Color or Color3.new(1, 0, 1))
  867. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  868. EffectPart.Anchored = true
  869. local BillboardGui = Create("BillboardGui"){
  870. Size = UDim2.new(3, 0, 3, 0),
  871. Adornee = EffectPart,
  872. Parent = EffectPart,
  873. }
  874. local TextLabel = Create("TextLabel"){
  875. BackgroundTransparency = 1,
  876. Size = UDim2.new(1, 0, 1, 0),
  877. Text = Text,
  878. Font = "SciFi",
  879. TextColor3 = Color,
  880. TextScaled = true,
  881. Parent = BillboardGui,
  882. }
  883. game.Debris:AddItem(EffectPart, (Time))
  884. EffectPart.Parent = game:GetService("Workspace")
  885. delay(0, function()
  886. local Frames = (Time / Rate)
  887. for Frame = 1, Frames do
  888. wait(Rate)
  889. local Percent = (Frame / Frames)
  890. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  891. TextLabel.TextTransparency = Percent
  892. end
  893. if EffectPart and EffectPart.Parent then
  894. EffectPart:Destroy()
  895. end
  896. end)
  897. end
  898.  
  899. function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  900. for _, c in pairs(workspace:children()) do
  901. local hum = c:findFirstChild("Humanoid")
  902. if hum ~= nil then
  903. local head = c:findFirstChild("Torso")
  904. if head ~= nil then
  905. local targ = head.Position - Part.Position
  906. local mag = targ.magnitude
  907. if mag <= Magnitude and c.Name ~= Player.Name then
  908. Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, .1, "rbxassetid://" .. HitSound, HitPitch)
  909. end
  910. end
  911. end
  912. end
  913. end
  914.  
  915. EffectModel = Create("Model"){
  916. Parent = Character,
  917. Name = "Effects",
  918. }
  919.  
  920. Effects = {
  921. Block = {
  922. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  923. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  924. prt.Anchored = true
  925. prt.CFrame = cframe
  926. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  927. game:GetService("Debris"):AddItem(prt, 10)
  928. if Type == 1 or Type == nil then
  929. table.insert(Effects, {
  930. prt,
  931. "Block1",
  932. delay,
  933. x3,
  934. y3,
  935. z3,
  936. msh
  937. })
  938. elseif Type == 2 then
  939. table.insert(Effects, {
  940. prt,
  941. "Block2",
  942. delay,
  943. x3,
  944. y3,
  945. z3,
  946. msh
  947. })
  948. end
  949. end;
  950. };
  951.  
  952. Cylinder = {
  953. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  954. local prt = CFuncs.Part..Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
  955. prt.Anchored = true
  956. prt.CFrame = cframe
  957. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  958. game:GetService("Debris"):AddItem(prt, 2)
  959. Effects[#Effects + 1] = {
  960. prt,
  961. "Cylinder",
  962. delay,
  963. x3,
  964. y3,
  965. z3
  966. }
  967. end;
  968. };
  969.  
  970. Head = {
  971. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  972. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  973. prt.Anchored = true
  974. prt.CFrame = cframe
  975. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  976. game:GetService("Debris"):AddItem(prt, 10)
  977. table.insert(Effects, {
  978. prt,
  979. "Cylinder",
  980. delay,
  981. x3,
  982. y3,
  983. z3,
  984. msh
  985. })
  986. end;
  987. };
  988.  
  989. Sphere = {
  990. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  991. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  992. prt.Anchored = true
  993. prt.CFrame = cframe
  994. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  995. game:GetService("Debris"):AddItem(prt, 10)
  996. table.insert(Effects, {
  997. prt,
  998. "Cylinder",
  999. delay,
  1000. x3,
  1001. y3,
  1002. z3,
  1003. msh
  1004. })
  1005. end;
  1006. };
  1007.  
  1008. Elect = {
  1009. Create = function(cff, x, y, z)
  1010. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
  1011. prt.Anchored = true
  1012. prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  1013. prt.CFrame = CFrame.new(prt.Position)
  1014. game:GetService("Debris"):AddItem(prt, 2)
  1015. local xval = math.random() / 2
  1016. local yval = math.random() / 2
  1017. local zval = math.random() / 2
  1018. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
  1019. table.insert(Effects, {
  1020. prt,
  1021. "Elec",
  1022. 0.1,
  1023. x,
  1024. y,
  1025. z,
  1026. xval,
  1027. yval,
  1028. zval
  1029. })
  1030. end;
  1031.  
  1032. };
  1033.  
  1034. Ring = {
  1035. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1036. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1037. prt.Anchored = true
  1038. prt.CFrame = cframe
  1039. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1040. game:GetService("Debris"):AddItem(prt, 10)
  1041. table.insert(Effects, {
  1042. prt,
  1043. "Cylinder",
  1044. delay,
  1045. x3,
  1046. y3,
  1047. z3,
  1048. msh
  1049. })
  1050. end;
  1051. };
  1052.  
  1053.  
  1054. Wave = {
  1055. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1056. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1057. prt.Anchored = true
  1058. prt.CFrame = cframe
  1059. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1060. game:GetService("Debris"):AddItem(prt, 10)
  1061. table.insert(Effects, {
  1062. prt,
  1063. "Cylinder",
  1064. delay,
  1065. x3,
  1066. y3,
  1067. z3,
  1068. msh
  1069. })
  1070. end;
  1071. };
  1072.  
  1073. Break = {
  1074. Create = function(brickcolor, cframe, x1, y1, z1)
  1075. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1076. prt.Anchored = true
  1077. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1078. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1079. local num = math.random(10, 50) / 1000
  1080. game:GetService("Debris"):AddItem(prt, 10)
  1081. table.insert(Effects, {
  1082. prt,
  1083. "Shatter",
  1084. num,
  1085. prt.CFrame,
  1086. math.random() - math.random(),
  1087. 0,
  1088. math.random(50, 100) / 100
  1089. })
  1090. end;
  1091. };
  1092.  
  1093. Fire = {
  1094. Create = function(brickcolor, cframe, x1, y1, z1, delay)
  1095. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1096. prt.Anchored = true
  1097. prt.CFrame = cframe
  1098. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1099. game:GetService("Debris"):AddItem(prt, 10)
  1100. table.insert(Effects, {
  1101. prt,
  1102. "Fire",
  1103. delay,
  1104. 1,
  1105. 1,
  1106. 1,
  1107. msh
  1108. })
  1109. end;
  1110. };
  1111.  
  1112. FireWave = {
  1113. Create = function(brickcolor, cframe, x1, y1, z1)
  1114. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new())
  1115. prt.Anchored = true
  1116. prt.CFrame = cframe
  1117. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1118. local d = Create("Decal"){
  1119. Parent = prt,
  1120. Texture = "rbxassetid://26356434",
  1121. Face = "Top",
  1122. }
  1123. local d = Create("Decal"){
  1124. Parent = prt,
  1125. Texture = "rbxassetid://26356434",
  1126. Face = "Bottom",
  1127. }
  1128. game:GetService("Debris"):AddItem(prt, 10)
  1129. table.insert(Effects, {
  1130. prt,
  1131. "FireWave",
  1132. 1,
  1133. 30,
  1134. math.random(400, 600) / 100,
  1135. msh
  1136. })
  1137. end;
  1138. };
  1139.  
  1140. Lightning = {
  1141. Create = function(p0, p1, tym, ofs, col, th, tra, last)
  1142. local magz = (p0 - p1).magnitude
  1143. local curpos = p0
  1144. local trz = {
  1145. -ofs,
  1146. ofs
  1147. }
  1148. for i = 1, tym do
  1149. local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym))
  1150. local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
  1151. local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
  1152. li.Material = "Neon"
  1153. if tym == i then
  1154. local magz2 = (curpos - p1).magnitude
  1155. li.Size = Vector3.new(th, th, magz2)
  1156. li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
  1157. table.insert(Effects, {
  1158. li,
  1159. "Disappear",
  1160. last
  1161. })
  1162. else
  1163. do
  1164. do
  1165. li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
  1166. curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
  1167. game.Debris:AddItem(li, 10)
  1168. table.insert(Effects, {
  1169. li,
  1170. "Disappear",
  1171. last
  1172. })
  1173. end
  1174. end
  1175. end
  1176. end
  1177. end
  1178. };
  1179.  
  1180. EffectTemplate = {
  1181.  
  1182. };
  1183. }
  1184.  
  1185. function attackone()
  1186. attack = true
  1187. for i = 0, 1, 0.1 do
  1188. swait()
  1189. PlayAnimationFromTable({
  1190. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  1191. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  1192. CFrame.new(1.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  1193. CFrame.new(-1.5, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  1194. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  1195. CFrame.new(-0.5, -2, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  1196. }, .3, false)
  1197. end
  1198. attack = false
  1199. end
  1200.  
  1201. Mouse.Button1Down:connect(function()
  1202. if attack == false and attacktype == 1 then
  1203. attackone()
  1204. end
  1205. end)
  1206.  
  1207. Mouse.KeyDown:connect(function(k)
  1208. k = k:lower()
  1209. if attack == false and k == '' then
  1210.  
  1211. end
  1212. end)
  1213.  
  1214. while true do
  1215. swait()
  1216. for i, v in pairs(Character:GetChildren()) do
  1217. if v:IsA("Part") then
  1218. v.Material = "SmoothPlastic"
  1219. elseif v:IsA("Accessory") then
  1220. v:WaitForChild("Handle").Material = "SmoothPlastic"
  1221. end
  1222. end
  1223. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1224. velocity = RootPart.Velocity.y
  1225. sine = sine + change
  1226. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  1227. if RootPart.Velocity.y > 1 and hit == nil then
  1228. Anim = "Jump"
  1229. if attack == false then
  1230. RootJoint.C0 = clerp(RootJoint.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1231. Torso.Neck.C0 = clerp(Torso.Neck.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1232. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1233. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1234. RH.C0 = clerp(RH.C0, CFrame.new(.5, -2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1235. LH.C0 = clerp(LH.C0, CFrame.new(-.5, -2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1236. end
  1237. elseif RootPart.Velocity.y < -1 and hit == nil then
  1238. Anim = "Fall"
  1239. if attack == false then
  1240. RootJoint.C0 = clerp(RootJoint.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1241. Torso.Neck.C0 = clerp(Torso.Neck.C0, CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1242. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1243. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1244. RH.C0 = clerp(RH.C0, CFrame.new(.5, -2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1245. LH.C0 = clerp(LH.C0, CFrame.new(-.5, -2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1246. end
  1247. elseif Torsovelocity < 1 and hit ~= nil then
  1248. Anim = "Idle"
  1249. if attack == false then
  1250. change = 1
  1251. PlayAnimationFromTable({
  1252. CFrame.new(0.0305537544, 0.101244226, -0.110436231, 0.751921654, -2.69948202e-07, 0.659252584, 2.48371833e-07, 1, 1.26191509e-07, -0.659252584, 6.88536517e-08, 0.751921654) * CFrame.new(0, -0.1 + .1 * math.cos(sine / 20), 0) * CFrame.Angles(0, 0, 0),
  1253. CFrame.new(0.133692384, 1.49995291, -0.122152172, 0.751921654, 0.118821487, -0.648456573, -2.85284614e-07, 0.983623922, 0.18023634, 0.659252584, -0.135523424, 0.739608109) * CFrame.Angles(math.rad(0 + 1 * math.cos(sine / 20)), 0, 0),
  1254. CFrame.new(1.56342208, 0.082565181, 0.184068531, 0.944978952, -0.210362762, -0.250524461, 0.217591718, 0.976039171, 0.00118678785, 0.244271994, -0.0556335375, 0.968109608) * CFrame.new(0, 0, 0 - 0.1 * math.cos(sine / 20)) * CFrame.Angles(0 + 0.1 * math.cos(sine / 20), 0, 0),
  1255. CFrame.new(-1.43761444, 0.138237804, 0.339363664, 0.86690402, 0.278344274, 0.413524032, -0.320227653, 0.946727693, 0.0340739228, -0.3820104, -0.161960647, 0.909855604) * CFrame.new(0, 0, 0) * CFrame.new(0, 0, 0 - 0.1 * math.cos(sine / 20)) * CFrame.Angles(0 + 0.1 * math.cos(sine / 20), 0, 0),
  1256. CFrame.new(0.620094717, -1.99999762, -0.161182314, 0.97460556, -0.0876395851, -0.206067026, 0.0712375641, 0.993768871, -0.0857243761, 0.21229586, 0.0688677281, 0.974775851) * CFrame.new(0, 0, 0) * CFrame.new(0 - 0.01 * math.cos(sine / 20), 0 - .1 * math.cos(sine / 20), 0) * CFrame.Angles(0 + 0.02 * math.cos(sine / 20), 0, 0 - 0.01 * math.cos(sine / 20)),
  1257. CFrame.new(-0.646371901, -1.99999869, 0.0849364698, 0.992579937, 0.118687555, 0.0264309049, -0.120671012, 0.988230288, 0.0940183029, -0.0149610043, -0.0965101048, 0.995219648) * CFrame.new(0 + 0.01 * math.cos(sine / 20), 0 - .1 * math.cos(sine / 20), 0) * CFrame.Angles(0 - 0.02 * math.cos(sine / 20), 0, 0 + 0.01 * math.cos(sine / 20)),
  1258. }, .3, false)
  1259. end
  1260.  
  1261. elseif Torsovelocity > 2 and hit ~= nil then
  1262. Anim = "Walk"
  1263. if attack == false then
  1264. Character.Humanoid.WalkSpeed = 100
  1265. PlayAnimationFromTable({
  1266. CFrame.new(0, -0.0193441566, -0.137761548, 1, 0, 0, 0, 0.961308897, 0.275472969, 0, -0.275472969, 0.961308897) * CFrame.new(0, 0+ .1 * math.cos((sine) / 2), 0) * CFrame.Angles(0, 0, 0),
  1267. CFrame.new(0, 1.44159341, 0.0451771915, 1, 0, 0, 0, 0.98646307, -0.163984656, 0, 0.163984656, 0.98646307) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1268. CFrame.new(1.63363111, 0.0754526258, -2.72151652e-007, 0.985570133, -0.16926825, 1.56980732e-007, 0.16926825, 0.985570133, 2.38418579e-007, -1.86264515e-007, -1.49011612e-007, 1.00000024) * CFrame.new(0-.2+.5 * math.cos((sine) / 4), 0.2+ .65 * math.cos((sine) / 2), 0+ 1.1 * math.cos((sine) / 4)) * CFrame.Angles(math.rad(0- 120 * math.cos((sine) / 4)),0, math.rad(0+ 60 * math.cos((sine) / 4))),
  1269. CFrame.new(-1.61827064, 0.111134544, 1.51569429e-006, 0.978242338, 0.207465827, 7.76345075e-007, -0.207465842, 0.978242397, -2.41398811e-006, -1.25542283e-006, 2.20537186e-006, 1.00000012) * CFrame.new(0.2+.5 * math.cos((sine) / 4), 0.2+ .65 * math.cos((sine) / 2), 0- 1.1 * math.cos((sine) / 4)) * CFrame.Angles(math.rad(0+ 120 * math.cos((sine) / 4)), 0, math.rad(0+ 60 * math.cos((sine) / 4))),
  1270. CFrame.new(0.5, -2.00000334, 2.67028881e-005, 1, 0, 0, 0, 1.00000024, 0, 0, 0, 1.00000024) * CFrame.new(0, 0+ .4 * math.cos((sine) / 2), 0 + 1 * math.cos((sine) / 4)) * CFrame.Angles(math.rad(0 - 50 * math.cos((sine) / 4)), math.rad(0), math.rad(0)),
  1271. CFrame.new(-0.5, -2.00000334, 2.67028881e-005, 1, 0, 0, 0, 1.00000024, 0, 0, 0, 1.00000024) * CFrame.new(0, 0+ .4 * math.cos((sine) / 2), 0 - 1 * math.cos((sine) / 4)) * CFrame.Angles(math.rad(0 + 50 * math.cos((sine) / 4)), math.rad(0), math.rad(0)),
  1272. }, .9, false)
  1273. end
  1274. end
  1275. if 0 < #Effects then
  1276. for e = 1, #Effects do
  1277. if Effects[e] ~= nil then
  1278. local Thing = Effects[e]
  1279. if Thing ~= nil then
  1280. local Part = Thing[1]
  1281. local Mode = Thing[2]
  1282. local Delay = Thing[3]
  1283. local IncX = Thing[4]
  1284. local IncY = Thing[5]
  1285. local IncZ = Thing[6]
  1286. if Thing[2] == "Shoot" then
  1287. local Look = Thing[1]
  1288. local move = 30
  1289. if Thing[8] == 3 then
  1290. move = 10
  1291. end
  1292. local hit, pos = rayCast(Thing[4], Thing[1], move, m)
  1293. if Thing[10] ~= nil then
  1294. da = pos
  1295. cf2 = CFrame.new(Thing[4], Thing[10].Position)
  1296. cfa = CFrame.new(Thing[4], pos)
  1297. tehCF = cfa:lerp(cf2, 0.2)
  1298. Thing[1] = tehCF.lookVector
  1299. end
  1300. local mag = (Thing[4] - pos).magnitude
  1301. Effects["Head"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 1, mag * 5, 1, 0.5, 0, 0.5, 0.2)
  1302. if Thing[8] == 2 then
  1303. Effects["Ring"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0) * CFrame.fromEulerAnglesXYZ(1.57, 0, 0), 1, 1, 0.1, 0.5, 0.5, 0.1, 0.1, 1)
  1304. end
  1305. Thing[4] = Thing[4] + Look * move
  1306. Thing[3] = Thing[3] - 1
  1307. if 2 < Thing[5] then
  1308. Thing[5] = Thing[5] - 0.3
  1309. Thing[6] = Thing[6] - 0.3
  1310. end
  1311. if hit ~= nil then
  1312. Thing[3] = 0
  1313. if Thing[8] == 1 or Thing[8] == 3 then
  1314. Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1)
  1315. else
  1316. if Thing[8] == 2 then
  1317. Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1)
  1318. if (hit.Parent:findFirstChild("Humanoid")) ~= nil or (hit.Parent.Parent:findFirstChild("Humanoid")) ~= nil then
  1319. ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1320. ref.Anchored = true
  1321. ref.CFrame = CFrame.new(pos)
  1322. CFuncs["Sound"].Create("161006093", ref, 1, 1.2)
  1323. game:GetService("Debris"):AddItem(ref, 0.2)
  1324. Effects["Block"].Create(Torso.BrickColor, CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 10, 10, 10, 0.1, 2)
  1325. Effects["Ring"].Create(BrickColor.new("Bright yellow"), CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 0.1, 4, 4, 0.1, 0.1)
  1326. MagnitudeDamage(ref, 15, Thing[5] / 1.5, Thing[6] / 1.5, 0, "Normal", "", 1)
  1327. end
  1328. end
  1329. end
  1330. ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1331. ref.Anchored = true
  1332. ref.CFrame = CFrame.new(pos)
  1333. Effects["Sphere"].Create(Torso.BrickColor, CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
  1334. game:GetService("Debris"):AddItem(ref, 1)
  1335. end
  1336. if Thing[3] <= 0 then
  1337. table.remove(Effects, e)
  1338. end
  1339. end
  1340. do
  1341. do
  1342. if Thing[2] == "FireWave" then
  1343. if Thing[3] <= Thing[4] then
  1344. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0)
  1345. Thing[3] = Thing[3] + 1
  1346. Thing[6].Scale = Thing[6].Scale + Vector3.new(Thing[5], 0, Thing[5])
  1347. else
  1348. Part.Parent = nil
  1349. table.remove(Effects, e)
  1350. end
  1351. end
  1352. if Thing[2] ~= "Shoot" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" then
  1353. if Thing[1].Transparency <= 1 then
  1354. if Thing[2] == "Block1" then
  1355. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1356. Mesh = Thing[7]
  1357. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1358. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1359. else
  1360. if Thing[2] == "Block2" then
  1361. Thing[1].CFrame = Thing[1].CFrame
  1362. Mesh = Thing[7]
  1363. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1364. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1365. else
  1366. if Thing[2] == "Fire" then
  1367. Thing[1].CFrame = CFrame.new(Thing[1].Position) + Vector3.new(0, 0.2, 0)
  1368. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1369. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1370. else
  1371. if Thing[2] == "Cylinder" then
  1372. Mesh = Thing[7]
  1373. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1374. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1375. else
  1376. if Thing[2] == "Blood" then
  1377. Mesh = Thing[7]
  1378. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
  1379. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1380. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1381. else
  1382. if Thing[2] == "Elec" then
  1383. Mesh = Thing[10]
  1384. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1385. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1386. else
  1387. if Thing[2] == "Disappear" then
  1388. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1389. end
  1390. end
  1391. end
  1392. end
  1393. end
  1394. end
  1395. end
  1396. else
  1397. Part.Parent = nil
  1398. table.remove(Effects, e)
  1399. end
  1400. end
  1401. end
  1402. end
  1403. end
  1404. end
  1405. end
  1406. end
  1407. end
Add Comment
Please, Sign In to add comment