Advertisement
memberhero

Fraud Test

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