Prephy

Fraud

May 6th, 2021 (edited)
219
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. wait()
  2. game:GetService("RunService").Heartbeat:wait(1/30) -- Who are you?... You look familiar... by Ietahuoy,,,
  3. local plrr=owner
  4. script.Parent=nil
  5. local charr = plrr.Character
  6. local MainPosition=CFrame.new(0,0,0)
  7. if charr and charr:FindFirstChildOfClass("Part") then
  8.     MainPosition = charr:FindFirstChildOfClass("Part").CFrame
  9. elseif workspace:FindFirstChildOfClass("Part") then
  10.     MainPosition = workspace:FindFirstChildOfClass("Part").CFrame*CFrame.new(0,2,0)
  11. else
  12.     MainPosition = CFrame.new(0,4,0)
  13. end
  14. local sn = 0
  15. local attacking = false
  16. local repeatkey = false
  17. local Neck=CFrame.new(0,0,0)
  18. local Torso=CFrame.new(0,0,0)
  19. local LeftArm=CFrame.new(0,0,0)
  20. local RightArm=CFrame.new(0,0,0)
  21. local LeftLeg=CFrame.new(0,0,0)
  22. local RightLeg=CFrame.new(0,0,0)
  23. function alerp(tble,animspeed)
  24.     Torso=Torso:Lerp(tble[1],animspeed)
  25.     Neck=Neck:Lerp(tble[2],animspeed)
  26.     LeftArm=LeftArm:Lerp(tble[3],animspeed)
  27.     RightArm=RightArm:Lerp(tble[4],animspeed)
  28.     LeftLeg=LeftLeg:Lerp(tble[5],animspeed)
  29.     RightLeg=RightLeg:Lerp(tble[6],animspeed)
  30. end
  31. local stoped = false
  32. local W,A,S,D=false,false,false,false
  33. local fallingspeed = 0
  34. local falling = true local gothum = true local wave = false
  35. local walkspeed = 0.2 local CCF=nil
  36. local MainModel = Instance.new("Model",workspace) MainModel.Name = "Fraud" MainModel.Archivable=true
  37. local EffectModel = Instance.new("Model",MainModel) EffectModel.Name = "EffectModel" MainModel.Archivable=true
  38. local h=Instance.new("Part",MainModel)h.Size=Vector3.new(2,1,1)h.Color=Color3.new() h.Transparency=0 h.Anchored=true h.CanCollide=true h.Name="Head"
  39. local m=Instance.new("SpecialMesh",h)m.MeshType="Head"m.Scale=Vector3.new(1.25,1.25,1.25)
  40. local t=Instance.new("Part",MainModel)t.Material="Plastic"t.Size=Vector3.new(2,2,1)t.Color=Color3.new() t.Transparency=0 t.Anchored=true t.CanCollide=true t.Name="Torso"
  41. local ll=Instance.new("Part",MainModel)ll.Material="Plastic"ll.Size=Vector3.new(1,2,1)ll.Color=Color3.new() ll.Transparency=0 ll.Anchored=true ll.CanCollide=true ll.Name="Left Leg"
  42. local rl=Instance.new("Part",MainModel)rl.Material="Plastic"rl.Size=Vector3.new(1,2,1)rl.Color=Color3.new() rl.Transparency=0 rl.Anchored=true rl.CanCollide=true rl.Name="Right Leg"
  43. local la=Instance.new("Part",MainModel)la.Material="Plastic"la.Size=Vector3.new(1,2,1)la.Color=Color3.new() la.Transparency=0 la.Anchored=true la.CanCollide=true la.Name="Left Arm"
  44. local ra=Instance.new("Part",MainModel)ra.Material="Plastic"ra.Size=Vector3.new(1,2,1)ra.Color=Color3.new() ra.Transparency=0 ra.Anchored=true ra.CanCollide=true ra.Name="Right Arm"
  45. local hum=Instance.new("Humanoid",MainModel) hum.Name = "" hum.DisplayDistanceType = "None" hum.HealthDisplayType = "AlwaysOff"
  46. local hairat = Instance.new("Attachment") hairat.Parent = h hairat.Position = Vector3.new(0,0.6,0) hairat.Name = "HairAttachment"
  47. local hatat = Instance.new("Attachment") hatat.Parent = h hatat.Position = Vector3.new(0,0.6,0) hatat.Name = "HatAttachment"
  48. local ffat = Instance.new("Attachment") ffat.Parent = h ffat.Position = Vector3.new(0,0,-0.6) ffat.Name = "FaceFrontAttachment"
  49. local fcat = Instance.new("Attachment") fcat.Parent = h fcat.Position = Vector3.new(0,0,0) fcat.Name = "FaceCenterAttachment"
  50. local bbat = Instance.new("Attachment") bbat.Parent = t bbat.Position = Vector3.new(0,0,0.5) bbat.Name = "BodyBackAttachment"
  51. local bfat = Instance.new("Attachment") bfat.Parent = t bfat.Position = Vector3.new(0,0,-0.5) bfat.Name = "BodyFrontAttachment"
  52. local lcat = Instance.new("Attachment") lcat.Parent = t lcat.Position = Vector3.new(-1,1,0) lcat.Name = "LeftCollarAttachment"
  53. local necat = Instance.new("Attachment") necat.Parent = t necat.Position = Vector3.new(0,1,0) necat.Name = "NeckAttachment"
  54. local rcat = Instance.new("Attachment") rcat.Parent = t rcat.Position = Vector3.new(1,1,0) rcat.Name = "RightCollarAttachment"
  55. local wbat = Instance.new("Attachment") wbat.Parent = t wbat.Position = Vector3.new(0,-1,0.5) wbat.Name = "WaistBackAttachment"
  56. local wcat = Instance.new("Attachment") wcat.Parent = t wcat.Position = Vector3.new(0,-1,0) wcat.Name = "WaistCenterAttachment"
  57. local wfat = Instance.new("Attachment") wfat.Parent = t wfat.Position = Vector3.new(0,-1,-0.5) wfat.Name = "WaistFrontAttachment"
  58. local wfat = Instance.new("Attachment") wfat.Parent = ll wfat.Position = Vector3.new(0,-1,0) wfat.Name = "LeftFootAttachment"
  59. local wfat = Instance.new("Attachment") wfat.Parent = rl wfat.Position = Vector3.new(0,-1,0) wfat.Name = "RightFootAttachment"
  60. local wfat = Instance.new("Attachment") wfat.Parent = ra wfat.Position = Vector3.new(0,1,0) wfat.Name = "RightShoulderAttachment"
  61. local wfat = Instance.new("Attachment") wfat.Parent = ra wfat.Position = Vector3.new(0,-1,0) wfat.Name = "RightGripAttachment"
  62. local wfat = Instance.new("Attachment") wfat.Parent = la wfat.Position = Vector3.new(0,1,0) wfat.Name = "LeftShoulderAttachment"
  63. local wfat = Instance.new("Attachment") wfat.Parent = la wfat.Position = Vector3.new(0,-1,0) wfat.Name = "LeftGripAttachment"
  64. local cam = Instance.new("Part",workspace) cam.Name = "<["..plrr.Name.."]>" cam.Anchored=true cam.CanCollide=false cam.Transparency=1 cam.Size=Vector3.new()
  65. local mus = Instance.new("Sound") mus.Volume = 5 mus.Pitch = 1 mus.EmitterSize = 100 mus.SoundId = "rbxassetid://4456917336" mus.Parent = MainModel mus.Playing = true mus.Looped = true
  66. local muspos = nil muspos = mus.TimePosition local fixmus = false
  67. local EventBackup = Instance.new("RemoteEvent")
  68. EventBackup.Name = "InputEventFrom"..plrr.Name
  69. local CamBackup = Instance.new("RemoteEvent")
  70. CamBackup.Name = "CamEventFrom"..plrr.Name
  71.  
  72. function locals()
  73.    
  74.     NLS([[
  75.    
  76.     local Player = game:GetService("Players").LocalPlayer
  77. local Mouse = Player:GetMouse()
  78. local Event = game:GetService("JointsService"):WaitForChild("InputEventFrom"..Player.Name)
  79. local CEvent = game:GetService("JointsService"):WaitForChild("CamEventFrom"..Player.Name)
  80. local UIS = game:GetService("UserInputService")
  81. local h,t = Mouse.Hit,Mouse.Target
  82. local input = function(io,a)
  83.     if a then return end
  84.     local io = {KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
  85.     Event:FireServer(io)
  86. end
  87. UIS.InputBegan:Connect(input)
  88. UIS.InputEnded:Connect(input)
  89. while wait(1/30) do
  90.     CEvent:FireServer(workspace.Camera.CoordinateFrame)
  91.     local cam = workspace.Camera
  92.     cam.CameraSubject = workspace:FindFirstChild("<["..Player.Name.."]>")
  93.     cam.CameraType = "Custom"
  94.     cam.HeadLocked = true
  95.     cam.HeadScale = 1
  96.     cam.FieldOfView = 70  
  97.     if h~=Mouse.Hit or t~=Mouse.Target then
  98.         Event:FireServer({isMouse=true,Target=Mouse.Target,Hit=Mouse.Hit})
  99.         h,t=Mouse.Hit,Mouse.Target
  100.     end
  101. end
  102.    
  103.    
  104.    
  105.    
  106.     ]],plrr.PlayerGui)
  107.    
  108. end
  109.  
  110.  
  111.  
  112.  
  113. --local inputScript = script.Input:Clone()
  114. local EventBackupC = EventBackup:Clone()
  115. local CamBackupC = CamBackup:Clone()
  116. --local input = inputScript:Clone()
  117. --input.Parent = plrr:WaitForChild("PlayerGui")
  118. --input.Disabled = false
  119.  
  120. locals()
  121. local InputEvent = Instance.new("RemoteEvent")
  122. InputEvent.Name = "InputEventFrom"..plrr.Name
  123. InputEvent.Parent = game:GetService("JointsService")
  124. local CamEvent = Instance.new("RemoteEvent")
  125. CamEvent.Name = "CamEventFrom"..plrr.Name
  126. CamEvent.Parent = game:GetService("JointsService")
  127. CamEvent.OnServerEvent:Connect(function(plr, e)
  128.     CCF=e
  129. end)
  130. local CAS = {Actions={}}
  131. local fakeEvent = function()
  132.     local t = {_fakeEvent=true}
  133.     t.Connect = function(self,f)self.Function=f end
  134.     t.connect = t.Connect
  135.     return t
  136. end
  137. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  138. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  139. function CAS:BindAction(name,fun,touch,...)
  140.     CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  141. end
  142. function CAS:UnbindAction(name)
  143.     CAS.Actions[name] = nil
  144. end
  145. local function te(self,ev,...)
  146.     local t = m[ev]
  147.     if t and t._fakeEvent and t.Function then
  148.         t.Function(...)
  149.     end
  150. end
  151. local Mouse,mouse,UserInputService,ContextActionService
  152. do
  153. m.TrigEvent = te
  154. UIS.TrigEvent = te
  155. InputEvent.OnServerEvent:Connect(function(plr,io)
  156.     if plr~=plrr then return end
  157.     if io.isMouse then
  158.         m.Target = io.Target
  159.         m.Hit = io.Hit
  160.     elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  161.         if io.UserInputState == Enum.UserInputState.Begin then
  162.             m:TrigEvent("Button1Down")
  163.         else
  164.             m:TrigEvent("Button1Up")
  165.         end
  166.     else
  167.         for n,t in pairs(CAS.Actions) do
  168.             for _,k in pairs(t.Keys) do
  169.                 if k==io.KeyCode then
  170.                     t.Function(t.Name,io.UserInputState,io)
  171.                 end
  172.             end
  173.             end
  174.         if io.UserInputState == Enum.UserInputState.Begin then
  175.             m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  176.             UIS:TrigEvent("InputBegan",io,false)
  177.         else
  178.             m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  179.             UIS:TrigEvent("InputEnded",io,false)
  180.         end
  181.     end
  182. end)
  183. Mouse,mouse,UserInputService,ContextActionService,mausee = m,m,UIS,CAS,m
  184. end
  185. function EndScript() script:ClearAllChildren() script.Disabled = true script:Destroy() stoped=true EventBackup:Destroy() CamBackupC:Destroy()  EventBackupC:Destroy() pcall(function() game:GetService("JointsService")["InputEventFrom"..plrr.Name]:Destroy() game:GetService("JointsService")["CamEventFrom"..plrr.Name]:Destroy() end) end
  186. game.Players.PlayerRemoving:Connect(function(p)if p == plrr or p.Name == plrr.Name then EndScript() end end)
  187. function onChatted(msg) if (msg == ".Stop" or msg == ".stop" or msg == "/e .Stop" or msg == "/e .stop" or msg == "/e get/nog sr" or msg == "get/nog sr") then EndScript() elseif (msg == "/e wave" or msg == "/e Wave" or msg == "/e WAVE") then Wave() end end
  188. plrr.Chatted:connect(onChatted)
  189. function system()
  190.     game:GetService("RunService").Heartbeat:Connect(function()
  191.         if stoped == false and game.Players:FindFirstChild(plrr.Name) then sn=sn+(1/2)
  192.         if plrr and plrr.Character then local ch = plrr.Character plrr.Character=nil ch:Destroy() end
  193.         if MainModel == nil or MainModel.Parent ~= workspace or MainModel.Parent == nil or not MainModel then
  194.             MainModel = Instance.new("Model",workspace) MainModel.Name = "Fraud" MainModel.Archivable=true
  195.             EffectModel = Instance.new("Model",MainModel) EffectModel.Name = "EffectModel" MainModel.Archivable=true
  196.         end
  197.         if EffectModel == nil or EffectModel.Parent ~= MainModel or EffectModel.Parent == nil or not EffectModel then
  198.             EffectModel = Instance.new("Model",MainModel) EffectModel.Name = "EffectModel" MainModel.Archivable=true
  199.         end
  200.         if cam == nil or cam.Parent ~= workspace or cam.Parent == nil or not cam then
  201.             cam = Instance.new("Part",workspace) cam.Name = "<["..plrr.Name.."]>" cam.Anchored=true cam.CanCollide=false cam.Transparency=1 cam.Size=Vector3.new()
  202.         end
  203.         if h == nil or h.Parent ~= MainModel or h.Parent == nil or not h then
  204.             h=Instance.new("Part",MainModel)h.Size=Vector3.new(2,1,1)h.Color=Color3.new() h.Transparency=0 h.Anchored=true h.CanCollide=true h.Name="Head"
  205.             local m=Instance.new("SpecialMesh",h)m.MeshType="Head"m.Scale=Vector3.new(1.25,1.25,1.25)
  206.             local hairat = Instance.new("Attachment") hairat.Parent = h hairat.Position = Vector3.new(0,0.6,0) hairat.Name = "HairAttachment"
  207.             local hatat = Instance.new("Attachment") hatat.Parent = h hatat.Position = Vector3.new(0,0.6,0) hatat.Name = "HatAttachment"
  208.             local ffat = Instance.new("Attachment") ffat.Parent = h ffat.Position = Vector3.new(0,0,-0.6) ffat.Name = "FaceFrontAttachment"
  209.             local fcat = Instance.new("Attachment") fcat.Parent = h fcat.Position = Vector3.new(0,0,0) fcat.Name = "FaceCenterAttachment"      
  210.         end
  211.         if t == nil or t.Parent ~= MainModel or t.Parent == nil or not t then
  212.             t=Instance.new("Part",MainModel)t.Material="Plastic"t.Size=Vector3.new(2,2,1)t.Color=Color3.new() t.Transparency=0 t.Anchored=true t.CanCollide=true t.Name="Torso"
  213.             local bbat = Instance.new("Attachment") bbat.Parent = t bbat.Position = Vector3.new(0,0,0.5) bbat.Name = "BodyBackAttachment"
  214.             local bfat = Instance.new("Attachment") bfat.Parent = t bfat.Position = Vector3.new(0,0,-0.5) bfat.Name = "BodyFrontAttachment"
  215.             local lcat = Instance.new("Attachment") lcat.Parent = t lcat.Position = Vector3.new(-1,1,0) lcat.Name = "LeftCollarAttachment"
  216.             local necat = Instance.new("Attachment") necat.Parent = t necat.Position = Vector3.new(0,1,0) necat.Name = "NeckAttachment"
  217.             local rcat = Instance.new("Attachment") rcat.Parent = t rcat.Position = Vector3.new(1,1,0) rcat.Name = "RightCollarAttachment"
  218.             local wbat = Instance.new("Attachment") wbat.Parent = t wbat.Position = Vector3.new(0,-1,0.5) wbat.Name = "WaistBackAttachment"
  219.             local wcat = Instance.new("Attachment") wcat.Parent = t wcat.Position = Vector3.new(0,-1,0) wcat.Name = "WaistCenterAttachment"
  220.             local wfat = Instance.new("Attachment") wfat.Parent = t wfat.Position = Vector3.new(0,-1,-0.5) wfat.Name = "WaistFrontAttachment"  
  221.         end
  222.         if ll == nil or ll.Parent ~= MainModel or ll.Parent == nil or not ll then
  223.             ll=Instance.new("Part",MainModel)ll.Material="Plastic"ll.Size=Vector3.new(1,2,1)ll.Color=Color3.new() ll.Transparency=0 ll.Anchored=true ll.CanCollide=true ll.Name="Left Leg"
  224.             local wfat = Instance.new("Attachment") wfat.Parent = ll wfat.Position = Vector3.new(0,-1,0) wfat.Name = "LeftFootAttachment"
  225.         end
  226.         if rl == nil or rl.Parent ~= MainModel or rl.Parent == nil or not rl then
  227.             rl=Instance.new("Part",MainModel)rl.Material="Plastic"rl.Size=Vector3.new(1,2,1)rl.Color=Color3.new() rl.Transparency=0 rl.Anchored=true rl.CanCollide=true rl.Name="Right Leg"
  228.             local wfat = Instance.new("Attachment") wfat.Parent = rl wfat.Position = Vector3.new(0,-1,0) wfat.Name = "RightFootAttachment"
  229.         end
  230.         if la == nil or la.Parent ~= MainModel or la.Parent == nil or not la then
  231.             la=Instance.new("Part",MainModel)la.Material="Plastic"la.Size=Vector3.new(1,2,1)la.Color=Color3.new() la.Transparency=0 la.Anchored=true la.CanCollide=true la.Name="Left Arm"
  232.             local wfat = Instance.new("Attachment") wfat.Parent = ra wfat.Position = Vector3.new(0,1,0) wfat.Name = "RightShoulderAttachment"
  233.             local wfat = Instance.new("Attachment") wfat.Parent = ra wfat.Position = Vector3.new(0,-1,0) wfat.Name = "RightGripAttachment"
  234.         end
  235.         if ra == nil or ra.Parent ~= MainModel or ra.Parent == nil or not ra then
  236.             ra=Instance.new("Part",MainModel)ra.Material="Plastic"ra.Size=Vector3.new(1,2,1)ra.Color=Color3.new() ra.Transparency=0 ra.Anchored=true ra.CanCollide=true ra.Name="Right Arm"
  237.             local wfat = Instance.new("Attachment") wfat.Parent = la wfat.Position = Vector3.new(0,1,0) wfat.Name = "LeftShoulderAttachment"
  238.             local wfat = Instance.new("Attachment") wfat.Parent = la wfat.Position = Vector3.new(0,-1,0) wfat.Name = "LeftGripAttachment"      
  239.         end
  240.         if hum == nil or hum.Parent ~= MainModel or hum.Parent == nil or not hum then
  241.             hum=Instance.new("Humanoid",MainModel) hum.Name = "" hum.Name = "" hum.DisplayDistanceType = "None" hum.HealthDisplayType = "AlwaysOff"
  242.         end
  243.         if gothum == true then
  244.         cam.CFrame=MainPosition*Neck
  245.         else
  246.         cam.CFrame=MainPosition*Neck+Vector3.new(0,2.5,0)
  247.         end
  248.         cam.Anchored=true cam.CanCollide=false cam.Transparency=1 cam.Size=Vector3.new()
  249.         local chrrr = MainModel:GetChildren() for i=1,#chrrr do
  250.             if chrrr[i] == EffectModel or chrrr[i] == h or chrrr[i] == t or chrrr[i] == rl or chrrr[i] == hum or chrrr[i] == mus or chrrr[i] == ll or chrrr[i] == ra or chrrr[i] == la or chrrr[i]:IsA'Accessory' or chrrr[i]:IsA'Hat' or chrrr[i]:IsA'Shirt' or chrrr[i]:IsA'Pants' or chrrr[i]:IsA'BodyColors' or chrrr[i]:IsA'ShirtGraphic' or chrrr[i]:IsA'CharacterMesh' then else chrrr[i]:Destroy() end
  251.         end
  252.         if plrr and plrr:WaitForChild('Backpack') then plrr:WaitForChild('Backpack'):ClearAllChildren() end
  253.         local rc=Ray.new(MainPosition.p,(CFrame.new(0,-1,0).p).unit*4)
  254.         local pos,hit=workspace:FindPartOnRay(rc,MainModel,false,true)
  255.         if pos~=nil then falling=false fallingspeed=0 MainPosition=MainPosition*CFrame.new(0,hit.Y-MainPosition.Y+3,0)
  256.         else falling=true fallingspeed=fallingspeed+.06 MainPosition=MainPosition-Vector3.new(0,fallingspeed,0)end
  257.         if wave == false and wave == false and W or wave == false and A or wave == false and S or wave == false and D then MainPosition=CFrame.new(MainPosition.p,Vector3.new(CCF.x,MainPosition.y,CCF.z))end
  258.         local oldMainPosition=MainPosition
  259.         if W and wave == false then MainPosition=MainPosition*CFrame.new(0,0,walkspeed)end
  260.         if S and wave == false then MainPosition=MainPosition*CFrame.new(0,0,-walkspeed)end
  261.         if A and wave == false then MainPosition=MainPosition*CFrame.new(walkspeed,0,0)end
  262.         if D and wave == false then MainPosition=MainPosition*CFrame.new(-walkspeed,0,0)end
  263.         if gothum == true then
  264.             walkspeed = 0.2
  265.             mus.SoundId = "rbxassetid://4456917336"
  266.             if not falling and wave == false then
  267.                 if(MainPosition.X~=oldMainPosition.X or MainPosition.Z~=oldMainPosition.Z)then MainPosition=CFrame.new(MainPosition.p,oldMainPosition.p)
  268.                     alerp({CFrame.new(0,0,0)*CFrame.Angles(0,math.rad(180+5*math.sin(sn/4)),0),CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0),CFrame.new(-1.5,0-0.1*math.cos(sn/4),0+0.5*math.sin(sn/4))*CFrame.Angles(math.rad(0-40*math.sin(sn/4)),0,0),
  269.                     CFrame.new(1.5,0+0.1*math.cos(sn/4),0-0.5*math.sin(sn/4))*CFrame.Angles(math.rad(0+40*math.sin(sn/4)),0,0),CFrame.new(-.5,-2+0.2*math.cos(sn/4),0-1*math.sin(sn/4))*CFrame.Angles(math.rad(-10+60*math.sin(sn/4)),0,0),CFrame.new(.5,-2-0.2*math.cos(sn/4),0+1*math.sin(sn/4))*CFrame.Angles(math.rad(-10-60*math.sin(sn/4)),0,0)},.2)
  270.                 else
  271.                     alerp({CFrame.new(0,0+0.0075*math.sin(sn/4),0)*CFrame.Angles(0,math.rad(180),0),CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0-0.75*math.sin(sn/4)),0,0),CFrame.new(-1.5,0+0.01*math.sin(sn/4),0)*CFrame.Angles(math.rad(0+0.75*math.sin(sn/4)),0,math.rad(0-0.75*math.sin(sn/4))),
  272.                     CFrame.new(1.5,0+0.01*math.sin(sn/4),0)*CFrame.Angles(math.rad(0-0.75*math.sin(sn/4)),0,math.rad(0+0.75*math.sin(sn/4))),CFrame.new(-.5,-2-0.0075*math.sin(sn/4),0)*CFrame.Angles(0,0,0),CFrame.new(.5,-2-0.0075*math.sin(sn/4),0)*CFrame.Angles(0,0,0)},.2)
  273.                 end
  274.             elseif falling and wave == false then
  275.             if(MainPosition.X~=oldMainPosition.X or MainPosition.Z~=oldMainPosition.Z) and wave == false then MainPosition=CFrame.new(MainPosition.p,oldMainPosition.p)end
  276.                 if fallingspeed>0 then
  277.                     alerp({CFrame.new(0,0+0.0075*math.sin(sn/4),0)*CFrame.Angles(0,math.rad(180),0),CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0-0.75*math.sin(sn/4)),0,0),CFrame.new(-1.5,1.5,-0.5)*CFrame.Angles(math.rad(140+5*math.sin(sn/4)),0,math.rad(0-0.75*math.sin(sn/4))),
  278.                     CFrame.new(1.5,1.5,-0.5)*CFrame.Angles(math.rad(140-5*math.sin(sn/4)),0,math.rad(0+0.75*math.sin(sn/4))),CFrame.new(-.5,-2,0.25)*CFrame.Angles(math.rad(-15-5*math.sin(sn/4)),0,0),CFrame.new(.5,-2,0.25)*CFrame.Angles(math.rad(-20-5*math.sin(sn/4)),0,0)},.2)
  279.                 else
  280.                     alerp({CFrame.new(0,0,0)*CFrame.Angles(0,math.rad(180),0),CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0+1*math.sin(sn/4)),0,0),CFrame.new(-1.5,1,-0.75)*CFrame.Angles(math.rad(120+5*math.sin(sn/4)),0,math.rad(-5+2.5*math.sin(sn/4))),
  281.                     CFrame.new(1.5,1,-0.75)*CFrame.Angles(math.rad(120-5*math.sin(sn/4)),0,math.rad(5-2.5*math.sin(sn/4))),CFrame.new(-.5,-2,0.25)*CFrame.Angles(math.rad(-15-5*math.sin(sn/4)),0,0),CFrame.new(.5,-2,0.25)*CFrame.Angles(math.rad(-20-5*math.sin(sn/4)),0,0)},.2)
  282.                 end
  283.             end
  284.         elseif gothum == false then
  285.             walkspeed = 1
  286.             mus.SoundId = "rbxassetid://4442396924"
  287.             if(MainPosition.X~=oldMainPosition.X or MainPosition.Z~=oldMainPosition.Z) then MainPosition=CFrame.new(MainPosition.p,oldMainPosition.p)
  288.                 alerp({CFrame.new(0,2-0.25*math.sin(sn/12),0)*CFrame.Angles(math.rad(20-10*math.sin(sn/12)),math.rad(180),0),CFrame.new(0,1.5,-0.25-0.1*math.sin(sn/12))*CFrame.Angles(math.rad(-20-10*math.sin(sn/12)),0,0),CFrame.new(-1.5,0,0-0.1*math.sin(sn/12))*CFrame.Angles(math.rad(0+15*math.sin(sn/12)),math.rad(-25),0),
  289.                 CFrame.new(1.5,0,0-0.1*math.sin(sn/12))*CFrame.Angles(math.rad(0+15*math.sin(sn/12)),math.rad(15),0),CFrame.new(-.5,-1.25+0.25*math.sin(sn/12),-0.25)*CFrame.Angles(math.rad(-25+10*math.sin(sn/12)),0,0),CFrame.new(.5,-1.75-0.25*math.sin(sn/12),0)*CFrame.Angles(math.rad(-10+5*math.sin(sn/12)),0,0)},.1)
  290.                 if math.random(1,35) == 1 then
  291.                     Neck=Neck:Lerp(CFrame.new(math.random(-0.75,0.75),math.random(1.3,1.5),math.random(-0.4,0.3))*CFrame.Angles(math.rad(math.random(-75,75)),math.rad(math.random(-75,75)),math.rad(math.random(-75,75))),1)
  292.                 end
  293.             else
  294.                 alerp({CFrame.new(0,2-0.35*math.sin(sn/12),0)*CFrame.Angles(math.rad(10-5*math.sin(sn/12)),math.rad(180),0),CFrame.new(0,1.35,-0.35)*CFrame.Angles(math.rad(-35+15*math.sin(sn/12)),0,0),CFrame.new(-1.25,0-0.1*math.sin(sn/12),-0.25)*CFrame.Angles(math.rad(0-5*math.sin(sn/12)),math.rad(-45),0),
  295.                 CFrame.new(1.35,0-0.1*math.sin(sn/12),-0.25)*CFrame.Angles(math.rad(0-5*math.sin(sn/12)),math.rad(35),0),CFrame.new(-.5,-1.75+0.05*math.sin(sn/12),-0.15)*CFrame.Angles(math.rad(-5),0,0),CFrame.new(.5,-2+0.05*math.sin(sn/12),0)*CFrame.Angles(math.rad(-2.5),0,0)},.1)
  296.                 if math.random(1,35) == 1 then
  297.                     Neck=Neck:Lerp(CFrame.new(math.random(-0.75,0.75),math.random(1.3,1.5),math.random(-0.4,0.3))*CFrame.Angles(math.rad(math.random(-75,75)),math.rad(math.random(-75,75)),math.rad(math.random(-75,75))),1)
  298.                 end
  299.             end
  300.         end
  301.         if MainPosition.Y<=-200 then fallingspeed=0 MainPosition=MainPosition+Vector3.new(0,250,0)end
  302.         t.CFrame=MainPosition*Torso
  303.         h.CFrame=t.CFrame*Neck
  304.         ll.CFrame=t.CFrame*LeftLeg
  305.         rl.CFrame=t.CFrame*RightLeg
  306.         la.CFrame=t.CFrame*LeftArm
  307.         ra.CFrame=t.CFrame*RightArm
  308.         if mus.Parent == nil or mus.Parent ~= MainModel or mus == nil or not mus then
  309.             mus = Instance.new("Sound") mus.Volume = 5 mus.Pitch = 1 mus.EmitterSize = 100 mus.SoundId = "rbxassetid://4456917336" mus.Parent = MainModel mus.Playing = true mus.Looped = true mus.TimePosition = muspos fixmus = true
  310.         elseif fixmus == false then
  311.             mus.Playing = true
  312.             muspos = mus.TimePosition
  313.         else
  314.             fixmus = false
  315.         end
  316.         if plrr and plrr:WaitForChild("PlayerGui"):FindFirstChild("Input") == nil then
  317.         end
  318.         if plrr and plrr:WaitForChild("PlayerGui"):FindFirstChild("Input") then
  319.             plrr:WaitForChild("PlayerGui").Input.Disabled = false
  320.         end
  321.         if plrr and game:GetService("JointsService"):FindFirstChild("InputEventFrom"..plrr.Name) == nil then
  322.             local NewInput = EventBackupC:Clone()
  323.             NewInput.Parent = game:GetService("JointsService")
  324.             do
  325.             m.TrigEvent = te
  326.             UIS.TrigEvent = te
  327.             NewInput.OnServerEvent:Connect(function(plr,io)
  328.                 if plr~=plrr then return end
  329.                 if io.isMouse then
  330.                     m.Target = io.Target
  331.                     m.Hit = io.Hit
  332.                 elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  333.                     if io.UserInputState == Enum.UserInputState.Begin then
  334.                         m:TrigEvent("Button1Down")
  335.                     else
  336.                         m:TrigEvent("Button1Up")
  337.                     end
  338.                 else
  339.                     for n,t in pairs(CAS.Actions) do
  340.                         for _,k in pairs(t.Keys) do
  341.                             if k==io.KeyCode then
  342.                                 t.Function(t.Name,io.UserInputState,io)
  343.                             end
  344.                         end
  345.                         end
  346.                     if io.UserInputState == Enum.UserInputState.Begin then
  347.                         m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  348.                         UIS:TrigEvent("InputBegan",io,false)
  349.                     else
  350.                         m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  351.                         UIS:TrigEvent("InputEnded",io,false)
  352.                     end
  353.                 end
  354.             end)
  355.             Mouse,mouse,UserInputService,ContextActionService,mausee = m,m,UIS,CAS,m
  356.             end
  357.             if plrr and plrr:WaitForChild("PlayerGui"):FindFirstChild("Input") then
  358.                 plrr:WaitForChild("PlayerGui"):FindFirstChild("Input"):Destroy()
  359.             end    
  360.         end
  361.         if plrr and game:GetService("JointsService"):FindFirstChild("CamEventFrom"..plrr.Name) == nil then
  362.             local NewCam = CamBackupC:Clone()
  363.             NewCam.Parent = game:GetService("JointsService")
  364.             NewCam.OnServerEvent:Connect(function(plr, e)
  365.                 CCF=e
  366.             end)
  367.         end
  368.         elseif stoped == true or plrr == nil or not plrr or game.Players:FindFirstChild(plrr.Name) == nil or not game.Players:FindFirstChild(plrr.Name) then
  369.             if MainModel then MainModel:Destroy() end
  370.             if cam then cam:Destroy() end
  371.             if mus then mus:Destroy() end
  372.         end
  373.     end)
  374. end
  375. spawn(system)
  376. function Wave()
  377.     attacking = true
  378.     local waving = 0
  379.     wave = true
  380.     repeat game:GetService("RunService").Heartbeat:wait() waving=waving+1
  381.         alerp({CFrame.new(0,0+0.0075*math.sin(sn/4),0)*CFrame.Angles(0,math.rad(180),math.rad(10)),CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0-0.75*math.sin(sn/4)),0,math.rad(-10)),CFrame.new(-1.65,0.35+0.01*math.sin(sn/4),0)*CFrame.Angles(math.rad(0+0.75*math.sin(sn/4)),0,math.rad(-30-0.75*math.sin(sn/4))),
  382.         CFrame.new(1.75-0.5*math.sin(sn/4),1.25+1*math.sin(sn/4),0)*CFrame.Angles(math.rad(180-0.75*math.sin(sn/4)),0,math.rad(50-75*math.sin(sn/4))),CFrame.new(-.7,-1.9-0.0075*math.sin(sn/4),0)*CFrame.Angles(0,0,math.rad(-10)),CFrame.new(.3,-2.1-0.0075*math.sin(sn/4),0)*CFrame.Angles(0,0,math.rad(-10))},.2)
  383.     until waving >= 100
  384.     wave=false
  385.     attacking = false
  386. end
  387. function cr(pos,dir,ran,ignor)
  388.     local ray = Ray.new(pos,(dir-pos).unit*ran)
  389.     local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignor or {MainModel,EffectModel},false,true)
  390.     return part,pos,norm,(pos and (pos-pos).magnitude)
  391. end
  392. function InstanceNW(typp,anth)
  393.     local part = Instance.new(typp)
  394.     if anth ~= nil then for i,v in next, anth do pcall(function() part[i] = v end) end end
  395.     return part
  396. end
  397. --Effect({cf=MainPosition,moveto=Mouse.Hit.p,clr=Color3.new(1,0,0),clr2=Color3.new(0,0,0),mtype="Box",waits=100,size=Vector3.new(3,3,3),size2=Vector3.new(3,3,3),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0,tran2=1})
  398. function Effect(tblee)
  399.     coroutine.resume(coroutine.create(function()
  400.         local origpos = (tblee.cf or nil)
  401.         local moveto = (tblee.moveto or nil)
  402.         local color = (tblee.clr or Color3.new(0,0,0))
  403.         local color2 = (tblee.clr2 or nil)
  404.         local defaultsize = (tblee.size or Vector3.new(2,2,2))
  405.         local material = (tblee.mat or "Neon")
  406.         local locker = (tblee.lock or false)
  407.         local rotateX = (tblee.radX or 0)
  408.         local rotateY = (tblee.radY or 0)
  409.         local rotateZ = (tblee.radZ or 0)
  410.         local secondsize = (tblee.size2 or Vector3.new(4,4,4))
  411.         local acttime = (tblee.waits or 100)
  412.         local transpar = (tblee.tran or 0)
  413.         local transpar2 = (tblee.tran2 or 1)
  414.         local typeofmesh = (tblee.mtype or "S")
  415.         local movingspeed = nil
  416.         local mesh = nil
  417.         if typeof(moveto) == "CFrame"then moveto=moveto.p end
  418.         if typeof(color) == "BrickColor"then color=color.Color end
  419.         if typeof(color2) == "BrickColor"then color2=color2.Color end
  420.         if origpos then
  421.         local p=Instance.new("Part",EffectModel)p.Anchored=true p.CanCollide=false p.Color=color p.CFrame=origpos p.Material=material p.Size=Vector3.new(1,1,1)p.CanCollide=false p.Transparency=transpar p.CastShadow=false p.Locked=true
  422.         if typeofmesh == "Box" or typeofmesh == "B" or typeofmesh == "1" then
  423.             mesh=Instance.new("BlockMesh",p)mesh.Scale=defaultsize
  424.         elseif typeofmesh == "Sphere" or typeofmesh == "S" or typeofmesh == "2" then
  425.             mesh=Instance.new("SpecialMesh",p)mesh.MeshType="Sphere"mesh.Scale=defaultsize
  426.         elseif typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
  427.             mesh=Instance.new("SpecialMesh",p)mesh.MeshType="Cylinder"mesh.Scale=defaultsize
  428.         end
  429.         if locker == true then
  430.             p.Position = origpos.p
  431.             if typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
  432.                 p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-(p.Size.Z/1.5))*CFrame.Angles(0,math.rad(90),0)
  433.             else
  434.                 p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-(p.Size.Z/1.5))
  435.             end
  436.         else
  437.             if typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
  438.                 p.CFrame = origpos*CFrame.Angles(0,math.rad(90),0)
  439.             else
  440.                 p.CFrame = origpos
  441.             end
  442.         end
  443.         if mesh then
  444.             if  moveto then
  445.                 movingspeed=(origpos.p - moveto).Magnitude/acttime
  446.             end
  447.             local endsize=(defaultsize - secondsize)
  448.             local endtranpar=transpar-transpar2
  449.             for i = 1, acttime+1 do game:GetService("RunService").Heartbeat:wait()
  450.                 mesh.Scale=mesh.Scale-endsize/acttime
  451.                 p.Transparency = p.Transparency - endtranpar/acttime
  452.                 p.CFrame=p.CFrame*CFrame.Angles(math.rad(rotateX),math.rad(rotateY),math.rad(rotateZ))
  453.                 if color2 then
  454.                     p.Color = color:Lerp(color2,i/acttime)
  455.                 end
  456.                 if moveto ~= nil then
  457.                     local a = p.Orientation
  458.                     if typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
  459.                         p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-movingspeed)*CFrame.Angles(0,math.rad(90),0)
  460.                     else
  461.                         p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-movingspeed)
  462.                     end
  463.                     p.Orientation = a
  464.                 end
  465.             end
  466.             p:Destroy()
  467.         end
  468.         elseif origpos == nil then
  469.         warn("Origpos is nil!")
  470.         end
  471.     end))
  472. end
  473. --LightningBolt({startp=MainPosition,endp=Mouse.Hit.p,rdm=3,ss=2,tran=100,clr=Color3.new(1,0,0),clr2=Color3.new(0,0,0),mesh="Cylinder",parts=true,wait=0,size=1,size2=0,crtn=true})
  474. function LightningBolt(tblee)
  475.     local startpos = (tblee.startp or nil)
  476.     local endpos = (tblee.endp or nil)
  477.     local randomz = (tblee.rdm or 1)
  478.     local segmentsize = (tblee.ss or 2)
  479.     local fadetime = (tblee.tran or 75)
  480.     local color = (tblee.clr or Color3.new(0,0,0))
  481.     local color2 = (tblee.clr2 or Color3.new(0,0,0))
  482.     local segmentwaiting = (tblee.wait or 0)
  483.     local defaultsize = (tblee.size or 1)
  484.     local corout = (tblee.crtn or false)
  485.     local meshtype = (tblee.mesh or "Box")
  486.     local secondsize = (tblee.size2 or 1)
  487.     local endparts = (tblee.parts or true)
  488.     local endsize = (defaultsize-secondsize)
  489.     if typeof(color) == "BrickColor"then color=color.Color end
  490.     if typeof(startpos) == "CFrame"then startpos=startpos.p end
  491.     if typeof(endpos) == "CFrame"then endpos=endpos.p end
  492.     if startpos and endpos then
  493.     local magnitude = (startpos-endpos).magnitude local cframe = CFrame.new(startpos,endpos)
  494.     if corout == true then
  495.         coroutine.resume(coroutine.create(function()
  496.             local oldsegment = nil
  497.             for i=1,magnitude,segmentsize do
  498.                 local ex=CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),math.rad(math.random(360)))*CFrame.new(math.random(randomz*100)/100,0,0)
  499.                 local new=cframe*CFrame.new(0,0,-i/magnitude*magnitude)*ex
  500.                 if oldsegment then
  501.                     if meshtype == nil or meshtype == "Box" then
  502.                         local p=Instance.new("Part",EffectModel)p.Anchored=true p.CanCollide=false p.Color=color p.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude/2)p.Material="Neon"p.Size=Vector3.new()p.CanCollide=false p.CastShadow=false p.Locked=true
  503.                         local mesh=Instance.new("BlockMesh",p)mesh.Scale=Vector3.new(10*defaultsize,10*defaultsize,(new.p-oldsegment.p).magnitude*20)
  504.                         coroutine.resume(coroutine.create(function()
  505.                             for i=1,fadetime do game:GetService("RunService").Heartbeat:wait()
  506.                                 if color2 then
  507.                                     p.Color = color:Lerp(color2,i/fadetime)
  508.                                 end
  509.                                 mesh.Scale=mesh.Scale-Vector3.new(10*(endsize/fadetime),10*(endsize/fadetime),0)
  510.                                 p.Transparency=p.Transparency+1/fadetime
  511.                             end
  512.                             p:Destroy()
  513.                         end))
  514.                     elseif meshtype == "Cylinder" then
  515.                         local p=Instance.new("Part",EffectModel)p.Anchored=true p.CanCollide=false p.Color=color p.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude/2)*CFrame.Angles(0,math.rad(90),0) p.Material="Neon"p.Size=Vector3.new()p.CanCollide=false p.CastShadow=false p.Locked=true
  516.                         local mesh=Instance.new("SpecialMesh",p)mesh.MeshType="Cylinder"mesh.Scale=Vector3.new((new.p-oldsegment.p).magnitude*20,10*defaultsize,10*defaultsize)
  517.                         local p2=nil local m=nil
  518.                         if endparts == true then
  519.                             p2=Instance.new("Part",EffectModel)p2.Anchored=true p2.CanCollide=false p2.Color=color p2.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude) p2.Material="Neon"p2.Size=Vector3.new()p2.CanCollide=false
  520.                             m=Instance.new("SpecialMesh",p2)m.MeshType="Sphere"m.Scale=Vector3.new(10*defaultsize,10*defaultsize,10*defaultsize)
  521.                         end
  522.                         coroutine.resume(coroutine.create(function()
  523.                             for i=1,fadetime do game:GetService("RunService").Heartbeat:wait()
  524.                                 if color2 then
  525.                                     p.Color = color:Lerp(color2,i/fadetime)
  526.                                     if endparts == true then
  527.                                         p2.Color = color:Lerp(color2,i/fadetime)
  528.                                     end
  529.                                 end
  530.                                 if endparts == true then
  531.                                     m.Scale=m.Scale-Vector3.new(10*(endsize/fadetime),10*(endsize/fadetime),10*(endsize/fadetime))
  532.                                     p2.Transparency=p2.Transparency+1/fadetime
  533.                                 end
  534.                                 mesh.Scale=mesh.Scale-Vector3.new(0,10*(endsize/fadetime),10*(endsize/fadetime))
  535.                                 p.Transparency=p.Transparency+1/fadetime
  536.                             end
  537.                             p:Destroy()
  538.                             if endparts then
  539.                                 p2:Destroy()
  540.                             end
  541.                         end))
  542.                     end
  543.                     oldsegment=new
  544.                 else
  545.                     oldsegment=new
  546.                 end
  547.                 if segmentwaiting~=0 then wait(segmentwaiting) end
  548.             end
  549.         end))
  550.     elseif corout == false then
  551.         local oldsegment = nil
  552.         for i=1,magnitude,segmentsize do
  553.             local ex=CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),math.rad(math.random(360)))*CFrame.new(math.random(randomz*100)/100,0,0)
  554.             local new=cframe*CFrame.new(0,0,-i/magnitude*magnitude)*ex
  555.             if oldsegment then
  556.                 if meshtype == nil or meshtype == "Box" then
  557.                     local p=Instance.new("Part",EffectModel)p.Anchored=true p.CanCollide=false p.Color=color p.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude/2)p.Material="Neon"p.Size=Vector3.new()p.CanCollide=false p.CastShadow=false p.Locked=true
  558.                     local mesh=Instance.new("BlockMesh",p)mesh.Scale=Vector3.new(10*defaultsize,10*defaultsize,(new.p-oldsegment.p).magnitude*20)
  559.                     coroutine.resume(coroutine.create(function()
  560.                         for i=1,fadetime do game:GetService("RunService").Heartbeat:wait()
  561.                             if color2 then
  562.                                 p.Color = color:Lerp(color2,i/fadetime)
  563.                             end
  564.                             mesh.Scale=mesh.Scale-Vector3.new(10*(endsize/fadetime),10*(endsize/fadetime),0)
  565.                             p.Transparency=p.Transparency+1/fadetime
  566.                         end
  567.                         p:Destroy()
  568.                     end))
  569.                 elseif meshtype == "Cylinder" then
  570.                     local p=Instance.new("Part",EffectModel)p.Anchored=true p.CanCollide=false p.Color=color p.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude/2)*CFrame.Angles(0,math.rad(90),0) p.Material="Neon"p.Size=Vector3.new()p.CanCollide=false p.CastShadow=false p.Locked=true
  571.                     local mesh=Instance.new("SpecialMesh",p)mesh.MeshType="Cylinder"mesh.Scale=Vector3.new((new.p-oldsegment.p).magnitude*20,10*defaultsize,10*defaultsize)
  572.                     local p2=nil local m=nil
  573.                     if endparts == true then
  574.                         p2=Instance.new("Part",EffectModel)p2.Anchored=true p2.CanCollide=false p2.Color=color p2.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude) p2.Material="Neon"p2.Size=Vector3.new()p2.CanCollide=false
  575.                         m=Instance.new("SpecialMesh",p2)m.MeshType="Sphere"m.Scale=Vector3.new(10*defaultsize,10*defaultsize,10*defaultsize)
  576.                     end
  577.                     coroutine.resume(coroutine.create(function()
  578.                         for i=1,fadetime do game:GetService("RunService").Heartbeat:wait()
  579.                             if color2 then
  580.                                 p.Color = color:Lerp(color2,i/fadetime)
  581.                                 if endparts == true then
  582.                                     p2.Color = color:Lerp(color2,i/fadetime)
  583.                                 end
  584.                             end
  585.                             if endparts == true then
  586.                                 m.Scale=m.Scale-Vector3.new(10*(endsize/fadetime),10*(endsize/fadetime),10*(endsize/fadetime))
  587.                                 p2.Transparency=p2.Transparency+1/fadetime
  588.                             end
  589.                             mesh.Scale=mesh.Scale-Vector3.new(0,10*(endsize/fadetime),10*(endsize/fadetime))
  590.                             p.Transparency=p.Transparency+1/fadetime
  591.                         end
  592.                         p:Destroy()
  593.                         if endparts then
  594.                             p2:Destroy()
  595.                         end
  596.                     end))
  597.                 end
  598.                 oldsegment=new
  599.             else
  600.                 oldsegment=new
  601.             end
  602.             if segmentwaiting~=0 then wait(segmentwaiting)end
  603.         end
  604.     end
  605.     elseif startpos == nil and endpos == nil then
  606.     warn("Endpos and Startpos is nil!")
  607.     elseif startpos == nil then
  608.     warn("Startpos is nil!")
  609.     elseif endpos == nil then
  610.     warn("Endpos is nil!")
  611.     end
  612. end
  613. function Kill(who)
  614.     coroutine.resume(coroutine.create(function()
  615.         if who.Parent ~= MainModel and who.Parent ~= EffectModel and who ~= MainModel and who ~= EffectModel and who ~= cam and who.Parent ~= cam and who ~= script and who.Parent ~= script and who:FindFirstChild("Killed") == nil then
  616.         InstanceNW("Folder",{Parent=who,Name="Killed"})
  617.         coroutine.resume(coroutine.create(function()
  618.             if who ~= nil and who:IsA("Model") then
  619.                 for i,v in next, who:GetDescendants() do if v:IsA"LocalScript" or v:IsA"Script" or v:IsA"ModuleScript" and v ~= script and v.Parent ~= script then v:destroy() end end
  620.                 if game.Players:GetPlayerFromCharacter(who) ~= nil then
  621.                     local plr = game.Players:GetPlayerFromCharacter(who)
  622.                     for i,v in next, game.Players[plr.Name]:WaitForChild("PlayerGui"):GetDescendants() do if v.ClassName == "Script" or v.ClassName == "ModuleScript" or v.ClassName == "LocalScript" and v ~= script and v.Parent ~= script then v:Destroy() end end
  623.                     for i,v in next, game.Players[plr.Name]:WaitForChild("Backpack"):GetDescendants() do if v.ClassName == "Script" or v.ClassName == "ModuleScript" or v.ClassName == "LocalScript" and v ~= script and v.Parent ~= script then v:Destroy() end end
  624.                 end
  625.             elseif who.Parent ~= nil and who.Parent:IsA("Model") then
  626.                 for i,v in next, who.Parent:GetDescendants() do if v:IsA"LocalScript" or v:IsA"Script" or v:IsA"ModuleScript" and v ~= script and v.Parent ~= script then v:destroy() end end
  627.                 if game.Players:GetPlayerFromCharacter(who.Parent) ~= nil then
  628.                     local plr = game.Players:GetPlayerFromCharacter(who.Parent)
  629.                     for i,v in next, game.Players[plr.Name]:WaitForChild("PlayerGui"):GetDescendants() do if v.ClassName == "Script" or v.ClassName == "ModuleScript" or v.ClassName == "LocalScript" and v ~= script and v.Parent ~= script then v:Destroy() end end
  630.                     for i,v in next, game.Players[plr.Name]:WaitForChild("Backpack"):GetDescendants() do if v.ClassName == "Script" or v.ClassName == "ModuleScript" or v.ClassName == "LocalScript" and v ~= script and v.Parent ~= script then v:Destroy() end end
  631.                 end
  632.             elseif who.Parent.Parent ~= nil and who.Parent.Parent:IsA("Model") then
  633.                 for i,v in next, who.Parent.Parent:GetDescendants() do if v:IsA"LocalScript" or v:IsA"Script" or v:IsA"ModuleScript" and v ~= script and v.Parent ~= script then v:destroy() end end
  634.                 if game.Players:GetPlayerFromCharacter(who.Parent.Parent) ~= nil then
  635.                     local plr = game.Players:GetPlayerFromCharacter(who.Parent.Parent)
  636.                     for i,v in next, game.Players[plr.Name]:WaitForChild("PlayerGui"):GetDescendants() do if v.ClassName == "Script" or v.ClassName == "ModuleScript" or v.ClassName == "LocalScript" and v ~= script and v.Parent ~= script then v:Destroy() end end
  637.                     for i,v in next, game.Players[plr.Name]:WaitForChild("Backpack"):GetDescendants() do if v.ClassName == "Script" or v.ClassName == "ModuleScript" or v.ClassName == "LocalScript" and v ~= script and v.Parent ~= script then v:Destroy() end end
  638.                 end
  639.             elseif who.Parent.Parent.Parent ~= nil and who.Parent.Parent.Parent:IsA("Model") then
  640.                 for i,v in next, who.Parent.Parent.Parent:GetDescendants() do if v:IsA"LocalScript" or v:IsA"Script" or v:IsA"ModuleScript" and v ~= script and v.Parent ~= script then v:destroy() end end
  641.                 if game.Players:GetPlayerFromCharacter(who.Parent.Parent.Parent) ~= nil then
  642.                     local plr = game.Players:GetPlayerFromCharacter(who.Parent.Parent.Parent)
  643.                     for i,v in next, game.Players[plr.Name]:WaitForChild("PlayerGui"):GetDescendants() do if v.ClassName == "Script" or v.ClassName == "ModuleScript" or v.ClassName == "LocalScript" and v ~= script and v.Parent ~= script then v:Destroy() end end
  644.                     for i,v in next, game.Players[plr.Name]:WaitForChild("Backpack"):GetDescendants() do if v.ClassName == "Script" or v.ClassName == "ModuleScript" or v.ClassName == "LocalScript" and v ~= script and v.Parent ~= script then v:Destroy() end end
  645.                 end
  646.             end
  647.         end))
  648.         spawn(function()
  649.             while who ~= nil do
  650.                 game:GetService("RunService").Heartbeat:wait()
  651.                 who:BreakJoints()
  652.                 if who:FindFirstChildOfClass("Humanoid") ~= nil then who:FindFirstChildOfClass("Humanoid").MaxHealth=nil who:FindFirstChildOfClass("Humanoid").Health=nil end
  653.             end
  654.         end)
  655.         local e = InstanceNW("Sound",{SoundId="rbxassetid://516789356",Volume=5,PlayOnRemove=true,Pitch=math.random(5,15)/10,Parent=who:FindFirstChildOfClass'Part'or who:FindFirstChildOfClass'MeshPart'or who:FindFirstChildOfClass'UnionOperation'}) e:Play() e:Destroy()
  656.         if who:FindFirstChildOfClass'Accessory' or who:FindFirstChildOfClass'Hat' or who:FindFirstChildOfClass'BodyColors' or who:FindFirstChildOfClass'Shirt' or who:FindFirstChildOfClass'Pants' or who:FindFirstChildOfClass'ShirtGraphic' or who:FindFirstChildOfClass'CharacterMesh' then
  657.             gothum = true
  658.             for _, a in pairs(MainModel:GetDescendants()) do
  659.                 if a:IsA'Accessory' or a:IsA'Hat' or a:IsA'BodyColors' or a:IsA'Shirt' or a:IsA'Pants' or a:IsA'ShirtGraphic' or a:IsA'CharacterMesh' then
  660.                     a:Destroy()
  661.                 elseif a:IsA'Part' and a.Name == "Head" and a:FindFirstChildOfClass'Decal' then
  662.                     a:FindFirstChildOfClass'Decal':Destroy()
  663.                 end
  664.             end
  665.             h.Color=Color3.new(0,0,0)t.Color=Color3.new(0,0,0)ll.Color=Color3.new(0,0,0)rl.Color=Color3.new(0,0,0)la.Color=Color3.new(0,0,0)ra.Color=Color3.new(0,0,0) 
  666.             local accs = {} local f = nil
  667.             for _, acc in pairs(who:GetDescendants()) do
  668.                 if acc:IsA'Accessory' or acc:IsA'Hat' or acc:IsA'BodyColors' or acc:IsA'Shirt' or acc:IsA'Pants' or acc:IsA'ShirtGraphic' or acc:IsA'CharacterMesh' then
  669.                     table.insert(accs,acc)
  670.                 elseif acc:IsA'Part' and acc.Name == "Head" and acc:FindFirstChildOfClass'Decal' then
  671.                     f = acc:FindFirstChildOfClass'Decal'.Texture
  672.                 end
  673.             end
  674.             for i=1,#accs do accs[i]:Clone().Parent=MainModel end
  675.             if f ~= nil then InstanceNW("Decal",{Parent=h,Texture=f,Face="Front"}) end
  676.         end
  677.         for _, part in pairs(who:GetDescendants()) do
  678.             coroutine.resume(coroutine.create(function()
  679.                 if part.ClassName == "Part" or part.ClassName == "MeshPart" or part.ClassName == "TrussPart" or part.ClassName == "WedgePart" or part.ClassName == "CornerWedgePart" or part.ClassName == "UnionOperation" or part.ClassName == "NegateOperation" or part.ClassName == "Seat" or part.ClassName == "VehicleSeat" or part.ClassName == "SpawnLocation" then
  680.                     part:BreakJoints() part.Anchored=false part.CanCollide=true part.Velocity=Vector3.new(math.random(-35,35),math.random(35,85),math.random(-35,35))
  681.                     Effect({cf=part.CFrame,moveto=t.CFrame,clr=part.Color,clr2=nil,mtype="B",waits=25,size=part.Size,size2=Vector3.new(0,0,0),radX=math.random(-5,5),radY=math.random(-5,5),radZ=math.random(-5,5),mat=part.Material,lock=false,tran=0,tran2=1})
  682.                     for i=1,2 do Effect({cf=part.CFrame,moveto=part.CFrame*CFrame.new(math.random(-5,5),math.random(-5,-1),math.random(-5,5)),clr=part.Color,clr2=Color3.new(0,0,0),mtype="B",waits=75,size=part.Size/math.random(2,5),size2=part.Size/math.random(6,10),radX=math.random(-15,15),radY=math.random(-15,15),radZ=math.random(-15,15),mat=part.Material,lock=false,tran=0,tran2=1}) end
  683.                     spawn(function() for i = 1,250 do game:GetService("RunService").Heartbeat:wait() part.Transparency=part.Transparency+1/250 end part:Destroy() end)
  684.                 end
  685.             end))
  686.         end
  687.         end
  688.     end))
  689. end
  690. function AoeDam(Where,Range)
  691.     coroutine.resume(coroutine.create(function()
  692.         if typeof(Where) == "CFrame"then Where=Where.p end
  693.         for index, a in pairs(workspace:GetDescendants()) do
  694.             if (a.Parent ~= MainModel and a.Parent ~= EffectModel and a ~= MainModel and a ~= EffectModel and a ~= cam and a.Parent ~= cam and a ~= script and a.Parent ~= script) and a.ClassName == "Part" or a.ClassName == "MeshPart" or a.ClassName == "TrussPart" or a.ClassName == "WedgePart" or a.ClassName == "CornerWedgePart" or a.ClassName == "UnionOperation" or a.ClassName == "NegateOperation" or a.ClassName == "Seat" or a.ClassName == "VehicleSeat" or a.ClassName == "SpawnLocation" then
  695.                 if a.Parent ~= nil and a.Parent:IsA("Model") and a.Parent.ClassName == "Model" and a.Size == Vector3.new(2,2,1) or a.Size == Vector3.new(2,2.1,1) or a.Size == Vector3.new(1,1.105,1) or a.Size == Vector3.new(1,1.227,1) or a.Size == Vector3.new(1,1.253,1) or a.Size == Vector3.new(1,1.277,1) or a.Size == Vector3.new(1,2,1) or a.Size == Vector3.new(2,1,1) or a.Name == "Head" or a.Name == "Torso" or a.Name == "Right Arm" or a.Name == "Left Arm" or a.Name == "Right Leg" or a.Name == "Left Leg" or a.Name == "UpperTorso" or a.Name == "HumanoidRootPart" or a.Name == "LowerTorso" or a.Name == "RightHand" or a.Name == "LeftHand" or a.Name == "RightFoot" or a.Name == "LeftFoot" or a.Name == "LeftUpperArm" or a.Name == "LeftLowerArm" or a.Name == "RightUpperArm" or a.Name == "RightLowerArm" or a.Name == "LeftUpperLeg" or a.Name == "LeftLowerLeg" or a.Name == "RightUpperLeg" or a.Name == "RightLowerLeg" then
  696.                     if (a.Position - Where).Magnitude <= Range+a.Size.Magnitude then
  697.                         Kill(a.Parent)
  698.                     end
  699.                 elseif a.Parent ~= nil and a.Parent.Parent ~= nil and a.Parent.Parent.Parent ~= nil and a.Parent.Parent.Parent.Parent ~= nil and a.Parent.Parent.Parent.Parent:IsA("Model") and a.Parent.Parent.Parent.Parent.ClassName == "Model" and a.Size == Vector3.new(2,2,1) or a.Size == Vector3.new(2,2.1,1) or a.Size == Vector3.new(1,1.105,1) or a.Size == Vector3.new(1,1.227,1) or a.Size == Vector3.new(1,1.253,1) or a.Size == Vector3.new(1,1.277,1) or a.Size == Vector3.new(1,2,1) or a.Size == Vector3.new(2,1,1) or a.Name == "Head" or a.Name == "Torso" or a.Name == "Right Arm" or a.Name == "Left Arm" or a.Name == "Right Leg" or a.Name == "Left Leg" or a.Name == "UpperTorso" or a.Name == "HumanoidRootPart" or a.Name == "LowerTorso" or a.Name == "RightHand" or a.Name == "LeftHand" or a.Name == "RightFoot" or a.Name == "LeftFoot" or a.Name == "LeftUpperArm" or a.Name == "LeftLowerArm" or a.Name == "RightUpperArm" or a.Name == "RightLowerArm" or a.Name == "LeftUpperLeg" or a.Name == "LeftLowerLeg" or a.Name == "RightUpperLeg" or a.Name == "RightLowerLeg" then
  700.                     if (a.Position - Where).Magnitude <= Range+a.Size.Magnitude then
  701.                         Kill(a.Parent.Parent)
  702.                     end
  703.                 elseif a.Parent ~= nil and a.Parent.Parent ~= nil and a.Parent.Parent.Parent ~= nil and a.Parent.Parent.Parent:IsA("Model") and a.Parent.Parent.Parent.ClassName == "Model" and a.Size == Vector3.new(2,2,1) or a.Size == Vector3.new(2,2.1,1) or a.Size == Vector3.new(1,1.105,1) or a.Size == Vector3.new(1,1.227,1) or a.Size == Vector3.new(1,1.253,1) or a.Size == Vector3.new(1,1.277,1) or a.Size == Vector3.new(1,2,1) or a.Size == Vector3.new(2,1,1) or a.Name == "Head" or a.Name == "Torso" or a.Name == "Right Arm" or a.Name == "Left Arm" or a.Name == "Right Leg" or a.Name == "Left Leg" or a.Name == "UpperTorso" or a.Name == "HumanoidRootPart" or a.Name == "LowerTorso" or a.Name == "RightHand" or a.Name == "LeftHand" or a.Name == "RightFoot" or a.Name == "LeftFoot" or a.Name == "LeftUpperArm" or a.Name == "LeftLowerArm" or a.Name == "RightUpperArm" or a.Name == "RightLowerArm" or a.Name == "LeftUpperLeg" or a.Name == "LeftLowerLeg" or a.Name == "RightUpperLeg" or a.Name == "RightLowerLeg" then
  704.                     if (a.Position - Where).Magnitude <= Range+a.Size.Magnitude then
  705.                         Kill(a.Parent.Parent)
  706.                     end
  707.                 elseif a.Parent ~= nil and a.Parent.Parent ~= nil and a.Parent.Parent:IsA("Model") and a.Parent.Parent.ClassName == "Model" and a.Size == Vector3.new(2,2,1) or a.Size == Vector3.new(2,2.1,1) or a.Size == Vector3.new(1,1.105,1) or a.Size == Vector3.new(1,1.227,1) or a.Size == Vector3.new(1,1.253,1) or a.Size == Vector3.new(1,1.277,1) or a.Size == Vector3.new(1,2,1) or a.Size == Vector3.new(2,1,1) or a.Name == "Head" or a.Name == "Torso" or a.Name == "Right Arm" or a.Name == "Left Arm" or a.Name == "Right Leg" or a.Name == "Left Leg" or a.Name == "UpperTorso" or a.Name == "HumanoidRootPart" or a.Name == "LowerTorso" or a.Name == "RightHand" or a.Name == "LeftHand" or a.Name == "RightFoot" or a.Name == "LeftFoot" or a.Name == "LeftUpperArm" or a.Name == "LeftLowerArm" or a.Name == "RightUpperArm" or a.Name == "RightLowerArm" or a.Name == "LeftUpperLeg" or a.Name == "LeftLowerLeg" or a.Name == "RightUpperLeg" or a.Name == "RightLowerLeg" then
  708.                     if (a.Position - Where).Magnitude <= Range+a.Size.Magnitude then
  709.                         Kill(a.Parent.Parent)
  710.                     end
  711.                 end
  712.             end
  713.         end
  714.     end))
  715. end
  716. Mouse.KeyDown:connect(function(key)
  717.     if stoped == false and game.Players:FindFirstChild(plrr.Name) then repeatkey=true
  718.     if key == "w" then
  719.         W=true
  720.     elseif key == "a" then
  721.         A=true
  722.     elseif key == "s" then
  723.         S=true
  724.     elseif key == "d" then
  725.         D=true
  726.     elseif key == "space" or key == "j" then
  727.         if falling == false then
  728.             falling=true MainPosition=MainPosition*CFrame.new(0,2,0)fallingspeed=fallingspeed-1
  729.         end
  730.     elseif key == "e" and attacking == false then
  731.         if gothum == false then
  732.         attacking = true
  733.         AoeDam(MainPosition,5)
  734.         attacking = false
  735.         else
  736.         attacking = true
  737.         gothum=false
  738.         attacking = false
  739.         end
  740.     elseif key == "q" and attacking == false then
  741.         if gothum == false then
  742.             attacking = true
  743.             local ran = math.random(-250,250)/50
  744.             for _,a in pairs(MainModel:GetChildren()) do
  745.                 if a:IsA'Part' then
  746.                     if a.Name == "Head" then
  747.                         Effect({cf=a.CFrame,moveto=Vector3.new(a.Position.X+ran,a.Position.Y+ran,a.Position.Z+ran),clr=a.Color,clr2=Color3.new(0,0,0),mtype="Box",waits=150,size=Vector3.new(a.Size.Y,a.Size.Y,a.Size.Y),size2=Vector3.new(a.Size.Y,a.Size.Y,a.Size.Y),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0,tran2=1})
  748.                         LightningBolt({startp=a.CFrame,endp=a.CFrame*CFrame.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)),rdm=1,ss=1,tran=25,clr=a.Color,clr2=Color3.new(0,0,0),mesh="Box",parts=true,wait=0.025,size=2,size2=0,crtn=true})
  749.                     else
  750.                         Effect({cf=a.CFrame,moveto=Vector3.new(a.Position.X+ran,a.Position.Y+ran,a.Position.Z+ran),clr=a.Color,clr2=Color3.new(0,0,0),mtype="Box",waits=150,size=a.Size,size2=a.Size,radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0,tran2=1})
  751.                         LightningBolt({startp=a.CFrame,endp=a.CFrame*CFrame.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)),rdm=1,ss=1,tran=25,clr=a.Color,clr2=Color3.new(0,0,0),mesh="Box",parts=true,wait=0.025,size=2,size2=0,crtn=true})                     
  752.                     end
  753.                 end
  754.             end
  755.             MainPosition = CFrame.new(Mouse.Hit.x,Mouse.Hit.y,Mouse.Hit.z)*CFrame.new(0,3,0) wait()
  756.             for _,a in pairs(MainModel:GetChildren()) do
  757.                 if a:IsA'Part' then
  758.                     if a.Name == "Head" then
  759.                         Effect({cf=a.CFrame,moveto=Vector3.new(a.Position.X+-ran,a.Position.Y+-ran,a.Position.Z+-ran),clr=a.Color,clr2=Color3.new(0,0,0),mtype="Box",waits=150,size=Vector3.new(a.Size.Y,a.Size.Y,a.Size.Y),size2=Vector3.new(a.Size.Y,a.Size.Y,a.Size.Y),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0,tran2=1})
  760.                         LightningBolt({startp=a.CFrame,endp=a.CFrame*CFrame.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)),rdm=1,ss=1,tran=25,clr=a.Color,clr2=Color3.new(0,0,0),mesh="Box",parts=true,wait=0.025,size=2,size2=0,crtn=true})
  761.                     else
  762.                         Effect({cf=a.CFrame,moveto=Vector3.new(a.Position.X+-ran,a.Position.Y+-ran,a.Position.Z+-ran),clr=a.Color,clr2=Color3.new(0,0,0),mtype="Box",waits=150,size=a.Size,size2=a.Size,radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0,tran2=1})
  763.                         LightningBolt({startp=a.CFrame,endp=a.CFrame*CFrame.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)),rdm=1,ss=1,tran=25,clr=a.Color,clr2=Color3.new(0,0,0),mesh="Box",parts=true,wait=0.025,size=2,size2=0,crtn=true})                     
  764.                     end
  765.                 end
  766.             end
  767.             attacking = false
  768.         end
  769.     elseif key == "r" and attacking == false then
  770.         if gothum == false then
  771.             attacking = true
  772.             gothum=true
  773.             attacking = false
  774.         end
  775.     elseif key == "t" and attacking == false then
  776.         if gothum == true then
  777.             Wave()
  778.         end
  779.     elseif key == "m" and attacking == false then
  780.         MainModel:Destroy()
  781.     end
  782.     end
  783. end)
  784. Mouse.KeyUp:connect(function(key)
  785.     if stoped == false and game.Players:FindFirstChild(plrr.Name) then
  786.     if key=="w" then
  787.         W=false
  788.     elseif key=="a" then
  789.         A=false
  790.     elseif key=="s" then
  791.         S=false
  792.     elseif key=="d" then
  793.         D=false
  794.     end
  795.     end
  796. end)
RAW Paste Data