subaru112g

guest 666 boss fight not done

Mar 16th, 2019
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.35 KB | None | 0 0
  1. local plr = owner
  2. local char = plr.Character
  3.  
  4. local m = Instance.new("Model", game.Workspace)
  5. m.Name = "Guest666"
  6.  
  7. local h = Instance.new("Part",m)
  8. h.Name = "Head"
  9. local me = plr.Character.Head.Mesh:Clone()
  10. me.Parent = h
  11. local facee = plr.Character.Head.face:Clone()
  12. facee.Parent = h
  13. h.Size = plr.Character.Head.Size
  14. h:BreakJoints()
  15. h.CanCollide = false
  16. h.Position = plr.Character.Head.Position
  17. h.Position = h.Position + Vector3.new(0, 10, 0)
  18. h.face.Texture = "http://www.roblox.com/asset/?id=1282052398"
  19.  
  20. local t = Instance.new("Part",m)
  21. t.Name = "Torso"
  22. t.Size = plr.Character.Torso.Size
  23. t:BreakJoints()
  24. t.CanCollide = false
  25. t.Position = plr.Character.Torso.Position
  26. t.Position = t.Position + Vector3.new(0, 10, 0)
  27.  
  28. local r = Instance.new("Part",m)
  29. r.Name = "HumanoidRootPart"
  30. r.Size = plr.Character.Torso.Size
  31. r:BreakJoints()
  32. r.CanCollide = false
  33. r.Position = plr.Character.Torso.Position
  34. r.Position = t.Position + Vector3.new(0, 10, 0)
  35. r.Transparency = 1
  36.  
  37. local ra = Instance.new("Part",m)
  38. ra.Name = "Right Arm"
  39. ra.Size = plr.Character["Right Arm"].Size
  40. ra:BreakJoints()
  41. ra.Position = plr.Character["Right Arm"].Position
  42. ra.Position = ra.Position + Vector3.new(0, 10, 0)
  43.  
  44. local la = Instance.new("Part",m)
  45. la.Name = "Left Arm"
  46. la.Size = plr.Character["Left Arm"].Size
  47. la:BreakJoints()
  48. la.Position = plr.Character["Left Arm"].Position
  49. la.Position = la.Position + Vector3.new(0, 10, 0)
  50.  
  51. local ll = Instance.new("Part",m)
  52. ll.Name = "Left Leg"
  53. ll.Size = plr.Character["Left Leg"].Size
  54. ll:BreakJoints()
  55. ll.Position = plr.Character["Left Leg"].Position
  56. ll.Position = ll.Position + Vector3.new(0, 10, 0)
  57.  
  58. local rl = Instance.new("Part",m)
  59. rl.Name = "Right Leg"
  60. rl.Size = plr.Character["Right Leg"].Size
  61. rl:BreakJoints()
  62. rl.Position = plr.Character["Right Leg"].Position
  63. rl.Position = rl.Position + Vector3.new(0, 10, 0)
  64.  
  65. for i,v in pairs(m:GetChildren()) do
  66. v:BreakJoints()
  67. end
  68.  
  69. local rootj = Instance.new("Motor6D")
  70. rootj.Name = "RootJoint"
  71. rootj.Part0 = r
  72. rootj.Part1 = t
  73. rootj.Parent = r
  74.  
  75. local neck = Instance.new("Motor6D")
  76. neck.Name = "Neck"
  77. neck.Part0 = t
  78. neck.Part1 = h
  79. neck.Parent = t
  80. neck.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  81. neck.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  82.  
  83. local RS = Instance.new("Motor6D")
  84. RS.Name = "Right Shoulder"
  85. RS.Part0 = t
  86. RS.Part1 = ra
  87. RS.Parent = t
  88. RS.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  89. RS.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  90.  
  91. local LS = Instance.new("Motor6D")
  92. LS.Name = "Left Shoulder"
  93. LS.Part0 = t
  94. LS.Part1 = la
  95. LS.Parent = t
  96. LS.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  97. LS.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  98.  
  99. local LH = Instance.new("Motor6D")
  100. LH.Name = "Left Hip"
  101. LH.Part0 = t
  102. LH.Part1 = ll
  103. LH.Parent = t
  104. LH.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  105. LH.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  106.  
  107. local RH = Instance.new("Motor6D")
  108. RH.Name = "Right Hip"
  109. RH.Part0 = t
  110. RH.Part1 = rl
  111. RH.Parent = t
  112. RH.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  113. RH.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  114.  
  115. wait(0.000000000000001)
  116.  
  117. local hu = Instance.new("Humanoid", m)
  118. hu.MaxHealth = 0
  119. hu.Health = 0
  120. hu.WalkSpeed = 16
  121.  
  122. h.BrickColor = BrickColor.new("Really black")
  123. ra.BrickColor = BrickColor.new("Really black")
  124. la.BrickColor = BrickColor.new("Really black")
  125. t.BrickColor = BrickColor.new("Really black")
  126. rl.BrickColor = BrickColor.new("Really black")
  127. ll.BrickColor = BrickColor.new("Really black")
  128.  
  129. local hum = m:WaitForChild("Humanoid")
  130.  
  131. local normalanim = true
  132. local animpose = "Idle"
  133. local sine = 0
  134. local RSnor = RS.C0
  135. local LSnor = LS.C0
  136. local RHnor = RH.C0
  137. local LHnor = LH.C0
  138. local necknor = neck.C0
  139. local rootjnor = rootj.C0
  140.  
  141. char = m
  142.  
  143. local torso = Instance.new("CharacterMesh", game.Workspace)
  144. torso.BodyPart = "Torso"
  145. torso.MeshId = "27111894"
  146. torso.Parent = char
  147.  
  148. local lleg = Instance.new("CharacterMesh", game.Workspace)
  149. lleg.BodyPart = "LeftLeg"
  150. lleg.MeshId = "27111857"
  151. lleg.Parent = char
  152.  
  153. local rleg = Instance.new("CharacterMesh", game.Workspace)
  154. rleg.BodyPart = "RightLeg"
  155. rleg.MeshId = "27111882"
  156. rleg.Parent = char
  157.  
  158. local larm = Instance.new("CharacterMesh", game.Workspace)
  159. larm.BodyPart = "LeftArm"
  160. larm.MeshId = "27111419"
  161. larm.Parent = char
  162.  
  163. local rarm = Instance.new("CharacterMesh", game.Workspace)
  164. rarm.BodyPart = "RightArm"
  165. rarm.MeshId = "27111864"
  166. rarm.Parent = char
  167.  
  168.  
  169. local hair = Instance.new("Accessory")
  170. hair.AttachmentPos = Vector3.new(0, -0.05, 0.1)
  171. local ha = Instance.new("Part",hair)
  172. ha.Name = "Handle"
  173. ha.Size = Vector3.new(1, 1, 2)
  174. local me = Instance.new("SpecialMesh", ha)
  175. me.MeshId = "http://www.roblox.com/asset/?id=46834172"
  176. me.TextureId = "http://www.roblox.com/asset/?id=47991609"
  177. me.Scale = Vector3.new(1.05, 1.05, 1.05)
  178. me.VertexColor = Vector3.new(1, 1, 1)
  179.  
  180. hair.Parent = m
  181.  
  182. local sh = Instance.new("Shirt",m)
  183. sh.ShirtTemplate = "http://www.roblox.com/asset/?id=8561740"
  184. sh.Name = "Shirt"
  185.  
  186. local tag = Instance.new("StringValue",m)
  187. tag.Name = "Guest666"
  188. tag.Value = owner.Name
  189.  
  190. local killing = false
  191.  
  192. -- Don't change.
  193. while game:GetService("RunService").Heartbeat:Wait() do
  194. if normalanim then
  195. sine = sine + 1
  196. end
  197.  
  198. -- AI
  199. ------------------------
  200. for i,v in pairs(workspace:GetChildren()) do
  201. if v.Name == "Guest666" then
  202. if not(v:FindFirstChildOfClass("Humanoid") == nil) then
  203. if v:FindFirstChild("Guest666") ~= nil then
  204. local h = v:FindFirstChildOfClass("Humanoid")
  205. h.PlatformStand = false
  206. if not(v:FindFirstChild("Torso") == nil) then
  207. function onTouched(fire)
  208. local humn = fire.Parent:FindFirstChildOfClass("Humanoid")
  209. if humn then
  210. if humn.Parent then
  211. for i,n in pairs (humn.Parent:GetChildren()) do
  212. if n.ClassName == "Part" then
  213. if killing == false then
  214. for i = 1,2 do
  215. local p = Instance.new("Part",workspace)
  216. p.CanCollide = false
  217. p.Transparency = 0.5
  218. p.Size = Vector3.new(1,1,1)
  219. p.BrickColor = BrickColor.new("Really black")
  220. p.Position = n.Position
  221. p.Velocity = Vector3.new(math.random(-50,50),100,math.random(-50,50))
  222. end
  223. killing = true
  224. n:Destroy()
  225. wait(0.5)
  226. killing = false
  227. end
  228. end
  229. end
  230. end
  231. end
  232. end
  233. end
  234. t.Touched:connect(onTouched)
  235.  
  236. s = v
  237. local larm = s:FindFirstChild("Left Arm")
  238. local rarm = s:FindFirstChild("Right Arm")
  239.  
  240. function findNearestTorso(pos)
  241. local list = game.Workspace:children()
  242. local torso = nil
  243. local dist = 100000000000000000000000000000000000000000
  244. local temp = nil
  245. local human = nil
  246. local temp2 = nil
  247. for x = 1, #list do
  248. temp2 = list[x]
  249. if (temp2.className == "Model") and (temp2 ~= s) then
  250. temp = temp2:FindFirstChild("Head")
  251. h = temp2:FindFirstChildOfClass("Humanoid")
  252. if (temp ~= nil) and (h ~= nil) and (h.Health > 0) then
  253. s.Humanoid.WalkSpeed = 15
  254. if (temp.Position - pos).magnitude < dist then
  255. torso = temp
  256. dist = (temp.Position - pos).magnitude
  257. end
  258. end
  259. end
  260. end
  261. return torso
  262. end
  263.  
  264. local antibug = s:FindFirstChild("Torso")
  265. if antibug ~= nil then
  266. local target = findNearestTorso(antibug.Position)
  267. if target ~= nil then
  268. s.Humanoid:MoveTo(target.Position, target)
  269. s.Humanoid.WalkSpeed = 15
  270. end
  271. end
  272. end
  273. end
  274. end
  275. end
  276. ------------------------
  277.  
  278. hum.Health = 9999999999999999
  279.  
  280.  
  281. local touchfloor = workspace:FindPartOnRay(Ray.new(char.HumanoidRootPart.CFrame.Position, ((CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position - Vector3.new(0, 1, 0))).LookVector).Unit * 4), char)
  282. if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then
  283. animpose = "Walking"
  284. elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then
  285. animpose = "Jumping"
  286. elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then
  287. animpose = "Falling"
  288. else
  289. animpose = "Idle"
  290. end
  291. if animpose == "Idle" and normalanim then
  292. rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
  293. RS.C0 = RS.C0:Lerp(RSnor, 0.15)
  294. LS.C0 = LS.C0:Lerp(LSnor, 0.15)
  295. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  296. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  297. elseif animpose == "Walking" and normalanim then
  298. rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
  299. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
  300.  
  301. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
  302.  
  303. RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
  304.  
  305. LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
  306. elseif animpose == "Jumping" and normalanim then
  307. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(-0.5, 0, 0), 0.15)
  308. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.3, 0, 0), 0.14)
  309. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.3, 0, 0), 0.14)
  310. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  311. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  312. elseif animpose == "Falling" and normalanim then
  313. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(0.5, 0, 0), 0.15)
  314. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.6, 0, 0), 0.14)
  315. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.6, 0, 0), 0.14)
  316. RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(-0.3, 0, 0), 0.10)
  317. LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(-0.3, 0, 0), 0.10)
  318. end
  319. end
Add Comment
Please, Sign In to add comment