Advertisement
danielaust

106

Feb 23rd, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151.  
  152.  
  153. Player=game:GetService("Players").LocalPlayer
  154. Character=Player.Character
  155.  
  156.  
  157. -------------------------------------------------------
  158. local Orbd = Instance.new("Part", Character)
  159. Orbd.Name = "Orbd"
  160. Orbd.Shape = Enum.PartType.Ball
  161. Orbd.CanCollide = false
  162. Orbd.BrickColor = BrickColor.new("Really black")
  163. Orbd.Transparency = 0
  164. Orbd.Material = "Neon"
  165. Orbd.Size = Vector3.new(0.2, 0.2, 0.2)
  166. Orbd.TopSurface = Enum.SurfaceType.Smooth
  167. Orbd.BottomSurface = Enum.SurfaceType.Smooth
  168.  
  169. local Weld = Instance.new("Weld", Orbd)
  170. Weld.Part0 = Character.Head
  171. Weld.Part1 = Orbd
  172. Weld.C1 = CFrame.new(-0.26, -0.24, 0.55)
  173.  
  174. --------------------------------------------------------
  175. local Orbvc = Instance.new("Part", Character)
  176. Orbvc.Name = "Orbvc"
  177. Orbvc.Shape = Enum.PartType.Ball
  178. Orbvc.CanCollide = false
  179. Orbvc.BrickColor = BrickColor.new("Really black")
  180. Orbvc.Transparency = 0
  181. Orbvc.Material = "Neon"
  182. Orbvc.Size = Vector3.new(0.2, 0.2, 0,2)
  183. Orbvc.TopSurface = Enum.SurfaceType.Smooth
  184. Orbvc.BottomSurface = Enum.SurfaceType.Smooth
  185.  
  186. local Weld = Instance.new("Weld", Orbvc)
  187. Weld.Part0 = Character.Head
  188. Weld.Part1 = Orbvc
  189. Weld.C1 = CFrame.new(0.26, -0.24, 0.55)
  190. ---------------------------------------------------------
  191. local Mask = Instance.new("Part", Character)
  192. Mask.Name = "Mask"
  193. Mask.CanCollide = false
  194. Mask.BrickColor = BrickColor.new("Mid gray")
  195. Mask.Transparency = 0
  196. Mask.Material = "Plastic"
  197. Mask.Size = Vector3.new(0.1, 0.1, 0.1)
  198. Mask.TopSurface = Enum.SurfaceType.Smooth
  199. Mask.BottomSurface = Enum.SurfaceType.Smooth
  200.  
  201. local Weld = Instance.new("Weld", Mask)
  202. Weld.Part0 = Character.Head
  203. Weld.Part1 = Mask
  204. Weld.C1 = CFrame.new(0, -0.1, 0.8)
  205.  
  206. local M1 = Instance.new("SpecialMesh")
  207. M1.Parent = Mask
  208. M1.MeshId = "http://www.roblox.com/asset/?id=0"
  209. M1.Scale = Vector3.new( 1, 1, 2)
  210. ----------------------------------------------------------
  211. local Hood = Instance.new("Part", Character)
  212. Hood.Name = "Hood"
  213. Hood.CanCollide = false
  214. Hood.BrickColor = BrickColor.new("Really black")
  215. Hood.Transparency = 0
  216. Hood.Material = "Plastic"
  217. Hood.Size = Vector3.new(0.1, 0.1, 0.1)
  218. Hood.TopSurface = Enum.SurfaceType.Smooth
  219. Hood.BottomSurface = Enum.SurfaceType.Smooth
  220.  
  221. local Weld = Instance.new("Weld", Hood)
  222. Weld.Part0 = Character.Head
  223. Weld.Part1 = Hood
  224. Weld.C1 = CFrame.new(0, -0.2, 0)
  225.  
  226. local M2 = Instance.new("SpecialMesh")
  227. M2.Parent = Hood
  228. M2.MeshId = "http://www.roblox.com/asset/?id=0"
  229. M2.Scale = Vector3.new( 1, 1.2, 1.1)
  230. ------------------------------------------------------
  231.  
  232. p = game.Players.LocalPlayer
  233. char049 = p.Character
  234.  
  235. char049.Shirt:Remove()
  236. for i,v in pairs(char049:GetChildren()) do if v:IsA("Pants") then v:Remove() end end
  237. wait()shirt = Instance.new("Shirt", char049)
  238. shirt.Name = "Shirt"
  239. pants = Instance.new("Pants", char049)
  240. pants.Name = "Pants"
  241.  
  242. char049.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=137681493"
  243. char049.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=137681493"
  244.  
  245.  
  246. -------------------------------------------------
  247. ---- Orbd,Orbvc,Mask,Hood
  248.  
  249. --[[NIGHTOWLACE_WEAPONRY]]--
  250. maincolor = game.Players.LocalPlayer.Character.Torso.BrickColor.Name
  251. secondcolor = "Really black"
  252.  
  253. wait(1 / 60)
  254. Effects = { }
  255. local Player = game.Players.localPlayer
  256. local Character = Player.Character
  257. local Humanoid = Character.Humanoid
  258. local mouse = Player:GetMouse()
  259. local LeftArm = Character["Left Arm"]
  260. local RightArm = Character["Right Arm"]
  261. local LeftLeg = Character["Left Leg"]
  262. local RightLeg = Character["Right Leg"]
  263. local Head = Character.Head
  264. local Torso = Character.Torso
  265. local cam = game.Workspace.CurrentCamera
  266. local RootPart = Character.HumanoidRootPart
  267. local RootJoint = RootPart.RootJoint
  268. local equipped = false
  269. local attack = false
  270. local Anim = 'Idle'
  271. local idle = 0
  272. local attacktype = 1
  273. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  274. local velocity = RootPart.Velocity.y
  275. local sine = 0
  276. local change = 1
  277. local grabbed = false
  278. local cn = CFrame.new
  279. local mr = math.rad
  280. local angles = CFrame.Angles
  281. local ud = UDim2.new
  282. local c3 = Color3.new
  283.  
  284. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  285. Humanoid.Animator:Destroy()
  286. Character.Animate:Destroy()
  287.  
  288. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  289. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  290. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  291.  
  292. RSH, LSH = nil, nil
  293.  
  294. RW = Instance.new("Weld")
  295. LW = Instance.new("Weld")
  296.  
  297. RH = Torso["Right Hip"]
  298. LH = Torso["Left Hip"]
  299.  
  300. RSH = Torso["Right Shoulder"]
  301. LSH = Torso["Left Shoulder"]
  302.  
  303. RSH.Parent = nil
  304. LSH.Parent = nil
  305.  
  306. RW.Name = "RW"
  307. RW.Part0 = Torso
  308. RW.C0 = cn(1.5, 0.5, 0)
  309. RW.C1 = cn(0, 0.5, 0)
  310. RW.Part1 = RightArm
  311. RW.Parent = Torso
  312.  
  313. LW.Name = "LW"
  314. LW.Part0 = Torso
  315. LW.C0 = cn(-1.5, 0.5, 0)
  316. LW.C1 = cn(0, 0.5, 0)
  317. LW.Part1 = LeftArm
  318. LW.Parent = Torso
  319.  
  320. function clerp(a, b, t)
  321. local qa = {
  322. QuaternionFromCFrame(a)
  323. }
  324. local qb = {
  325. QuaternionFromCFrame(b)
  326. }
  327. local ax, ay, az = a.x, a.y, a.z
  328. local bx, by, bz = b.x, b.y, b.z
  329. local _t = 1 - t
  330. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  331. end
  332.  
  333. function QuaternionFromCFrame(cf)
  334. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  335. local trace = m00 + m11 + m22
  336. if trace > 0 then
  337. local s = math.sqrt(1 + trace)
  338. local recip = 0.5 / s
  339. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  340. else
  341. local i = 0
  342. if m11 > m00 then
  343. i = 1
  344. end
  345. if m22 > (i == 0 and m00 or m11) then
  346. i = 2
  347. end
  348. if i == 0 then
  349. local s = math.sqrt(m00 - m11 - m22 + 1)
  350. local recip = 0.5 / s
  351. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  352. elseif i == 1 then
  353. local s = math.sqrt(m11 - m22 - m00 + 1)
  354. local recip = 0.5 / s
  355. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  356. elseif i == 2 then
  357. local s = math.sqrt(m22 - m00 - m11 + 1)
  358. local recip = 0.5 / s
  359. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  360. end
  361. end
  362. end
  363.  
  364. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  365. local xs, ys, zs = x + x, y + y, z + z
  366. local wx, wy, wz = w * xs, w * ys, w * zs
  367. local xx = x * xs
  368. local xy = x * ys
  369. local xz = x * zs
  370. local yy = y * ys
  371. local yz = y * zs
  372. local zz = z * zs
  373. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  374. end
  375.  
  376. function QuaternionSlerp(a, b, t)
  377. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  378. local startInterp, finishInterp;
  379. if cosTheta >= 0.0001 then
  380. if (1 - cosTheta) > 0.0001 then
  381. local theta = math.acos(cosTheta)
  382. local invSinTheta = 1 / math.sin(theta)
  383. startInterp = math.sin((1 - t) * theta) * invSinTheta
  384. finishInterp = math.sin(t * theta) * invSinTheta
  385. else
  386. startInterp = 1 - t
  387. finishInterp = t
  388. end
  389. else
  390. if (1 + cosTheta) > 0.0001 then
  391. local theta = math.acos(-cosTheta)
  392. local invSinTheta = 1 / math.sin(theta)
  393. startInterp = math.sin((t - 1) * theta) * invSinTheta
  394. finishInterp = math.sin(t * theta) * invSinTheta
  395. else
  396. startInterp = t - 1
  397. finishInterp = t
  398. end
  399. end
  400. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  401. end
  402.  
  403. function swait(num)
  404. if num == 0 or num == nil then
  405. game:service'RunService'.RenderStepped:wait(0)
  406. else
  407. for i = 0, num do
  408. game:service'RunService'.RenderStepped:wait(0)
  409. end
  410. end
  411. end
  412.  
  413. local RbxUtility = LoadLibrary("RbxUtility")
  414. local Create = RbxUtility.Create
  415.  
  416. function RemoveOutlines(part)
  417. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.jasonackSurface = 10, 10, 10, 10, 10, 10
  418. end
  419.  
  420. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  421. local Part = Create("Part"){
  422. formFactor = FormFactor,
  423. Parent = Parent,
  424. Reflectance = Reflectance,
  425. Transparency = Transparency,
  426. CanCollide = false,
  427. Locked = true,
  428. BrickColor = BrickColor.new(tostring(BColor)),
  429. Name = Name,
  430. Size = Size,
  431. Material = Material,
  432. }
  433. RemoveOutlines(Part)
  434. return Part
  435. end
  436.  
  437. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  438. local Msh = Create(Mesh){
  439. Parent = Part,
  440. Offset = OffSet,
  441. Scale = Scale,
  442. }
  443. if Mesh == "SpecialMesh" then
  444. Msh.MeshType = MeshType
  445. Msh.MeshId = MeshId
  446. end
  447. return Msh
  448. end
  449.  
  450. function CreateWeld(Parent, Part0, Part1, C0, C1)
  451. local Weld = Create("Weld"){
  452. Parent = Parent,
  453. Part0 = Part0,
  454. Part1 = Part1,
  455. C0 = C0,
  456. C1 = C1,
  457. }
  458. return Weld
  459. end
  460.  
  461. function rayCast(Position, Direction, Range, Ignore)
  462. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  463. end
  464.  
  465. function CreateSound(id, par, vol, pit)
  466. coroutine.resume(coroutine.create(function()
  467. local sou = Instance.new("Sound", par or workspace)
  468. sou.Volume = vol
  469. sou.Pitch = pit or 1
  470. sou.SoundId = id
  471. wait()
  472. sou:play()
  473. game:GetService("Debris"):AddItem(sou, 6)
  474. end))
  475. end
  476.  
  477. local function getclosest(obj, distance)
  478. local last, lastx = distance + 1
  479. for i, v in pairs(workspace:GetChildren()) do
  480. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  481. local t = v.Torso
  482. local dist = (t.Position - obj.Position).magnitude
  483. if dist <= distance then
  484. if dist < last then
  485. last = dist
  486. lastx = v
  487. end
  488. end
  489. end
  490. end
  491. return lastx
  492. end
  493.  
  494. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  495. for i, v in pairs(hit:GetChildren()) do
  496. if v:IsA("Humanoid") and hit.Name ~= Character.Name then
  497. local find = v:FindFirstChild("Hitz")
  498. if not find then
  499. if v.Parent:findFirstChild("Head") then
  500. local BillG = Create("BillboardGui"){
  501. Parent = v.Parent.Head,
  502. Size = UDim2.new(1, 0, 1, 0),
  503. Adornee = v.Parent.Head,
  504. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  505. }
  506. local TL = Create("TextLabel"){
  507. Parent = BillG,
  508. Size = UDim2.new(3, 3, 3, 3),
  509. BackgroundTransparency = 1,
  510. Text = tostring(damage).."-",
  511. TextColor3 = Color1.Color,
  512. TextStrokeColor3 = Color2.Color,
  513. TextStrokeTransparency = 0,
  514. TextXAlignment = Enum.TextXAlignment.Center,
  515. TextYAlignment = Enum.TextYAlignment.Center,
  516. FontSize = Enum.FontSize.Size18,
  517. Font = "ArialBold",
  518. }
  519. coroutine.resume(coroutine.create(function()
  520. wait(1)
  521. for i = 0, 1, .1 do
  522. wait(.1)
  523. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  524. end
  525. BillG:Destroy()
  526. end))
  527. end
  528. v.Health = v.Health - damage
  529. local bool = Create("BoolValue"){
  530. Parent = v,
  531. Name = 'Hitz',
  532. }
  533. if HSound ~= nil and HPitch ~= nil then
  534. CreateSound(HSound, hit, 1, HPitch)
  535. end
  536. game:GetService("Debris"):AddItem(bool, cooldown)
  537. end
  538. end
  539. end
  540. end
  541.  
  542.  
  543. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  544. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  545. prt.Anchored = true
  546. prt.CFrame = cframe
  547. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  548. game:GetService("Debris"):AddItem(prt, 10)
  549. if Type == 1 or Type == nil then
  550. table.insert(Effects, {
  551. prt,
  552. "Block1",
  553. delay,
  554. x3,
  555. y3,
  556. z3,
  557. msh
  558. })
  559. elseif Type == 2 then
  560. table.insert(Effects, {
  561. prt,
  562. "Block2",
  563. delay,
  564. x3,
  565. y3,
  566. z3,
  567. msh
  568. })
  569. end
  570. end
  571.  
  572. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  573. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  574. prt.Anchored = true
  575. prt.CFrame = cframe
  576. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  577. game:GetService("Debris"):AddItem(prt, 10)
  578. table.insert(Effects, {
  579. prt,
  580. "Cylinder",
  581. delay,
  582. x3,
  583. y3,
  584. z3,
  585. msh
  586. })
  587. end
  588.  
  589. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  590. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  591. prt.Anchored = true
  592. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  593. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  594. game:GetService("Debris"):AddItem(prt, 10)
  595. table.insert(Effects, {
  596. prt,
  597. "Cylinder",
  598. delay,
  599. x3,
  600. y3,
  601. z3,
  602. msh
  603. })
  604. end
  605.  
  606. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  607. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  608. prt.Anchored = true
  609. prt.CFrame = cframe
  610. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  611. game:GetService("Debris"):AddItem(prt, 10)
  612. table.insert(Effects, {
  613. prt,
  614. "Cylinder",
  615. delay,
  616. x3,
  617. y3,
  618. z3,
  619. msh
  620. })
  621. end
  622.  
  623. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  624. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  625. prt.Anchored = true
  626. prt.CFrame = cframe
  627. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  628. game:GetService("Debris"):AddItem(prt, 10)
  629. table.insert(Effects, {
  630. prt,
  631. "Cylinder",
  632. delay,
  633. x3,
  634. y3,
  635. z3,
  636. msh
  637. })
  638. end
  639.  
  640. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  641. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  642. prt.Anchored = true
  643. prt.CFrame = cframe
  644. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  645. game:GetService("Debris"):AddItem(prt, 10)
  646. table.insert(Effects, {
  647. prt,
  648. "Cylinder",
  649. delay,
  650. x3,
  651. y3,
  652. z3,
  653. msh
  654. })
  655. end
  656.  
  657. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  658. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  659. prt.Anchored = true
  660. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  661. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  662. local num = math.random(10, 50) / 1000
  663. game:GetService("Debris"):AddItem(prt, 10)
  664. table.insert(Effects, {
  665. prt,
  666. "Shatter",
  667. num,
  668. prt.CFrame,
  669. math.random() - math.random(),
  670. 0,
  671. math.random(50, 100) / 100
  672. })
  673. end
  674.  
  675.  
  676.  
  677.  
  678. for i = 0, 1, 0.05 do
  679. swait()
  680. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  681. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  682. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
  683. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3)
  684. if Torsovelocity > 2 then
  685. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2)
  686. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  687. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  688. elseif Torsovelocity < 1 then
  689. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
  690. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  691. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  692. end
  693. end
  694. attack = false
  695.  
  696.  
  697.  
  698. game:GetService'RunService'.Stepped:connect(function()
  699. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  700. velocity = RootPart.Velocity.y
  701. sine = sine + change
  702. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  703. if equipped == true or equipped == false then
  704. if RootPart.Velocity.y > 1 and hit == nil then
  705. Anim = "Jump"
  706. if attack == false then
  707. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  708. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  709. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
  710. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
  711. RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
  712. LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
  713. end
  714. elseif RootPart.Velocity.y < -1 and hit == nil then
  715. Anim = "Fall"
  716. if attack == false then
  717. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  718. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  719. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1)
  720. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
  721. RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  722. LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  723. end
  724. elseif Torsovelocity < 1 and hit ~= nil then
  725. Anim = "Idle"
  726. if attack == false then
  727. change = 1
  728. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1)
  729. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
  730. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(5 + 3 * math.cos(sine / 25))), 0.1)
  731. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.1)
  732. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 2 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  733. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 2 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  734. end
  735. elseif Torsovelocity > 2 and hit ~= nil then
  736. Anim = "Walk"
  737. if attack == false then
  738. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 5))), .2)
  739. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  740. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(4)), .2)
  741. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2)
  742. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 3), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  743. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 3), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  744. end
  745. end
  746. end
  747. if #Effects > 0 then
  748. for e = 1, #Effects do
  749. if Effects[e] ~= nil then
  750. local Thing = Effects[e]
  751. if Thing ~= nil then
  752. local Part = Thing[1]
  753. local Mode = Thing[2]
  754. local Delay = Thing[3]
  755. local IncX = Thing[4]
  756. local IncY = Thing[5]
  757. local IncZ = Thing[6]
  758. if Thing[1].Transparency <= 1 then
  759. if Thing[2] == "Block1" then
  760. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  761. local Mesh = Thing[1].Mesh
  762. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  763. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  764. elseif Thing[2] == "Block2" then
  765. Thing[1].CFrame = Thing[1].CFrame
  766. local Mesh = Thing[7]
  767. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  768. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  769. elseif Thing[2] == "Cylinder" then
  770. local Mesh = Thing[1].Mesh
  771. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  772. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  773. elseif Thing[2] == "Blood" then
  774. local Mesh = Thing[7]
  775. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  776. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  777. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  778. elseif Thing[2] == "Elec" then
  779. local Mesh = Thing[1].Mesh
  780. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  781. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  782. elseif Thing[2] == "Disappear" then
  783. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  784. elseif Thing[2] == "Shatter" then
  785. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  786. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  787. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  788. Thing[6] = Thing[6] + Thing[5]
  789. end
  790. else
  791. Part.Parent = nil
  792. table.remove(Effects, e)
  793. end
  794. end
  795. end
  796. end
  797. end
  798. end)
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807. p = (game.Players.LocalPlayer.Name)
  808. char = game.Players.LocalPlayer.Character
  809.  
  810.  
  811. local player = game.Players.LocalPlayer
  812. repeat wait() until player.Character.Humanoid
  813. local humanoid = player.Character.Humanoid
  814. local mouse = player:GetMouse()
  815.  
  816. for i,v in pairs(char:GetChildren()) do
  817. if v.ClassName == 'Accessory' then
  818. v:Destroy()
  819. end
  820. end
  821.  
  822. ScarySound1 = Instance.new("Sound")
  823. ScarySound1.Parent = char.Torso
  824. ScarySound1.SoundId = "rbxassetid://177339878"
  825. ScarySound1.Volume = .5
  826.  
  827. ScarySound2 = Instance.new("Sound")
  828. ScarySound2.Parent = char.Torso
  829. ScarySound2.SoundId = "rbxassetid://833620953"
  830. ScarySound2.Volume = 7
  831. ScarySound2.Looped = true
  832.  
  833. ScarySound3 = Instance.new("Sound")
  834. ScarySound3.Parent = char.Torso
  835. ScarySound3.SoundId = "rbxassetid://483810543"
  836. ScarySound3.Volume = 0.3
  837. ScarySound3.Looped = true
  838.  
  839. ScarySound4 = Instance.new("Sound")
  840. ScarySound4.Parent = char.Torso
  841. ScarySound4.SoundId = "rbxassetid://649587991"
  842. ScarySound4.Volume = 5
  843. ScarySound4.Looped = false
  844.  
  845. Punch = Instance.new("Sound")
  846. Punch.Parent = char.Torso
  847. Punch.SoundId = "rbxassetid://146938349"
  848. Punch.Volume = 1.5
  849. Punch.Looped = false
  850. Punch.Pitch = 0.8
  851.  
  852. hole = Instance.new("Sound")
  853. hole.Parent = char.Torso
  854. hole.SoundId = "rbxassetid://224339308"
  855. hole.Volume = .3
  856.  
  857.  
  858. game.Players.LocalPlayer.Character.Sound:Destroy()
  859.  
  860. function Normal()
  861. ScarySound3:Play()
  862. char.Humanoid.WalkSpeed = 18
  863. char.Head.face.Texture = "rbxassetid://0"
  864. char["Left Leg"].Transparency = 0
  865. char["Head"].Transparency = 0
  866. char["Right Leg"].Transparency = 0
  867. char["Torso"].Transparency = 0
  868. char["Left Arm"].Transparency = 0
  869. char["Right Arm"].Transparency = 0
  870. end
  871.  
  872. function GoInvisible()
  873. ScarySound3:Stop()
  874. ScarySound1:Stop()
  875. char.Humanoid.WalkSpeed = 120
  876. char.Head.face.Transparency = 1
  877. char["Left Leg"].Transparency = 0.5
  878. char["Head"].Transparency = 0.5
  879. char["Right Leg"].Transparency = 0.5
  880. char["Torso"].Transparency = 0.5
  881. char["Left Arm"].Transparency = 0.5
  882. char["Right Arm"].Transparency = 0.5
  883. Hood.Transparency = 0.5
  884. Mask.Transparency = 0.5
  885. Orbvc.Transparency = 0.5
  886. Orbd.Transparency = 0.5
  887. Orbvc.BrickColor = BrickColor.new("Really red")
  888. Orbd.BrickColor = BrickColor.new("Really red")
  889. wait(0.001)
  890. char["Left Leg"].Transparency = 0.6
  891. char["Head"].Transparency = 0.6
  892. char["Right Leg"].Transparency = 0.6
  893. char["Torso"].Transparency = 0.6
  894. char["Left Arm"].Transparency = 0.6
  895. char["Right Arm"].Transparency = 0.6
  896. Hood.Transparency = 0.6
  897. Mask.Transparency = 0.6
  898. Orbvc.Transparency = 0.6
  899. Orbd.Transparency = 0.6
  900. wait(0.001)
  901. char["Left Leg"].Transparency = 0.7
  902. char["Head"].Transparency = 0.7
  903. char["Right Leg"].Transparency = 0.7
  904. char["Torso"].Transparency = 0.7
  905. char["Left Arm"].Transparency = 0.7
  906. char["Right Arm"].Transparency = 0.7
  907. Hood.Transparency = 0.7
  908. Mask.Transparency = 0.7
  909. Orbvc.Transparency = 0.7
  910. Orbd.Transparency = 0.7
  911. wait(0.001)
  912. char["Left Leg"].Transparency = 1
  913. char["Head"].Transparency = 1
  914. char["Right Leg"].Transparency = 1
  915. char["Torso"].Transparency = 1
  916. char["Left Arm"].Transparency = 1
  917. char["Right Arm"].Transparency = 1
  918. Hood.Transparency = 1
  919. Mask.Transparency = 1
  920. Orbvc.Transparency = 1
  921. Orbd.Transparency = 1
  922. end
  923.  
  924. function GoVisible()
  925. ScarySound3:Play()
  926. char.Humanoid.WalkSpeed = 16
  927. ScarySound1:Play()
  928. char.Head.face.Transparency = 0
  929. Orbvc.BrickColor = BrickColor.new("Really black")
  930. Orbd.BrickColor = BrickColor.new("Really black")
  931. char["Left Leg"].Transparency = 0.9
  932. char["Head"].Transparency = 0.9
  933. char["Right Leg"].Transparency = 9
  934. char["Torso"].Transparency = 0.9
  935. char["Left Arm"].Transparency = 0.9
  936. char["Right Arm"].Transparency = 0.9
  937. Hood.Transparency = 0.9
  938. Mask.Transparency = 0.9
  939. Orbvc.Transparency = 0.9
  940. Orbd.Transparency = 0.9
  941. wait(0.001)
  942. char["Left Leg"].Transparency = 0.7
  943. char["Head"].Transparency = 0.7
  944. char["Right Leg"].Transparency = 0.7
  945. char["Torso"].Transparency = 0.7
  946. char["Left Arm"].Transparency = 0.7
  947. char["Right Arm"].Transparency = 0.7
  948. Hood.Transparency = 0.7
  949. Mask.Transparency = 0.7
  950. Orbvc.Transparency = 0.7
  951. Orbd.Transparency = 0.7
  952. wait(0.001)
  953. char["Left Leg"].Transparency = 0
  954. char["Head"].Transparency = 0
  955. char["Right Leg"].Transparency = 0
  956. char["Torso"].Transparency = 0
  957. char["Left Arm"].Transparency = 0
  958. char["Right Arm"].Transparency = 0
  959. Hood.Transparency = 0
  960. Mask.Transparency = 0
  961. Orbvc.Transparency = 0
  962. Orbd.Transparency = 0
  963. end
  964.  
  965. Normal()
  966.  
  967.  
  968.  
  969. mouse.KeyDown:connect(function(key)
  970. if key == "z" then
  971. if char.Head.Transparency == 0 then
  972. GoInvisible()
  973.  
  974. elseif char.Head.Transparency == 1 then
  975. GoVisible()
  976. end
  977. end end)
  978.  
  979. mouse.KeyDown:connect(function(key)
  980. if key == "x" then
  981. if ScarySound2.IsPlaying == false then
  982. ScarySound2:Play()
  983. elseif ScarySound2.IsPlaying == true then
  984. ScarySound2:Stop()
  985.  
  986.  
  987. end
  988. end end)
  989.  
  990. mouse.KeyDown:connect(function(key)
  991. if key == "r" then
  992. if ScarySound4.IsPlaying == false then
  993. ScarySound4:Play()
  994. elseif ScarySound2.IsPlaying == true then
  995. ScarySound4:Stop()
  996.  
  997.  
  998. end
  999. end end)
  1000. mouse.KeyDown:connect(function(key)
  1001. if key == "u" then
  1002. for _, z in pairs(workspace:GetChildren()) do
  1003.  
  1004. if z.Name == "Zombie" then
  1005.  
  1006. z:Destroy()
  1007.  
  1008. end
  1009. end
  1010. end
  1011. end)
  1012.  
  1013.  
  1014.  
  1015. mouse.KeyDown:connect(function(key)
  1016. if key == "h" then
  1017. for _, z in pairs(workspace:GetChildren()) do
  1018.  
  1019. if z.Name == "Zombie" then
  1020.  
  1021.  
  1022.  
  1023. end
  1024. end
  1025. end
  1026. end)
  1027.  
  1028.  
  1029. function SpawnZombie()
  1030.  
  1031.  
  1032. if ZomWait == false and ZomWait2 == false then
  1033. Zombie.Parent = game.Lighting
  1034. Zombie2 = Zombie:Clone()
  1035. Zombie3 = Zombie:Clone()
  1036.  
  1037. Zombie:Destroy()
  1038. ----------------------------
  1039. ZomWait2 = true
  1040. wait()
  1041. ZomWait = true
  1042. end
  1043.  
  1044.  
  1045.  
  1046. if ZomWait == true and ZomWait2 == false then
  1047. Zombie3.Parent = game.Lighting
  1048. Zombie2 = Zombie3:Clone()
  1049. Zombie = Zombie3:Clone()
  1050.  
  1051. Zombie3:Destroy()
  1052. ----------------------------
  1053. ZomWait2 = true
  1054. wait()
  1055. ZomWait = false
  1056. end
  1057. Zombie2.Parent = game.Workspace
  1058.  
  1059. end
  1060.  
  1061.  
  1062.  
  1063.  
  1064. function ResetZombie()
  1065. wait(4)
  1066. ZomSyle = false
  1067. ZomWait2 = false
  1068.  
  1069. end
  1070.  
  1071. function onTouch(part)
  1072.  
  1073. local humanoid = part.Parent:findFirstChild("Humanoid")
  1074. local model = part.Parent
  1075. local torso = part.Parent:findFirstChild("Torso")
  1076. local head = part.Parent:findFirstChild("Head")
  1077. local leftleg = part.Parent:findFirstChild("Left Leg")
  1078. local rightleg = part.Parent:findFirstChild("Right Leg")
  1079. local leftarm = part.Parent:findFirstChild("Left Arm")
  1080. local rightarm = part.Parent:findFirstChild("Right Arm")
  1081. if model.Name == 'Zombie' == false then
  1082.  
  1083.  
  1084. if (humanoid ~=nil) then
  1085.  
  1086. --humanoid.Health = 0
  1087.  
  1088.  
  1089.  
  1090.  
  1091. head.BrickColor = BrickColor.new("Really black")
  1092. torso.BrickColor = BrickColor.new("Really black")
  1093. leftleg.BrickColor = BrickColor.new("Really black")
  1094. rightleg.BrickColor = BrickColor.new("Really black")
  1095. rightarm.BrickColor = BrickColor.new("Really black")
  1096. leftarm.BrickColor = BrickColor.new("Really black")
  1097. humanoid.Sit = true
  1098. wait(0.5)
  1099. torso.Anchored = true
  1100. wait(.3)
  1101. zomchar = humanoid.Parent
  1102. e=Instance.new('Part', model)
  1103. e.Size = Vector3.new(2.25,2.25,2.25)
  1104. e.Transparency = 1
  1105. e.Anchored = true
  1106. e.CFrame = CFrame.new(torso.Position)
  1107.  
  1108.  
  1109.  
  1110. wait(1)
  1111. torso:Destroy()
  1112. q=Instance.new('ParticleEmitter', e)
  1113. q.Size = NumberSequence.new(2,.0)
  1114. q.Rate = 500
  1115. q.Transparency = NumberSequence.new(0,1)
  1116. q.Speed = NumberRange.new(7)
  1117. q.VelocitySpread = 100
  1118. q.Lifetime = NumberRange.new(0.1,1)
  1119. q.Texture = 'rbxassetid://164417280'
  1120. wait(.1)
  1121. torso.Anchored = true
  1122. rightleg.Anchored = true
  1123. leftleg.Anchored = true
  1124. rightarm.Anchored = true
  1125. leftarm.Anchored = true
  1126. ded = Instance.new("Sound")
  1127. ded.Parent = e
  1128. ded.SoundId = "rbxassetid://347611423"
  1129. ded.Volume = 3
  1130. ded.Looped = false
  1131. wait()
  1132.  
  1133. ded:Play()
  1134.  
  1135. wait(1)
  1136. leftleg.Transparency = 0.5
  1137. head.Transparency = 0.5
  1138. rightleg.Transparency = 0.5
  1139. torso.Transparency = 0.5
  1140. leftarm.Transparency = 0.5
  1141. rightarm.Transparency = 0.5
  1142.  
  1143.  
  1144. wait(0.001)
  1145. leftleg.Transparency = 0.6
  1146. head.Transparency = 0.6
  1147. rightleg.Transparency = 0.6
  1148. torso.Transparency = 0.6
  1149. leftarm.Transparency = 0.6
  1150. rightarm.Transparency = 0.6
  1151.  
  1152. wait(0.001)
  1153. leftleg.Transparency = 0.7
  1154. head.Transparency = 0.7
  1155. rightleg.Transparency = 0.7
  1156. torso.Transparency = 0.7
  1157. leftarm.Transparency = 0.7
  1158. rightarm.Transparency = 0.7
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165. wait(0.001)
  1166. leftleg.Transparency = 1
  1167. head.Transparency = 1
  1168. rightleg.Transparency = 1
  1169. torso.Transparency = 1
  1170. leftarm.Transparency = 1
  1171. rightarm.Transparency = 1
  1172. wait()
  1173.  
  1174. SpawnZombie()
  1175. Zombie2.Name = 'Zombie'
  1176.  
  1177. wait()
  1178. Zombie2:MoveTo(zomchar.Head.Position + Vector3.new(math.random(0,1),0,math.random(0,1)))
  1179. ----------------------
  1180.  
  1181. if ZomSyle == false then
  1182. ZomSyle = true
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191. Zombie2.archivable = false
  1192.  
  1193.  
  1194. skin = zomchar["Body Colors"]:Clone()
  1195. skin.Parent = Zombie2
  1196. wait()
  1197.  
  1198.  
  1199. Character= Zombie2
  1200. plr = Zombie2
  1201. Headmaker = Character.Head
  1202. Headcol1 = Headmaker.BrickColor
  1203. Headmat = Headmaker.Material
  1204. Headsize = Headmaker.Size
  1205. Headsize2 = Headmaker.Mesh.Scale
  1206. hed = Character.Head
  1207. hed.Transparency = 1
  1208.  
  1209. local Headnr1 = Instance.new("Model",Character.Head)
  1210. Headnr1.Name = "Lmao"
  1211. local Headnr2 = Instance.new("Model",Headnr1)
  1212. Headnr2.Name = ""..zomchar.Name
  1213.  
  1214.  
  1215. ----------------------------------------------------------
  1216. wait()
  1217. local Mask = Instance.new("Part", Headnr2)
  1218. Mask.Name = "Head"
  1219. Mask.CanCollide = false
  1220. Mask.BrickColor = Headcol1
  1221. Mask.Transparency = 0
  1222. Mask.Material = Headmat
  1223. Mask.Size = Headsize
  1224. Mask.TopSurface = Enum.SurfaceType.Smooth
  1225. Mask.BottomSurface = Enum.SurfaceType.Smooth
  1226. local Weld = Instance.new("Weld", Mask)
  1227. Weld.Part0 = Character.Head
  1228. Weld.Part1 = Mask
  1229. Weld.C1 = CFrame.new(0,0,0)
  1230.  
  1231. local M1 = Instance.new("SpecialMesh")
  1232. M1.Parent = Mask
  1233. M1.MeshType='Head'
  1234. M1.Scale = Headsize2
  1235. ----------------------------------------------------------
  1236. local Name2 = Instance.new("Humanoid",Headnr2)
  1237. Zombie2.Torso.Touched:connect(onTouch)
  1238. wait()
  1239.  
  1240. for i,v in pairs(zomchar:GetChildren()) do
  1241. if v:IsA("CharacterMesh") then
  1242. v:clone().Parent = Zombie2
  1243. end
  1244.  
  1245. if v:IsA("ShirtGraphic") then
  1246. v:clone().Parent = Zombie2
  1247. end
  1248.  
  1249. if v:IsA("Pants") then
  1250. v:clone().Parent = Zombie2
  1251. end
  1252. if v:IsA("Shirt") then
  1253. v:clone().Parent = Zombie2
  1254.  
  1255. end
  1256.  
  1257.  
  1258. if v:IsA("Accessory") then
  1259. v:clone().Parent = Zombie2
  1260. end
  1261.  
  1262. if v:IsA("Hat") then
  1263. v:clone().Parent = Zombie2
  1264. end
  1265.  
  1266. end
  1267.  
  1268.  
  1269.  
  1270. end
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278. ----------------------
  1279. wait()
  1280. leftleg:Destroy()
  1281. head:Destroy()
  1282. rightleg:Destroy()
  1283. leftarm:Destroy()
  1284. rightarm:Destroy()
  1285. ResetZombie()
  1286. end
  1287. end
  1288. end
  1289.  
  1290.  
  1291.  
  1292. char.Torso.Touched:connect(onTouch)
  1293.  
  1294. mouse.KeyDown:connect(function(key)
  1295. if key == "c" then
  1296.  
  1297. LockOn()
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303. end
  1304. end)
  1305.  
  1306.  
  1307. debounce = false
  1308.  
  1309. function onTouched(hit)
  1310. hole:Play()
  1311. hit.CanCollide=false
  1312. wait(.5)
  1313. hit.CanCollide = true
  1314. debounce = true
  1315.  
  1316. end
  1317.  
  1318. game.Players.LocalPlayer.Character.Torso.Touched:connect(onTouched)
  1319.  
  1320.  
  1321. while wait() do
  1322. char["Left Leg"].BrickColor = BrickColor.new("Really black")
  1323. char["Head"].BrickColor = BrickColor.new("Really black")
  1324. char["Right Leg"].BrickColor = BrickColor.new("Really black")
  1325. char["Torso"].BrickColor = BrickColor.new("Really black")
  1326. char["Left Arm"].BrickColor = BrickColor.new("Really black")
  1327. char["Right Arm"].BrickColor = BrickColor.new("Really black")
  1328. imgl.Rotation = imgl.Rotation + 1
  1329. if targetted ~= nil then
  1330. crosshair.Adornee = targetted:FindFirstChild("Torso") or targetted:FindFirstChild("UpperTorso")
  1331. crosshair.Enabled = true
  1332. elseif targetted == nil then
  1333. crosshair.Adornee = nil
  1334. crosshair.Enabled = false
  1335. end
  1336. game:GetService("RunService"):BindToRenderStep("ew", 0, function()
  1337. for _, z in pairs(workspace:GetChildren()) do
  1338.  
  1339. if z.Name == "Zombie" then
  1340.  
  1341. z.Humanoid:MoveTo(targetted.Head.Position)
  1342.  
  1343. end
  1344. end
  1345. end)
  1346.  
  1347. playertarg = game.Players.LocalPlayer
  1348. chara = playertarg.Character
  1349. Mouse = playertarg:GetMouse()
  1350. targetted = nil
  1351.  
  1352. New = function(Object, Parent, Name, Data)
  1353. local Object = Instance.new(Object)
  1354. for Index, Value in pairs(Data or {}) do
  1355. Object[Index] = Value
  1356. end
  1357. Object.Parent = Parent
  1358. Object.Name = Name
  1359. return Object
  1360. end
  1361.  
  1362.  
  1363.  
  1364. crosshair = Instance.new("BillboardGui",chara)
  1365. crosshair.Size = UDim2.new(10,0,10,0)
  1366. crosshair.Enabled = false
  1367. imgl = Instance.new("ImageLabel",crosshair)
  1368. imgl.Position = UDim2.new(0,0,0,0)
  1369. imgl.Size = UDim2.new(1,0,1,0)
  1370. imgl.Image = "rbxassetid://182932517"
  1371. imgl.BackgroundTransparency = 1
  1372. imgl.ImageTransparency = .7
  1373. imgl.ImageColor3 = Color3.new(0,0,0)
  1374.  
  1375.  
  1376. function LoadSnd(id,loop,vol,pit)
  1377. local snd = New("Sound",chara,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit})
  1378. return snd
  1379. end
  1380.  
  1381. TargetSnd = LoadSnd(167191994,false,2,.8)
  1382.  
  1383.  
  1384. function TargetSelect(person)
  1385. local dd=coroutine.wrap(function()
  1386. if targetted ~= person then
  1387. targetted = person
  1388. for i = 0,30,10 do
  1389. wait(.05)
  1390. crosshair.Size = UDim2.new(40-i,0,40-i,0)
  1391. end
  1392. end
  1393. end)
  1394. dd()
  1395. end
  1396.  
  1397.  
  1398.  
  1399. function LockOn()
  1400. if Mouse.Target.Parent ~= chara and Mouse.Target.Parent.Parent ~= chara and Mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil then
  1401. TargetSelect(Mouse.Target.Parent)
  1402. TargetSnd:Play()
  1403. else end
  1404. end
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429. ZomWait = false
  1430. ZomWait2 = false
  1431. ZomSyle = false
  1432.  
  1433.  
  1434. Target1 =script.Parent.Name
  1435. Target2 = game.Players[Target1]
  1436. Target2.Character.archivable = true
  1437. clone4 = Target2.Character:Clone()
  1438. clone4.Parent = game.Lighting
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473. Glow1 = Color3.new(.5,0,0)
  1474. Glow2 = Color3.new(0,0,0)
  1475.  
  1476. GlowParticle = Instance.new("ParticleEmitter",clone4.Torso)
  1477. GlowParticle.LightEmission = 0
  1478. GlowParticle.Color = ColorSequence.new(Glow1,Glow2)
  1479. GlowParticle.Size = NumberSequence.new(2,0)
  1480. GlowParticle.Texture = "http://www.roblox.com/asset/?id=118641183"
  1481. GlowParticle.Transparency = NumberSequence.new(.3,.8)
  1482. GlowParticle.LockedToPart = false
  1483. GlowParticle.Lifetime = NumberRange.new(.5,.6)
  1484. GlowParticle.Rate= 100
  1485. GlowParticle.Speed =NumberRange.new(6)
  1486. GlowParticle.VelocitySpread = 360
  1487.  
  1488.  
  1489.  
  1490. for i,v in pairs(clone4:GetChildren()) do
  1491.  
  1492.  
  1493. if v:IsA("ShirtGraphic") then
  1494. v:Destroy()
  1495. end
  1496.  
  1497. if v:IsA("Pants") then
  1498. v:Destroy()
  1499. end
  1500. if v:IsA("Shirt") then
  1501. v:Destroy()
  1502. end
  1503. if v:IsA("Hat") then
  1504. v:Destroy()
  1505.  
  1506. end
  1507. if v:IsA("Accessory") then
  1508. v:Destroy()
  1509. end
  1510.  
  1511. end
  1512.  
  1513. clone4["Body Colors"]:Destroy()
  1514. clone4.Head.face.Texture = "rbxassetid://97880283"
  1515.  
  1516. wait()
  1517. Zombie = clone4:Clone()
  1518.  
  1519. wait()
  1520.  
  1521. clone4:Destroy()
  1522.  
  1523. wait()
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530. end
  1531.  
  1532.  
  1533.  
  1534.  
  1535. ------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement