kaualima12

Untitled

Nov 9th, 2019
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
  153. local Player = game:GetService("Players").LocalPlayer
  154.  
  155. local Mouse,mouse,UserInputService,ContextActionService
  156. do
  157. script.Parent = Player.Character
  158. local CAS = {Actions={}}
  159. local Event = Instance.new("RemoteEvent")
  160. Event.Name = "UserInput_Event"
  161. Event.Parent = Player.Character
  162. local fakeEvent = function()
  163. local t = {_fakeEvent=true}
  164. t.Connect = function(self,f)self.Function=f end
  165. t.connect = t.Connect
  166. return t
  167. end
  168. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  169. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  170. function CAS:BindAction(name,fun,touch,...)
  171. CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  172. end
  173. function CAS:UnbindAction(name)
  174. CAS.Actions[name] = nil
  175. end
  176. local function te(self,ev,...)
  177. local t = m[ev]
  178. if t and t._fakeEvent and t.Function then
  179. t.Function(...)
  180. end
  181. end
  182. m.TrigEvent = te
  183. UIS.TrigEvent = te
  184. Event.OnServerEvent:Connect(function(plr,io)
  185. if plr~=Player then return end
  186. if io.isMouse then
  187. m.Target = io.Target
  188. m.Hit = io.Hit
  189. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  190. if io.UserInputState == Enum.UserInputState.Begin then
  191. m:TrigEvent("Button1Down")
  192. else
  193. m:TrigEvent("Button1Up")
  194. end
  195. else
  196. for n,t in pairs(CAS.Actions) do
  197. for _,k in pairs(t.Keys) do
  198. if k==io.KeyCode then
  199. t.Function(t.Name,io.UserInputState,io)
  200. end
  201. end
  202. end
  203. if io.UserInputState == Enum.UserInputState.Begin then
  204. m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  205. UIS:TrigEvent("InputBegan",io,false)
  206. else
  207. m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  208. UIS:TrigEvent("InputEnded",io,false)
  209. end
  210. end
  211. end)
  212. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  213. end
  214.  
  215. wait(0.016666666666666666)
  216. Effects = {}
  217. local s = Instance.new("Sound")
  218.  
  219. s.Name = "Sound"
  220. s.SoundId = "http://www.roblox.com/asset/?id=261558095"
  221. s.Volume = 5
  222. s.Looped = true
  223. s.archivable = true
  224.  
  225. s.Parent = game.Workspace
  226.  
  227. wait(3)
  228.  
  229. s:play()
  230. local Player = game.Players.localPlayer
  231. local Character = Player.Character
  232. local Humanoid = Character.Humanoid
  233. Humanoid.WalkSpeed = 100
  234. local Mouse = Player:GetMouse()
  235. local LeftArm = Character["Left Arm"]
  236. local RightArm = Character["Right Arm"]
  237. local LeftLeg = Character["Left Leg"]
  238. local RightLeg = Character["Right Leg"]
  239. local Head = Character.Head
  240. local Torso = Character.Torso
  241. local Camera = game.Workspace.CurrentCamera
  242. local RootPart = Character.HumanoidRootPart
  243. local RootJoint = RootPart.RootJoint
  244. local attack = false
  245. local Anim = "Idle"
  246. local attacktype = 1
  247. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  248. local velocity = RootPart.Velocity.y
  249. local sine = 0
  250. local change = 1
  251. local Create = LoadLibrary("RbxUtility").Create
  252. Humanoid.Health = math.huge
  253. Instance.new("ForceField", Character).Visible = false
  254. hit = nil
  255. oof = false
  256. for y, t in pairs(Character:GetChildren()) do
  257. end
  258. DHandle = Instance.new("Part")
  259. DMesh = Instance.new("SpecialMesh")
  260. DWeld = Instance.new("Weld")
  261. DHandle.Parent = Character
  262. DHandle.Name = "Handle"
  263. DHandle.CanCollide = false
  264. DHandle.Locked = true
  265. DHandle.Size = Vector3.new(1.93, 1.77, 1.6)
  266. DMesh.Parent = DHandle
  267. DMesh.Scale = DMesh.Scale
  268. DWeld.Parent = DHandle
  269. DWeld.Name = "no"
  270. DWeld.Part0 = Head
  271. DWeld.Part1 = DHandle
  272. DWeld.C0 = CFrame.new(0, 0.4, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-1), 0, 0)
  273. VertexColor = Vector3.new(1, 1, 1)
  274. DHandle.Transparency = 0
  275. DMesh.MeshId = "http://www.roblox.com/asset/?id=0"
  276. DMesh.TextureId = "http://www.roblox.com/asset/?id=0"
  277. local m = Create("Model")({
  278. Parent = Character,
  279. Name = "WeaponModel"
  280. })
  281. Humanoid.Animator.Parent = nil
  282. Character.Animate.Parent = nil
  283. local function newMotor(part0, part1, c0, c1)
  284. local w = Create("Motor")({
  285. Parent = part0,
  286. Part0 = part0,
  287. Part1 = part1,
  288. C0 = c0,
  289. C1 = c1
  290. })
  291. return w
  292. end
  293. function clerp(a, b, t)
  294. return a:lerp(b, t)
  295. end
  296. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  297. NeckCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  298. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  299. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  300. local RH = newMotor(Torso, RightLeg, CFrame.new(0.5, -2, 0), CFrame.new(0, 0, 0))
  301. local LH = newMotor(Torso, LeftLeg, CFrame.new(-0.5, -2, 0), CFrame.new(0, 0, 0))
  302. RootJoint.C1 = CFrame.new(0, 0, 0)
  303. RootJoint.C0 = CFrame.new(0, 0, 0)
  304. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  305. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  306. local rarmc1 = RW.C1
  307. local larmc1 = LW.C1
  308. local rlegc1 = RH.C1
  309. local llegc1 = LH.C1
  310. local resetc1 = false
  311. function PlayAnimationFromTable(table, speed, bool)
  312. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  313. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  314. RW.C0 = clerp(RW.C0, table[3], speed)
  315. LW.C0 = clerp(LW.C0, table[4], speed)
  316. RH.C0 = clerp(RH.C0, table[5], speed)
  317. LH.C0 = clerp(LH.C0, table[6], speed)
  318. if bool == true and resetc1 == false then
  319. resetc1 = true
  320. RootJoint.C1 = RootJoint.C1
  321. Torso.Neck.C1 = Torso.Neck.C1
  322. RW.C1 = rarmc1
  323. LW.C1 = larmc1
  324. RH.C1 = rlegc1
  325. LH.C1 = llegc1
  326. end
  327. end
  328. ArtificialHB = Create("BindableEvent", script)({Parent = script, Name = "Heartbeat"})
  329. script:WaitForChild("Heartbeat")
  330. frame = 0.002
  331. tf = 0
  332. allowframeloss = false
  333. tossremainder = false
  334. lastframe = tick()
  335. script.Heartbeat:Fire()
  336. game:GetService("RunService").Heartbeat:connect(function(s, p)
  337. tf = tf + s
  338. if tf >= frame then
  339. if allowframeloss then
  340. script.Heartbeat:Fire()
  341. lastframe = tick()
  342. else
  343. for i = 1, math.floor(tf / frame) do
  344. script.Heartbeat:Fire()
  345. end
  346. lastframe = tick()
  347. end
  348. if tossremainder then
  349. tf = 0
  350. else
  351. tf = tf - frame * math.floor(tf / frame)
  352. end
  353. end
  354. end)
  355. function swait(num)
  356. if num == 0 or num == nil then
  357. ArtificialHB.Event:wait()
  358. else
  359. for i = 0, num do
  360. ArtificialHB.Event:wait()
  361. end
  362. end
  363. end
  364. function RemoveOutlines(part)
  365. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  366. end
  367. CFuncs = {
  368. Part = {
  369. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  370. local Part = Create("Part")({
  371. Parent = Parent,
  372. Reflectance = Reflectance,
  373. Transparency = Transparency,
  374. CanCollide = false,
  375. Locked = true,
  376. BrickColor = BrickColor.new(tostring(BColor)),
  377. Name = Name,
  378. Size = Size,
  379. Material = Material
  380. })
  381. RemoveOutlines(Part)
  382. if Size == Vector3.new() then
  383. Part.Size = Vector3.new(0.2, 0.2, 0.2)
  384. else
  385. Part.Size = Size
  386. end
  387. return Part
  388. end
  389. },
  390. Mesh = {
  391. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  392. local Msh = Create(Mesh)({
  393. Parent = Part,
  394. Offset = OffSet,
  395. Scale = Scale
  396. })
  397. if Mesh == "SpecialMesh" then
  398. Msh.MeshType = MeshType
  399. Msh.MeshId = MeshId
  400. end
  401. return Msh
  402. end
  403. },
  404. Weld = {
  405. Create = function(Parent, Part0, Part1, C0, C1)
  406. local Weld = Create("Weld")({
  407. Parent = Parent,
  408. Part0 = Part0,
  409. Part1 = Part1,
  410. C0 = C0,
  411. C1 = C1
  412. })
  413. return Weld
  414. end
  415. },
  416. Sound = {
  417. Create = function(id, par, vol, pit)
  418. local Sound = Create("Sound")({
  419. Volume = vol,
  420. Pitch = pit or 1,
  421. SoundId = "rbxassetid://" .. id,
  422. Parent = par or workspace
  423. })
  424. Sound:play()
  425.  
  426. end
  427. },
  428. Decal = {
  429. Create = function(Color, Texture, Transparency, Name, Parent)
  430. local Decal = Create("Decal")({
  431. Color3 = Color,
  432. Texture = "rbxassetid://" .. Texture,
  433. Transparency = Transparency,
  434. Name = Name,
  435. Parent = Parent
  436. })
  437. return Decal
  438. end
  439. },
  440. BillboardGui = {
  441. Create = function(Parent, Image, Position, Size)
  442. local BillPar = CFuncs.Part.Create(Parent, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "BillboardGuiPart", Vector3.new(1, 1, 1))
  443. BillPar.CFrame = CFrame.new(Position)
  444. local Bill = Create("BillboardGui")({
  445. Parent = BillPar,
  446. Adornee = BillPar,
  447. Size = UDim2.new(1, 0, 1, 0),
  448. SizeOffset = Vector2.new(Size, Size)
  449. })
  450. local d = Create("ImageLabel", Bill)({
  451. Parent = Bill,
  452. BackgroundTransparency = 1,
  453. Size = UDim2.new(1, 0, 1, 0),
  454. Image = "rbxassetid://" .. Image
  455. })
  456. return BillPar
  457. end
  458. },
  459. ParticleEmitter = {
  460. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  461. local Particle = Create("ParticleEmitter")({
  462. Parent = Parent,
  463. Color = ColorSequence.new(Color1, Color2),
  464. LightEmission = LightEmission,
  465. Size = Size,
  466. Texture = Texture,
  467. Transparency = Transparency,
  468. ZOffset = ZOffset,
  469. Acceleration = Accel,
  470. Drag = Drag,
  471. LockedToPart = LockedToPart,
  472. VelocityInheritance = VelocityInheritance,
  473. EmissionDirection = EmissionDirection,
  474. Enabled = Enabled,
  475. Lifetime = LifeTime,
  476. Rate = Rate,
  477. Rotation = Rotation,
  478. RotSpeed = RotSpeed,
  479. Speed = Speed,
  480. VelocitySpread = VelocitySpread
  481. })
  482. return Particle
  483. end
  484. },
  485. CreateTemplate = {}
  486. }
  487. function rayCast(Position, Direction, Range, Ignore)
  488. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  489. end
  490. function FindNearestTorso(Position, Distance, SinglePlayer)
  491. if SinglePlayer then
  492. return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
  493. end
  494. local List = {}
  495. for i, v in pairs(workspace:GetChildren()) do
  496. if v:IsA("Model") and v:findFirstChild("Torso") and v ~= Character and Distance >= (v.Torso.Position - Position).magnitude then
  497. table.insert(List, v)
  498. end
  499. end
  500. return List
  501. end
  502. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  503. if hit.Parent == nil then
  504. return
  505. end
  506. local h = hit.Parent:FindFirstChild("Part")
  507. for _, v in pairs(hit.Parent:children()) do
  508. if v:IsA("Part") then
  509. h = v
  510. end
  511. end
  512. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent.Name ~= "Base" and hit ~= nil then
  513. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  514. return
  515. end
  516. local c = Create("ObjectValue")({
  517. Name = "creator",
  518. Value = game:service("Players").LocalPlayer,
  519. Parent = h
  520. })
  521. game:GetService("Debris"):AddItem(c, 0.5)
  522. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  523. local Damage = math.random(minim, maxim)
  524. local blocked = false
  525. local block = hit.Parent:findFirstChild("Block")
  526. if block ~= nil and block.className == "IntValue" and block.Value > 0 then
  527. blocked = true
  528. block.Value = block.Value - 1
  529. print(block.Value)
  530. end
  531. if Type == "Knockdown" then
  532. local hum = hit.Parent.Humanoid
  533. hum.PlatformStand = true
  534. coroutine.resume(coroutine.create(function(HHumanoid)
  535. swait(1)
  536. HHumanoid.PlatformStand = false
  537. end), hum)
  538. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  539. local bodvol = Create("BodyVelocity")({
  540. velocity = angle * knockback,
  541. P = 5000,
  542. maxForce = Vector3.new(8000, 8000, 8000),
  543. Parent = hit
  544. })
  545. local rl = Create("BodyAngularVelocity")({
  546. P = 3000,
  547. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  548. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  549. Parent = hit
  550. })
  551. game:GetService("Debris"):AddItem(bodvol, 0.5)
  552. game:GetService("Debris"):AddItem(rl, 0.5)
  553. elseif Type == "Normal" then
  554. local vp = Create("BodyVelocity")({
  555. P = 500,
  556. maxForce = Vector3.new(math.huge, 0, math.huge),
  557. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  558. })
  559. if knockback > 0 then
  560. vp.Parent = hit
  561. hit.Parent = workspace
  562. hit.Anchored = false
  563. hit.CanCollide = false
  564. hit:BreakJoints()
  565. end
  566. game:GetService("Debris"):AddItem(vp, 0.5)
  567. elseif Type == "Up" then
  568. local bodyVelocity = Create("BodyVelocity")({
  569. velocity = Vector3.new(0, 20, 0),
  570. P = 5000,
  571. maxForce = Vector3.new(8000, 8000, 8000),
  572. Parent = hit
  573. })
  574. game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
  575. elseif Type == "DarkUp" then
  576. coroutine.resume(coroutine.create(function()
  577. for i = 0, 1, 0.1 do
  578. swait()
  579. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, 0.08, 1)
  580. end
  581. end))
  582. local bodyVelocity = Create("BodyVelocity")({
  583. velocity = Vector3.new(0, 20, 0),
  584. P = 5000,
  585. maxForce = Vector3.new(8000, 8000, 8000),
  586. Parent = hit
  587. })
  588. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  589. elseif Type == "Snare" then
  590. local bp = Create("BodyPosition")({
  591. P = 2000,
  592. D = 100,
  593. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  594. position = hit.Parent.Torso.Position,
  595. Parent = hit.Parent.Torso
  596. })
  597. game:GetService("Debris"):AddItem(bp, 1)
  598. elseif Type == "Freeze" then
  599. local BodPos = Create("BodyPosition")({
  600. P = 50000,
  601. D = 1000,
  602. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  603. position = hit.Parent.Torso.Position,
  604. Parent = hit.Parent.Torso
  605. })
  606. local BodGy = Create("BodyGyro")({
  607. maxTorque = Vector3.new(400000, 400000, 400000) * math.huge,
  608. P = 20000,
  609. Parent = hit.Parent.Torso,
  610. cframe = hit.Parent.Torso.CFrame
  611. })
  612. hit.Parent.Torso.Anchored = true
  613. coroutine.resume(coroutine.create(function(Part)
  614. swait(1.5)
  615. Part.Anchored = false
  616. end), hit.Parent.Torso)
  617. game:GetService("Debris"):AddItem(BodPos, 3)
  618. game:GetService("Debris"):AddItem(BodGy, 3)
  619. end
  620. local debounce = Create("BoolValue")({
  621. Name = "DebounceHit",
  622. Parent = hit.Parent,
  623. Value = true
  624. })
  625. game:GetService("Debris"):AddItem(debounce, Delay)
  626. c = Create("ObjectValue")({
  627. Name = "creator",
  628. Value = Player,
  629. Parent = h
  630. })
  631. game:GetService("Debris"):AddItem(c, 0.5)
  632. end
  633. end
  634. function ShowDamage(Pos, Text, Time, Color)
  635. local Rate = 0.03333333333333333
  636. local Pos = Pos or Vector3.new(0, 0, 0)
  637. local Text = Text or ""
  638. local Time = Time or 2
  639. local Color = Color or Color3.new(1, 0, 1)
  640. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  641. EffectPart.Anchored = true
  642. local BillboardGui = Create("BillboardGui")({
  643. Size = UDim2.new(3, 0, 3, 0),
  644. Adornee = EffectPart,
  645. Parent = EffectPart
  646. })
  647. local TextLabel = Create("TextLabel")({
  648. BackgroundTransparency = 1,
  649. Size = UDim2.new(1, 0, 1, 0),
  650. Text = Text,
  651. Font = "Garamond",
  652. TextColor3 = Torso.Color,
  653. TextScaled = true,
  654. Parent = BillboardGui
  655. })
  656. game.Debris:AddItem(EffectPart, Time)
  657. EffectPart.Parent = game:GetService("Workspace")
  658. delay(0, function()
  659. local Frames = Time / Rate
  660. for Frame = 1, Frames do
  661. wait(Rate)
  662. local Percent = Frame / Frames
  663. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  664. TextLabel.TextTransparency = Percent
  665. end
  666. if EffectPart and EffectPart.Parent then
  667. EffectPart:Destroy()
  668. end
  669. end)
  670. end
  671. sound = Instance.new("Sound", Character)
  672. sound.SoundId = "rbxassetid://1101468563"
  673. sound.Volume = 0
  674. sound.EmitterSize = 25
  675. sound:Play()
  676. sound.Looped = true
  677. CV = "Maroon"
  678. Player = game.Players.LocalPlayer
  679. char = Player.Character
  680. local txt = Instance.new("BillboardGui", Character)
  681. txt.Adornee = Character.Head
  682. txt.Name = "_status"
  683. txt.Size = UDim2.new(2, 0, 1.2, 0)
  684. txt.StudsOffset = Vector3.new(-9, 8, 0)
  685. local text = Instance.new("TextLabel", txt)
  686. text.Size = UDim2.new(10, 0, 7, 0)
  687. text.FontSize = "Size24"
  688. text.TextScaled = true
  689. text.TextTransparency = 0
  690. text.BackgroundTransparency = 1
  691. text.TextTransparency = 0
  692. text.TextStrokeTransparency = 1
  693. text.Font = "Cartoon"
  694. v = Instance.new("Part")
  695. v.Name = "ColorBrick"
  696. v.Parent = Player.Character
  697. v.FormFactor = "Symmetric"
  698. v.Anchored = true
  699. v.CanCollide = false
  700. v.BottomSurface = "Smooth"
  701. v.TopSurface = "Smooth"
  702. v.Size = Vector3.new(10, 5, 3)
  703. v.Transparency = 1
  704. v.CFrame = Character.Torso.CFrame
  705. v.BrickColor = BrickColor.new(CV)
  706. v.Transparency = 1
  707. touchCounter = 0
  708. local cR=255
  709. local cG=0
  710. local cB=0
  711. local flg5=1 local omgidk=1
  712. local add=15
  713. game:GetService("RunService"):BindToRenderStep("Ghost",1,function()
  714. if omgidk>10000 then omgidk=0 end
  715. omgidk=omgidk+1
  716. if cR>=255 then flg5=1 end
  717. if cG>=255 then flg5=2 end
  718. if cB>=255 then flg5=3 end
  719. if flg5==1 then cR=cR-add cG=cG+add end
  720. if flg5==2 then cG=cG-add cB=cB+add end
  721. if flg5==3 then cB=cB-add cR=cR+add end
  722. color=Color3.fromRGB(cR,cG,cB)
  723. text.TextColor3 = color
  724. end)
  725. v.Shape = "Block"
  726. text.Text = "A minecraft pro but with a rainbow shovel"
  727. function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  728. for _, c in pairs(workspace:children()) do
  729. local hum = c:findFirstChild("Humanoid")
  730. if hum ~= nil then
  731. local head = hit
  732. if head ~= nil then
  733. local targ = head.Position - Part.Position
  734. local mag = targ.magnitude
  735. if Magnitude >= mag and c.Name ~= Player.Name then
  736. CFuncs.Sound.Create("324867021", head, 1, 1)
  737. Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, 0.1, HitSound, HitPitch)
  738. end
  739. end
  740. end
  741. end
  742. end
  743. Handle = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 1, "Bright green", "Handle", Vector3.new(1, 1.20000005, 1))
  744. HandleWeld = CFuncs.Weld.Create(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.435136795, -0.716373444, -0.168147802, -0.184279382, -0.967371345, 0.173878923, -0.0978992507, -0.157963246, -0.982580066, 0.977986097, -0.198091835, -0.0655955523))
  745. Part = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 0, "Dark stone grey", "Part", Vector3.new(1, 1.20000005, 1))
  746. PartWeld = CFuncs.Weld.Create(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-8.36849213E-5, 4.00039482, -5.86509705E-5, 3.83518636E-6, 8.29994678E-6, -1, 4.9972441E-6, -1.00000012, -8.29994678E-6, -1.00000012, -4.9949158E-6, -3.83518636E-6))
  747. CFuncs.Mesh.Create("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.400000006, 1, 0.0500000007))
  748. Part = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 0, "Dark stone grey", "Part1", Vector3.new(1, 1.20000005, 1))
  749. PartWeld = CFuncs.Weld.Create(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-9.67979431E-5, -4.00035858, 0.499849081, -0.999994338, 5.56639861E-6, 1.65775418E-6, 5.24974894E-6, 0.999995232, -5.0291419E-6, -3.25776637E-6, -5.08874655E-6, -0.999990761))
  750. CFuncs.Mesh.Create("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.0500000007, 1, 0.600000024))
  751. Part = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 0, "Dark stone grey", "Part2", Vector3.new(1, 1.20000005, 1))
  752. PartWeld = CFuncs.Weld.Create(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-4.17232513E-5, 3.20031929, -3.71932983E-5, 3.83518636E-6, 8.29994678E-6, -1, 4.9972441E-6, -1.00000012, -8.29994678E-6, -1.00000012, -4.9949158E-6, -3.83518636E-6))
  753. CFuncs.Mesh.Create("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1.60000002, 0.400000006, 0.0500000007))
  754. Part = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 0, "Dark stone grey", "Part3", Vector3.new(1, 1.20000005, 1))
  755. PartWeld = CFuncs.Weld.Create(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(9.48905945E-5, -4.00033379, 0.499926567, 1, -5.21628408E-6, -3.65823939E-6, 5.21626544E-6, 1, -5.09625352E-6, 3.658266E-6, 5.09623442E-6, 1))
  756. CFuncs.Mesh.Create("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.0500000007, 1, 0.600000024))
  757. Part = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 0, "Dark stone grey", "Part4", Vector3.new(1, 1.20000005, 1))
  758. PartWeld = CFuncs.Weld.Create(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-6.74724579E-5, 2.90030861, -2.95639038E-5, 3.83518636E-6, 8.29994678E-6, -1, 4.9972441E-6, -1.00000012, -8.29994678E-6, -1.00000012, -4.9949158E-6, -3.83518636E-6))
  759. CFuncs.Mesh.Create("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.400000006, 0.400000006, 0.400000006))
  760. Part = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 0, "Dark stone grey", "Part5", Vector3.new(1, 1.20000005, 1))
  761. PartWeld = CFuncs.Weld.Create(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.0976924896, -1.42856026, 1.57356262E-5, 3.90782952E-6, 0.275675088, -0.961250901, 5.61308116E-6, -0.96125102, -0.275675088, -1.00000012, -4.33286186E-6, -5.2973628E-6))
  762. CFuncs.Mesh.Create("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.200000003, 1, 0.200000003))
  763. Part = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 0, "Dark stone grey", "Part6", Vector3.new(1, 1.20000005, 1))
  764. PartWeld = CFuncs.Weld.Create(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(1.93119049E-5, -0.700065613, 1.33514404E-5, 3.83518636E-6, 8.29994678E-6, -1, 4.9972441E-6, -1.00000012, -8.29994678E-6, -1.00000012, -4.9949158E-6, -3.83518636E-6))
  765. CFuncs.Mesh.Create("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.5, 0.5, 0.5))
  766. Part = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 0, "Dark stone grey", "Part7", Vector3.new(1, 1.20000005, 1))
  767. PartWeld = CFuncs.Weld.Create(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.0726666451, 1.43006897, 1.62124634E-5, -5.01610339E-6, 0.258840203, 0.96592015, -3.55858356E-6, 0.96592021, -0.258840173, -1.00000012, -4.73321415E-6, -3.92459333E-6))
  768. CFuncs.Mesh.Create("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.200000003, 1, 0.200000003))
  769. Part = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 0, "Dark stone grey", "Part8", Vector3.new(1, 1.20000005, 1))
  770. PartWeld = CFuncs.Weld.Create(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-4.14848328E-5, 4.36306E-5, 2.00019836, 1, -5.38327731E-6, -2.46055424E-6, -2.4586916E-6, 8.36700201E-6, -1, 5.40760811E-6, 1, 8.37445259E-6))
  771. CFuncs.Mesh.Create("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.200000003, 1, 0.200000003))
  772. Shaft = CFuncs.Part.Create(m, Enum.Material.Neon, 0, 0, "Brown", "Shaft", Vector3.new(0.3, 3.60000014, 0.3))
  773. ShaftWeld = CFuncs.Weld.Create(m, Handle, Shaft, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(2.21729279E-5, 1.20008087, -2.24113464E-5, 3.14228237E-6, 4.38094139E-6, -1.00000012, 2.94635538E-6, -1, -4.38839197E-6, -1, -2.95066275E-6, -3.14228237E-6))
  774. Hitbox = CFuncs.Part.Create(m, Enum.Material.Plastic, 0, 1, "Medium stone grey", "Hitbox", Vector3.new(7, 3, 3))
  775. HitboxWeld = CFuncs.Weld.Create(m, Handle, Hitbox, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.19377899, -0.184207916, -0.14117223, -5.3447485E-4, 0.99471724, -0.102652542, -0.999858558, 0.00119461119, 0.0167820305, 0.0168160032, 0.102646977, 0.994575679))
  776. sref = CFuncs.Part.Create(Character, "Neon", 0, 1, BrickColor.new("Black"), "Reference", Vector3.new())
  777. sref.Anchored = true
  778. local cR=255
  779. local cG=0
  780. local cB=0
  781. local flg5=1 local omgidk=1
  782. local add=15
  783. game:GetService("RunService"):BindToRenderStep("Ghost",1,function()
  784. if omgidk>10000 then omgidk=0 end
  785. omgidk=omgidk+1
  786. if cR>=255 then flg5=1 end
  787. if cG>=255 then flg5=2 end
  788. if cB>=255 then flg5=3 end
  789. if flg5==1 then cR=cR-add cG=cG+add end
  790. if flg5==2 then cG=cG-add cB=cB+add end
  791. if flg5==3 then cB=cB-add cR=cR+add end
  792. color=Color3.fromRGB(cR,cG,cB)
  793. local d = Character.WeaponModel
  794. d.Shaft.Color = color
  795. d.Part.Color = color
  796. d.Part1.Color = color
  797. d.Part2.Color = color
  798. d.Part3.Color = color
  799. d.Part4.Color = color
  800. d.Part5.Color = color
  801. d.Part6.Color = color
  802. d.Part7.Color = color
  803. d.Part8.Color = color
  804. d.Part.Material = Enum.Material.Neon
  805. d.Part1.Material = Enum.Material.Neon
  806. d.Part2.Material = Enum.Material.Neon
  807. d.Part3.Material = Enum.Material.Neon
  808. d.Part4.Material = Enum.Material.Neon
  809. d.Part5.Material = Enum.Material.Neon
  810. d.Part6.Material = Enum.Material.Neon
  811. d.Part7.Material = Enum.Material.Neon
  812. d.Part8.Material = Enum.Material.Neon
  813. end)
  814. EffectModel = Create("Model")({Parent = Character, Name = "Effects"})
  815. Effects = {
  816. Block = {
  817. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  818. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  819. prt.Anchored = true
  820. prt.CFrame = cframe
  821. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  822. game:GetService("Debris"):AddItem(prt, 10)
  823. if Type == 1 or Type == nil then
  824. table.insert(Effects, {
  825. prt,
  826. "Block1",
  827. delay,
  828. x3,
  829. y3,
  830. z3,
  831. msh
  832. })
  833. elseif Type == 2 then
  834. table.insert(Effects, {
  835. prt,
  836. "Block2",
  837. delay,
  838. x3,
  839. y3,
  840. z3,
  841. msh
  842. })
  843. end
  844. end
  845. },
  846. Cylinder = {
  847. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  848. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
  849. prt.Anchored = true
  850. prt.CFrame = cframe
  851. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  852. game:GetService("Debris"):AddItem(prt, 2)
  853. table.insert(Effects, {
  854. prt,
  855. "Cylinder",
  856. delay,
  857. x3,
  858. y3,
  859. z3,
  860. msh
  861. })
  862. end
  863. },
  864. Head = {
  865. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  866. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  867. prt.Anchored = true
  868. prt.CFrame = cframe
  869. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  870. game:GetService("Debris"):AddItem(prt, 10)
  871. table.insert(Effects, {
  872. prt,
  873. "Cylinder",
  874. delay,
  875. x3,
  876. y3,
  877. z3,
  878. msh
  879. })
  880. end
  881. },
  882. Sphere = {
  883. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  884. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  885. prt.Anchored = true
  886. prt.CFrame = cframe
  887. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  888. game:GetService("Debris"):AddItem(prt, 10)
  889. table.insert(Effects, {
  890. prt,
  891. "Cylinder",
  892. delay,
  893. x3,
  894. y3,
  895. z3,
  896. msh
  897. })
  898. end
  899. },
  900. Elect = {
  901. Create = function(cff, x, y, z)
  902. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("New Yeller"), "Part", Vector3.new(1, 1, 1))
  903. prt.Anchored = true
  904. prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  905. prt.CFrame = CFrame.new(prt.Position)
  906. game:GetService("Debris"):AddItem(prt, 2)
  907. local xval = math.random() / 2
  908. local yval = math.random() / 2
  909. local zval = math.random() / 2
  910. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
  911. table.insert(Effects, {
  912. prt,
  913. "Elec",
  914. 0.1,
  915. x,
  916. y,
  917. z,
  918. xval,
  919. yval,
  920. zval
  921. })
  922. end
  923. },
  924. Ring = {
  925. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  926. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  927. prt.Anchored = true
  928. prt.CFrame = cframe
  929. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  930. game:GetService("Debris"):AddItem(prt, 10)
  931. table.insert(Effects, {
  932. prt,
  933. "Cylinder",
  934. delay,
  935. x3,
  936. y3,
  937. z3,
  938. msh
  939. })
  940. end
  941. },
  942. Wave = {
  943. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  944. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  945. prt.Anchored = true
  946. prt.CFrame = cframe
  947. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  948. game:GetService("Debris"):AddItem(prt, 10)
  949. table.insert(Effects, {
  950. prt,
  951. "Cylinder",
  952. delay,
  953. x3,
  954. y3,
  955. z3,
  956. msh
  957. })
  958. end
  959. },
  960. Break = {
  961. Create = function(brickcolor, cframe, x1, y1, z1)
  962. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  963. prt.Anchored = true
  964. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  965. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  966. local num = math.random(10, 50) / 1000
  967. game:GetService("Debris"):AddItem(prt, 10)
  968. table.insert(Effects, {
  969. prt,
  970. "Shatter",
  971. num,
  972. prt.CFrame,
  973. math.random() - math.random(),
  974. 0,
  975. math.random(50, 100) / 100
  976. })
  977. end
  978. },
  979. Fire = {
  980. Create = function(brickcolor, cframe, x1, y1, z1, delay)
  981. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  982. prt.Anchored = true
  983. prt.CFrame = cframe
  984. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  985. game:GetService("Debris"):AddItem(prt, 10)
  986. table.insert(Effects, {
  987. prt,
  988. "Fire",
  989. delay,
  990. 1,
  991. 1,
  992. 1,
  993. msh
  994. })
  995. end
  996. },
  997. FireWave = {
  998. Create = function(brickcolor, cframe, x1, y1, z1)
  999. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new())
  1000. prt.Anchored = true
  1001. prt.CFrame = cframe
  1002. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1003. local d = Create("Decal")({
  1004. Parent = prt,
  1005. Texture = "rbxassetid://26356434",
  1006. Face = "Top"
  1007. })
  1008. local d = Create("Decal")({
  1009. Parent = prt,
  1010. Texture = "rbxassetid://26356434",
  1011. Face = "Bottom"
  1012. })
  1013. game:GetService("Debris"):AddItem(prt, 10)
  1014. table.insert(Effects, {
  1015. prt,
  1016. "FireWave",
  1017. 1,
  1018. 30,
  1019. math.random(400, 600) / 100,
  1020. msh
  1021. })
  1022. end
  1023. },
  1024. Lightning = {
  1025. Create = function(p0, p1, tym, ofs, col, th, tra, last)
  1026. local magz = (p0 - p1).magnitude
  1027. local curpos = p0
  1028. local trz = {
  1029. -ofs,
  1030. ofs
  1031. }
  1032. for i = 1, tym do
  1033. local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym))
  1034. local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
  1035. local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
  1036. li.Material = "Neon"
  1037. if tym == i then
  1038. local magz2 = (curpos - p1).magnitude
  1039. li.Size = Vector3.new(th, th, magz2)
  1040. li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
  1041. table.insert(Effects, {
  1042. li,
  1043. "Disappear",
  1044. last
  1045. })
  1046. else
  1047. li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
  1048. curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
  1049. game.Debris:AddItem(li, 10)
  1050. table.insert(Effects, {
  1051. li,
  1052. "Disappear",
  1053. last
  1054. })
  1055. end
  1056. end
  1057. end
  1058. },
  1059. EffectTemplate = {}
  1060. }
  1061. function ears()
  1062. local quote = math.random(1, 10)
  1063. if quote == 1 then
  1064. ow = CFuncs.Sound.Create("276916733", Character, 10, 1)
  1065. Instance.new("DistortionSoundEffect", ow).Level = 0.95
  1066. elseif quote == 2 then
  1067. ow = CFuncs.Sound.Create("222045669", Character, 10, 1)
  1068. Instance.new("DistortionSoundEffect", ow).Level = 0.95
  1069. ShowDamage(Head.CFrame * CFrame.new(0, 0, Head.Size.Z / 2).p + Vector3.new(0, 1.5, 0), "I played college ball yaknow", 1.5, BrickColor.new("Grey").Color)
  1070. elseif quote == 3 then
  1071. ow = CFuncs.Sound.Create("657527128", Character, 10, 1)
  1072. Instance.new("DistortionSoundEffect", ow).Level = 0.95
  1073. ShowDamage(Head.CFrame * CFrame.new(0, 0, Head.Size.Z / 2).p + Vector3.new(0, 1.5, 0), "Oof", 1.5, BrickColor.new("Grey").Color)
  1074. elseif quote == 4 then
  1075. CFuncs.Sound.Create("230292394", Character, 10, 1)
  1076. ShowDamage(Head.CFrame * CFrame.new(0, 0, Head.Size.Z / 2).p + Vector3.new(0, 1.5, 0), "AAAAAH", 1.5, BrickColor.new("Grey").Color)
  1077. elseif quote == 5 then
  1078. CFuncs.Sound.Create("230255621", Character, 10, 1)
  1079. ShowDamage(Head.CFrame * CFrame.new(0, 0, Head.Size.Z / 2).p + Vector3.new(0, 1.5, 0), "SO", 1.5, BrickColor.new("Grey").Color)
  1080. wait(0.2)
  1081. ShowDamage(Head.CFrame * CFrame.new(0, 0, Head.Size.Z / 2).p + Vector3.new(0, 1.5, 0), "DAH", 1.5, BrickColor.new("Grey").Color)
  1082. elseif quote == 6 then
  1083. CFuncs.Sound.Create("230255698", Character, 10, 1)
  1084. ShowDamage(Head.CFrame * CFrame.new(0, 0, Head.Size.Z / 2).p + Vector3.new(0, 1.5, 0), "Y E S", 1.5, BrickColor.new("Grey").Color)
  1085. elseif quote == 7 then
  1086. CFuncs.Sound.Create("230255738", Character, 10, 1)
  1087. ShowDamage(Head.CFrame * CFrame.new(0, 0, Head.Size.Z / 2).p + Vector3.new(0, 1.5, 0), "OH", 1.5, BrickColor.new("Grey").Color)
  1088. elseif quote == 8 then
  1089. CFuncs.Sound.Create("230292118", Character, 10, 1)
  1090. ShowDamage(Head.CFrame * CFrame.new(0, 0, Head.Size.Z / 2).p + Vector3.new(0, 1.5, 0), "AAAAAAAA", 1.5, BrickColor.new("Grey").Color)
  1091. elseif quote == 9 then
  1092. CFuncs.Sound.Create("230292073", Character, 10, 1)
  1093. ShowDamage(Head.CFrame * CFrame.new(0, 0, Head.Size.Z / 2).p + Vector3.new(0, 1.5, 0), "UWEEEEEEEEEEH", 1.5, BrickColor.new("Grey").Color)
  1094. elseif quote == 10 then
  1095. ow = CFuncs.Sound.Create("225279648", Character, 10, 1)
  1096. Instance.new("DistortionSoundEffect", ow).Level = 0.95
  1097. ShowDamage(Head.CFrame * CFrame.new(0, 0, Head.Size.Z / 2).p + Vector3.new(0, 1.5, 0), "help", 1.5, BrickColor.new("Grey").Color)
  1098. end
  1099. end
  1100. function joj()
  1101. while oof == true do
  1102. attack = true
  1103. local con = Hitbox.Touched:connect(function(hit)
  1104. Damage(Hitbox, hit, 0, 0, math.random(300, 300), "Normal", RootPart, 0.1, "146163534", 1)
  1105. end)
  1106. CFuncs.Sound.Create("1102186681", Hitbox, 10, 1)
  1107. for i = 0, 1, 0.1 do
  1108. swait()
  1109. PlayAnimationFromTable({
  1110. CFrame.new(0.318533748, 1.11758709E-8, -0.186876655, 0.571150839, -0.107324705, 0.813798547, -0.321393877, 0.883022606, 0.342018932, -0.755309701, -0.456894249, 0.469845593) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1111. CFrame.new(-0.136643112, 1.46224117, -0.102674514, 0.571150839, -0.321393877, -0.755309701, -0.107324705, 0.883022606, -0.456894249, 0.813798547, 0.342018932, 0.469845593) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1112. CFrame.new(1.34420753, 1.19733691, -0.575926542, -0.0377464592, -0.0365618169, 0.998618245, -0.0365605801, -0.998610795, -0.0379435122, 0.998618245, -0.0379423201, 0.0363572836) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1113. CFrame.new(-1.54852927, 1.0183481, -0.403962731, 0.992945313, -0.0193823874, 0.11697869, 0.0193829238, -0.946746707, -0.321395338, 0.116978586, 0.321395338, -0.93969202) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1114. CFrame.new(1.30056286, -1.52663183, -0.684036016, 0.872286201, -0.321393877, -0.368541837, 0.13550131, 0.883022606, -0.449344397, 0.469847292, 0.342018932, 0.813797712) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1115. CFrame.new(-0.0819230229, -1.98630714, -0.796365142, 0.843013644, -0.321393877, 0.431316614, 0.431316495, 0.883022606, -0.185032547, -0.321394026, 0.342018932, 0.883022547) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  1116. }, 0.3, false)
  1117. end
  1118. for i = 0, 1, 0.1 do
  1119. swait()
  1120. PlayAnimationFromTable({
  1121. CFrame.new(-0.70452857, 1.34110451E-7, -0.85472101, 0.0479760207, 0.375900865, -0.925417125, -0.321394145, 0.883022726, 0.342018545, 0.945729494, 0.281014919, 0.163176239) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1122. CFrame.new(-0.332258016, 1.42813265, -0.198432297, 0.0479760207, -0.321394145, 0.945729494, 0.375900865, 0.883022726, 0.281014919, -0.925417125, 0.342018545, 0.163176239) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1123. CFrame.new(1.3427434, 0.740131199, -1.01291919, 0.0505371541, -0.0144109726, 0.998618364, 0.883102953, 0.467642725, -0.0379427671, -0.466449738, 0.883800209, 0.0363596678) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1124. CFrame.new(-1.46270001, 0.38253215, -1.0271579, 0.992945492, -0.11697793, -0.01938124, 0.0193838775, 0.321395963, -0.946746528, 0.116977483, 0.939691901, 0.321396172) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1125. CFrame.new(1.30056417, -1.52663159, -0.684035659, 0.872286379, -0.321394145, -0.368541002, 0.1355021, 0.883022726, -0.449344009, 0.469846606, 0.342018545, 0.813798249) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1126. CFrame.new(-0.0819211155, -1.98630702, -0.796365023, 0.84301424, -0.321394145, 0.431315303, 0.431316257, 0.883022726, -0.18503274, -0.321392775, 0.342018545, 0.883023262) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  1127. }, 0.3, false)
  1128. end
  1129. con:Disconnect()
  1130. attack = false
  1131. end
  1132. end
  1133. Mouse.Button1Down:connect(function()
  1134. if attack == false and oof == false then
  1135. oof = true
  1136. joj()
  1137. end
  1138. end)
  1139. Mouse.Button1Up:connect(function()
  1140. if attack == true and oof == true then
  1141. oof = false
  1142. end
  1143. end)
  1144. Mouse.KeyDown:connect(function(k)
  1145. k = k:lower()
  1146. if k == "t" then
  1147. ears()
  1148. end
  1149. end)
  1150. while true do
  1151. swait()
  1152. sref.CFrame = RightArm.CFrame * CFrame.new(0, -1.5, 0) * CFrame.fromEulerAnglesXYZ(-1.57, 0, 0)
  1153. for i, v in pairs(Character:GetChildren()) do
  1154. if v:IsA("Part") then
  1155. v.Material = "SmoothPlastic"
  1156. elseif v:IsA("Accessory") then
  1157. v:WaitForChild("Handle").Material = "SmoothPlastic"
  1158. end
  1159. end
  1160. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1161. velocity = RootPart.Velocity.y
  1162. sine = sine + change
  1163. local hit, pos = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  1164. if RootPart.Velocity.y > 1 and hit == nil then
  1165. Anim = "Jump"
  1166. if attack == false then
  1167. PlayAnimationFromTable({
  1168. CFrame.new(0, 0.0486936681, -0.0429394133, 1, 0, 0, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1169. CFrame.new(0, 1.48698187, -0.0992434025, 1, 0, 0, 0, 0.98480767, 0.173648626, 0, -0.173648626, 0.98480767) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1170. CFrame.new(1.66118193, 0.583681226, 0.430878729, 0.556951106, -0.772693694, -0.30454877, 0.830109596, 0.506009281, 0.234249175, -0.026898358, -0.383274168, 0.923242927) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1171. CFrame.new(-1.65963519, 0.695907593, 0.339572817, 0.482961893, 0.810776234, 0.330741376, -0.866026103, 0.498096228, 0.0435779653, -0.129409045, -0.307477146, 0.94271481) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1172. CFrame.new(0.499997795, -1.71809137, -0.102601528, 0.984807849, 3.55863392E-7, -0.173647791, 0.0593907312, 0.939692557, 0.336824298, 0.163175657, -0.342020214, 0.925416589) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1173. CFrame.new(-0.599241376, -1.29528463, -0.396836221, 0.992403984, 0.086823605, 0.0871558413, -0.118890785, 0.858931601, 0.498097867, -0.0316142589, -0.504676282, 0.862729669) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  1174. }, 0.3, false)
  1175. end
  1176. elseif RootPart.Velocity.y < -1 and hit == nil then
  1177. Anim = "Fall"
  1178. if attack == false then
  1179. PlayAnimationFromTable({
  1180. CFrame.new(0, -0.0520263538, -0.0354017057, 1, 0, 0, 0, 0.965925872, 0.258818984, 0, -0.258818984, 0.965925872) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1181. CFrame.new(0, 1.51533091, -0.10684365, 1, 0, 0, 0, 0.965925872, 0.258819342, 0, -0.258819342, 0.965925872) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1182. CFrame.new(1.67554009, 0.885679007, 0.385592818, 0.374123871, -0.696466088, -0.61234498, 0.914592147, 0.386364758, 0.119345918, 0.153468132, -0.604696095, 0.781530797) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1183. CFrame.new(-1.67474985, 0.999329269, 0.296636045, 0.250219911, 0.753912985, 0.607457995, -0.927206695, 0.367205799, -0.0738086402, -0.278707415, -0.544770718, 0.79091537) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1184. CFrame.new(0.504494727, -1.81757987, -0.0935191363, 0.984807849, -0.0449431092, -0.167730823, 0.059390761, 0.99484998, 0.0821366012, 0.163175508, -0.0908504426, 0.982405365) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1185. CFrame.new(-0.623603821, -1.49203336, -0.421764404, 0.992403865, 0.122534379, 0.0109562073, -0.118891656, 0.978150725, -0.17054674, -0.0316146575, 0.167948633, 0.985288799) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  1186. }, 0.3, false)
  1187. end
  1188. elseif Torsovelocity < 1 and hit ~= nil then
  1189. Anim = "Idle"
  1190. if attack == false then
  1191. change = 1
  1192. PlayAnimationFromTable({
  1193. CFrame.new(1.90734863E-6, 0, 0, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1194. CFrame.new(-1.90734863E-6, 1.49520886, -0.307131112, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1195. CFrame.new(1.37194049, -0.0753216743, -0.606283188, 0.229498088, 0.301554978, 0.925416291, 0.481514871, 0.791113436, -0.377204269, -0.845857084, 0.532169282, 0.0363558233) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1196. CFrame.new(-1.5, 0.0121572316, -0.267316073, 1, 0, 0, 0, 0.642788708, -0.766043544, 0, 0.766043544, 0.642788708) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1197. CFrame.new(0.699996471, -1.87938261, -0.684038877, 0.866025388, 0, -0.500000238, -0.171010032, 0.939692736, -0.296197921, 0.469846606, 0.342019886, 0.813797772) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1198. CFrame.new(-0.756342053, -1.83849907, -0.79636544, 0.939692736, 0, 0.342019886, 0.116977625, 0.939692736, -0.321393639, -0.321393639, 0.342019886, 0.883022428) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  1199. }, 0.3, false)
  1200. end
  1201. elseif Torsovelocity > 2 and hit ~= nil then
  1202. Anim = "Walk"
  1203. if attack == false then
  1204. change = 2
  1205. PlayAnimationFromTable({
  1206. CFrame.new(1.90734863E-6, 0, 0, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1207. CFrame.new(-1.90734863E-6, 1.49520886, -0.307131112, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1208. CFrame.new(1.37194049, -0.0753216743, -0.606283188, 0.229498088, 0.301554978, 0.925416291, 0.481514871, 0.791113436, -0.377204269, -0.845857084, 0.532169282, 0.0363558233) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1209. CFrame.new(-1.5, 0.0121572316, -0.267316073, 1, 0, 0, 0, 0.642788708, -0.766043544, 0, 0.766043544, 0.642788708) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1210. CFrame.new(0.5, -1.64 - 0.5 * math.cos(sine / 8) / 2, 0 + 2 * math.sin(sine / 8) / 2) * CFrame.Angles(math.rad(-70 * math.sin(sine / 8)), math.rad(-3), math.rad(0)),
  1211. CFrame.new(-0.5, -1.64 + 0.5 * math.cos(sine / 8) / 2, 0 - 2 * math.sin(sine / 8) / 2) * CFrame.Angles(math.rad(70 * math.sin(sine / 8)), math.rad(3), math.rad(0))
  1212. }, 0.3, false)
  1213. end
  1214. end
  1215. if 0 < #Effects then
  1216. for e = 1, #Effects do
  1217. if Effects[e] ~= nil then
  1218. local Thing = Effects[e]
  1219. if Thing ~= nil then
  1220. local Part = Thing[1]
  1221. local Mode = Thing[2]
  1222. local Delay = Thing[3]
  1223. local IncX = Thing[4]
  1224. local IncY = Thing[5]
  1225. local IncZ = Thing[6]
  1226. if Thing[2] == "Shoot" then
  1227. local Look = Thing[1]
  1228. local move = 5
  1229. local hit, pos = rayCast(Thing[4], Thing[1], move, Character)
  1230. if Thing[10] ~= nil then
  1231. da = pos
  1232. cf2 = CFrame.new(Thing[4], Thing[10].Position)
  1233. cfa = CFrame.new(Thing[4], pos)
  1234. tehCF = cfa:lerp(cf2, 0.2)
  1235. Thing[1] = tehCF.lookVector
  1236. end
  1237. local mag = (Thing[4] - pos).magnitude
  1238. Effects.Elect.Create(CFrame.new((Thing[4] + pos) / 2, pos), 4, 4, 4)
  1239. Effects.Sphere.Create(BrickColor.new("New Yeller"), CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 3, 3, 3, 5, 5, 5, 0.15)
  1240. Thing[4] = Thing[4] + Look * move
  1241. Thing[3] = Thing[3] - 1
  1242. if 2 < Thing[5] then
  1243. Thing[5] = Thing[5] - 0.3
  1244. Thing[6] = Thing[6] - 0.3
  1245. end
  1246. if hit ~= nil then
  1247. Thing[3] = 0
  1248. MagnitudeDamage(hit, 5, 10, 15, 0, "Normal", "161006093", 0.8)
  1249. ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1250. ref.Anchored = true
  1251. ref.CFrame = CFrame.new(pos)
  1252. Effects.Block.Create(BrickColor.new("New Yeller"), CFrame.new(pos), 1, 1, 1, 2, 2, 2, 0.05)
  1253. Effects.Sphere.Create(BrickColor.new("New Yeller"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.03)
  1254. game:GetService("Debris"):AddItem(ref, 1)
  1255. end
  1256. end
  1257. end
  1258. end
  1259. end
  1260. end
  1261. end
Advertisement
Add Comment
Please, Sign In to add comment