Advertisement
HenloMyDude

brown bricks chicken

Jan 12th, 2020
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.77 KB | None | 0 0
  1.  
  2. script.Parent = owner.Character
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  5. local RealPlayer = Player
  6. do print("hi")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  7.  
  8.  
  9. --mc chicken tho...--
  10. --by youngmacka123--
  11. --cluckle cluckle--
  12.  
  13. plr = owner
  14. char = plr.Character
  15. tors = char.Torso
  16. ra = char["Right Arm"]
  17. la = char["Left Arm"]
  18. rl = char["Right Leg"]
  19. ll = char["Left Leg"]
  20. hed = char.Head
  21. root = char.HumanoidRootPart
  22. hum = char.Humanoid
  23. sc = 0.75
  24. if hum.RigType == Enum.HumanoidRigType.R6 then
  25. hum.HipHeight = -1.3/sc
  26. elseif hum.RigType == Enum.HumanoidRigType.R15 then
  27. hum.HipHeight = 1
  28. end
  29.  
  30. ezweld = function(p, a, b, cf)
  31. local weld = Instance.new("Weld",p)
  32. weld.Part0 = a
  33. weld.Part1 = b
  34. weld.C0 = cf
  35. return weld
  36. end
  37.  
  38. clerp = function(toclerp, cf, number)
  39. local joint = toclerp
  40. joint.C0 = joint.C0:Lerp(cf, number)
  41. end
  42.  
  43. clerp2 = function(toclerp, cf)
  44. local joint = toclerp
  45. joint.C0 = cf
  46. end
  47.  
  48. clerp3 = function(toclerp, cf, number)
  49. local joint = toclerp
  50. joint.C1 = joint.C1:Lerp(cf, number)
  51. end
  52.  
  53. Swait,swait = function(number)
  54. if number == 0 or number == nil then
  55. game:GetService("RunService").Heartbeat:Wait()
  56. else
  57. for i = 1,number do
  58. game:GetService("RunService").Heartbeat:Wait()
  59. end
  60. end
  61. end
  62.  
  63. ezdecal = function(p, txt, tr, f)
  64. local decal = Instance.new("Decal", p)
  65. decal.Texture = "rbxassetid://" ..txt
  66. decal.Transparency = tr
  67. decal.Face = f
  68. return decal
  69. end
  70.  
  71. for i,v in pairs (char:GetDescendants()) do
  72. if v:IsA("Hat") or v:IsA("Accessory") or v:IsA("Decal") or v:IsA("Texture") then
  73. v:remove()
  74. end
  75. if v:IsA("Part") then
  76. local mesh = Instance.new("SpecialMesh",v)
  77. mesh.Scale = Vector3.new(0, 0, 0)
  78. if v.Name ~= "Head" then
  79. v.Transparency = 1
  80. end
  81. end
  82. end
  83.  
  84. IT = Instance.new
  85. Rad = math.rad
  86. Cos = math.cos
  87. Sin = math.sin
  88. C3 = Color3.new
  89. VT = Vector3.new
  90.  
  91. --head
  92.  
  93. local fhed = Instance.new("Part",char)
  94. fhed.Size = Vector3.new(1.2, 1.8, 0.76)*sc
  95. fhed.Color = Color3.new(0, 0, 0)
  96. fhed.CanCollide = false
  97. local decal = ezdecal(fhed, 127446043, 0, "Left")
  98. local decal = ezdecal(fhed, 127446043, 0, "Right")
  99. local decal = ezdecal(fhed, 127445969, 0, "Top")
  100. local decal = ezdecal(fhed, 127446043, 0, "Bottom")
  101. local decal = ezdecal(fhed, 127446043, 0, "Back")
  102. local decal = ezdecal(fhed, 127445889, 0, "Front")
  103. local weld = ezweld(char, fhed, hed, CFrame.new(0*sc, 0 + 0.05*sc, 0*sc) * CFrame.Angles(0, Rad(0), 0))
  104.  
  105. local part = Instance.new("Part",char)
  106. part.Size = Vector3.new(1.23, 0.55, 0.6)*sc
  107. part.Color = Color3.new(0, 0, 0)
  108. part.CanCollide = false
  109. local decal = ezdecal(part, 127446345, 0, "Left")
  110. local decal = ezdecal(part, 127446345, 0, "Right")
  111. local decal = ezdecal(part, 127446429, 0, "Top")
  112. local decal = ezdecal(part, 127446400, 0, "Bottom")
  113. local decal = ezdecal(part, 127446400, 0, "Back")
  114. local decal = ezdecal(part, 127446345, 0, "Front")
  115. local weld = ezweld(char, part, hed, CFrame.new(0*sc, 0 + 0.05*sc, 0.67*sc) * CFrame.Angles(0, Rad(0), 0))
  116.  
  117. --torso
  118.  
  119. local ftors = Instance.new("Part",char)
  120. ftors.Size = Vector3.new(1.8, 2.4, 1.8)*sc
  121. ftors.Color = Color3.new(0, 0, 0)
  122. ftors.CanCollide = false
  123. local decal = ezdecal(ftors, 127447860, 0, "Left")
  124. local decal = ezdecal(ftors, 127446140, 0, "Right")
  125. local decal = ezdecal(ftors, 127446101, 0, "Top")
  126. local decal = ezdecal(ftors, 127446101, 0, "Bottom")
  127. local decal = ezdecal(ftors, 127447895, 0, "Back")
  128. local decal = ezdecal(ftors, 127447895, 0, "Front")
  129. local weld = ezweld(char, ftors, tors, CFrame.new(0*sc, 1.25*sc, -0.7*sc) * CFrame.Angles(Rad(90), Rad(0), 0))
  130.  
  131. --right arm
  132.  
  133. local part = Instance.new("Part",char)
  134. part.Size = Vector3.new(0.4, 1.16, 1.82)*sc
  135. part.Color = Color3.new(0, 0, 0)
  136. part.CanCollide = false
  137. local decal = ezdecal(part, 127446140, 0, "Left")
  138. local decal = ezdecal(part, 127447860, 0, "Right")
  139. local decal = ezdecal(part, 127447929, 0, "Top")
  140. local decal = ezdecal(part, 127447929, 0, "Bottom")
  141. local decal = ezdecal(part, 127446140, 0, "Back")
  142. local decal = ezdecal(part, 127446140, 0, "Front")
  143. local weld = ezweld(char, part, ra, CFrame.new(0.9*sc, -1.025*sc, -1.25*sc) * CFrame.Angles(Rad(0), Rad(0), 0))
  144.  
  145. --left arm
  146.  
  147. local part = Instance.new("Part",char)
  148. part.Size = Vector3.new(0.4, 1.16, 1.82)*sc
  149. part.Color = Color3.new(0, 0, 0)
  150. part.CanCollide = false
  151. local decal = ezdecal(part, 127446140, 0, "Left")
  152. local decal = ezdecal(part, 127447860, 0, "Right")
  153. local decal = ezdecal(part, 127447929, 0, "Top")
  154. local decal = ezdecal(part, 127447929, 0, "Bottom")
  155. local decal = ezdecal(part, 127446140, 0, "Back")
  156. local decal = ezdecal(part, 127446140, 0, "Front")
  157. local weld = ezweld(char, part, la, CFrame.new(-0.9*sc, -1.025*sc, -1.25*sc) * CFrame.Angles(Rad(0), Rad(0), 0))
  158.  
  159. --right leg
  160.  
  161. local part = Instance.new("Part",char)
  162. part.Size = Vector3.new(0.1, 0.1, 0.1)
  163. part.Color = Color3.new(1, 1, 0)
  164. part.CanCollide = false
  165. local mesh = Instance.new("SpecialMesh",part)
  166. mesh.MeshId = "rbxassetid://4593733202"
  167. mesh.TextureId = "rbxassetid://127446608"
  168. mesh.Scale = Vector3.new(1, 1, 1)*sc
  169. mesh.Offset = Vector3.new(0, 0, 0)*sc
  170. local weld1 = ezweld(char, part, rl, CFrame.new(-0.3*sc, -1.675*sc, 0.65*sc) * CFrame.Angles(Rad(0), Rad(180), 0))
  171. weld1nor = weld1.C0
  172.  
  173. --left leg
  174.  
  175. local part = Instance.new("Part",char)
  176. part.Size = Vector3.new(0.1, 0.1, 0.1)
  177. part.Color = Color3.new(1, 1, 0)
  178. part.CanCollide = false
  179. local mesh = Instance.new("SpecialMesh",part)
  180. mesh.MeshId = "rbxassetid://4593733202"
  181. mesh.TextureId = "rbxassetid://127446608"
  182. mesh.Scale = Vector3.new(1, 1, 1)*sc
  183. mesh.Offset = Vector3.new(0, 0, 0)*sc
  184. local weld2 = ezweld(char, part, ll, CFrame.new(0.3*sc, -1.675*sc, 0.625*sc) * CFrame.Angles(Rad(0), Rad(180), 0))
  185. weld2nor = weld2.C0
  186.  
  187. anim = "Idle"
  188. attack = false
  189. local RS = char.Torso["Right Shoulder"]
  190. local LS = char.Torso["Left Shoulder"]
  191. local RH = char.Torso["Right Hip"]
  192. local LH = char.Torso["Left Hip"]
  193. local neck = char.Torso["Neck"]
  194. local root = char.HumanoidRootPart
  195. local rootj = root.RootJoint
  196. local sine = 0
  197. local RSnor = RS.C0
  198. local LSnor = LS.C0
  199. local RHnor = RH.C0
  200. local LHnor = LH.C0
  201. local RSnor2 = RS.C1
  202. local LSnor2 = LS.C1
  203. local RHnor2 = RH.C1
  204. local LHnor2 = LH.C1
  205. local necknor2 = neck.C1
  206. local rootjnor2 = rootj.C1
  207. local rootjnor = rootj.C0
  208. local necknor = neck.C0
  209. local tors = char.Torso
  210. hum.Animator:remove()
  211. mouse = plr:GetMouse()
  212. hold = false
  213. Debris = game:GetService("Debris")
  214. sine = 0
  215.  
  216. script.Parent = char
  217. function findNearestTorso(pos)
  218. local list = workspace:children()
  219. local torso = nil
  220. local dist = 20
  221. local temp = nil
  222. local human = nil
  223. local temp2 = nil
  224. for x = 1, #list do
  225. temp2 = list[x]
  226. if (temp2.className == "Model") and (temp2 ~= script.Parent) and (temp2 ~= char) then
  227. temp = temp2:findFirstChild("Head")
  228. human = temp2:findFirstChild("Humanoid")
  229. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  230. if (temp.Position - pos).magnitude < dist then
  231. torso = temp
  232. dist = (temp.Position - pos).magnitude
  233. end
  234. end
  235. end
  236. end
  237. return torso
  238. end
  239.  
  240. local near = findNearestTorso(root.Position)
  241. local GYRO = Instance.new("BodyGyro")
  242. GYRO.D = 20
  243. GYRO.P = 5000
  244. GYRO.MaxTorque = VT(0,40000000000,0)
  245. GYRO.CFrame = CFrame.new(root.Position,root.Position)
  246. if near then
  247. GYRO.CFrame = CFrame.new(root.Position, near.Position)
  248. end
  249. GYRO.Parent = char
  250.  
  251. local float = Instance.new("BodyVelocity", nil)
  252. float.MaxForce = Vector3.new(0, math.huge, 0)
  253. float.Velocity = Vector3.new(0, -5, 0)
  254.  
  255. function RayCast(Position, Direction, Range, Ignore)
  256. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  257. end
  258.  
  259. function flap()
  260. attack = true
  261. float.Parent = root
  262. local yay = Instance.new("NumberValue", char)
  263. yay.Name = "yay"
  264. local fallTime = 0
  265. local touchie = root.Touched:connect(function(hit)
  266. local dud = hit.Parent
  267. if dud and dud ~= char then
  268. yay:remove()
  269. end
  270. end)
  271. repeat
  272. Swait()
  273. clerp(RS, RSnor * CFrame.Angles(Rad(-90 - 25 * Sin(sine / 6)), Rad(0), Rad(0)) * CFrame.new(0, -0.25, 0.5), 0.3)
  274. clerp(LS, LSnor * CFrame.Angles(Rad(-90 - 25 * Sin(sine / 6)), Rad(0), Rad(0)) * CFrame.new(0, -0.25, 0.5), 0.3)
  275. clerp(rootj, rootjnor * CFrame.Angles(Rad(0), 0, Rad(0)), 0.5)
  276. if near == nil then
  277. clerp(neck, necknor, 0.3)
  278. end
  279. clerp(RH, RHnor, 0.3)
  280. clerp(LH, LHnor, 0.3)
  281. until yay.Parent ~= char
  282. yay = nil
  283. local yay = nil
  284. float.Parent = nil
  285. attack = false
  286. end
  287.  
  288. Swait(10)
  289.  
  290. function eggieso(cf)
  291. local c = false
  292. local eg = Instance.new("Part", char)
  293. eg.CFrame = cf
  294. eg.CanCollide = false
  295. eg.Anchored = true
  296. eg.Size = Vector3.new(1, 1, 1)
  297. local mesh = Instance.new("SpecialMesh", eg)
  298. mesh.MeshId = "rbxassetid://4594401408"
  299. local egcf = eg.CFrame
  300. local spin = 0
  301. eg.Touched:connect(function(hit)
  302. local dud = hit.Parent
  303. local torso = dud:FindFirstChild("Torso") or dud:FindFirstChild("UpperTorso")
  304. if dud and dud ~= char and dud:FindFirstChildOfClass("Humanoid") and c == false and torso then
  305. c = true
  306. eg.Parent = script
  307. for i = 1,11 do
  308. Swait()
  309. eg.Anchored = true
  310. eg.CFrame = eg.CFrame:lerp(CFrame.new(torso.CFrame.x, torso.CFrame.y, torso.CFrame.z), 0.55)
  311. end
  312. local tool = Instance.new("Tool", dud)
  313. tool.Name = "egg"
  314. local handle = eg
  315. handle.Name = "Handle"
  316. handle.Anchored = false
  317. mesh.Scale = Vector3.new(1.5, 1.5, 1.5)
  318. handle.Parent = tool
  319. tool.Activated:connect(function()
  320. handle.Name = "flyingegg!!"
  321. handle.Parent = workspace
  322. handle.Velocity = handle.CFrame.lookVector * 165 + Vector3.new(0, 35, 0)
  323. handle.Touched:connect(function(hit)
  324. if hit.Parent and hit.Parent ~= tool.Parent then
  325. --handle:remove()
  326. end
  327. end)
  328. Debris:AddItem(tool, 3)
  329. end)
  330. return eg, tool
  331. end
  332. end)
  333. coroutine.resume(coroutine.create(function()
  334. repeat
  335. Swait()
  336. spin = spin + Rad(1)
  337. eg.CFrame = egcf * CFrame.new(0, 0 + 0.25 * Sin(sine / 12), 0) * CFrame.Angles(0, spin, 0)
  338. until eg.Parent ~= char
  339. end))
  340. return eg
  341. end
  342.  
  343. function egg()
  344. local c = false
  345. local eg = Instance.new("Part", char)
  346. eg.CFrame = CFrame.new(ftors.CFrame.x, ftors.CFrame.y, ftors.CFrame.z)
  347. eg.CanCollide = false
  348. eg.Anchored = true
  349. eg.Size = Vector3.new(1, 1, 1)
  350. local mesh = Instance.new("SpecialMesh", eg)
  351. mesh.MeshId = "rbxassetid://4594401408"
  352. local egcf = eg.CFrame
  353. local spin = 0
  354. eg.Touched:connect(function(hit)
  355. local dud = hit.Parent
  356. local torso = dud:FindFirstChild("Torso") or dud:FindFirstChild("UpperTorso")
  357. if dud and dud ~= char and dud:FindFirstChildOfClass("Humanoid") and c == false and torso then
  358. c = true
  359. eg.Parent = script
  360. for i = 1,11 do
  361. Swait()
  362. eg.Anchored = true
  363. eg.CFrame = eg.CFrame:lerp(CFrame.new(torso.CFrame.x, torso.CFrame.y, torso.CFrame.z), 0.55)
  364. end
  365. local tool = Instance.new("Tool", dud)
  366. tool.Name = "egg"
  367. local handle = eg
  368. handle.Name = "Handle"
  369. handle.Anchored = false
  370. mesh.Scale = Vector3.new(1.5, 1.5, 1.5)
  371. handle.Parent = tool
  372. tool.Changed:connect(function(changed)
  373. if changed == "Parent" and tool.Parent == workspace then
  374. Swait()
  375. local oldpos = handle.CFrame * CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, -1.75, 0.5)
  376. local egg,tool = eggieso(oldpos)
  377. eg:remove()
  378. elseif changed == "Name" then
  379. tool.Name = "egg"
  380. end
  381. end)
  382. tool.Activated:connect(function()
  383. handle.Name = "flyingegg!!"
  384. handle.Parent = workspace
  385. handle.Velocity = handle.CFrame.lookVector * 165 + Vector3.new(0, 35, 0)
  386. handle.Touched:connect(function(hit)
  387. if hit.Parent and hit.Parent ~= tool.Parent then
  388. --handle:remove()
  389. end
  390. end)
  391. Debris:AddItem(tool, 3)
  392. end)
  393. end
  394. end)
  395. coroutine.resume(coroutine.create(function()
  396. repeat
  397. Swait()
  398. spin = spin + Rad(1)
  399. eg.CFrame = egcf * CFrame.new(0, 0 + 0.25 * Sin(sine / 12), 0) * CFrame.Angles(0, spin, 0)
  400. until eg.Parent ~= char
  401. end))
  402. end
  403.  
  404. mouse.KeyDown:connect(function(key)
  405. if key == "e" then
  406. egg()
  407. end
  408. end)
  409.  
  410. while true do
  411. Swait()
  412. sine = sine + 1
  413. if root.Velocity.Y <= -55 then
  414. coroutine.resume(coroutine.create(function()
  415. flap()
  416. end))
  417. end
  418. hum.WalkSpeed = 16
  419. torsvel = (root.Velocity * VT(1, 0, 1)).magnitude
  420. local near = findNearestTorso(root.Position)
  421. if near ~= nil then
  422. local pos = near.CFrame.p
  423. GYRO.Parent = root
  424. GYRO.CFrame = CFrame.new(root.Position, pos)
  425. root.Anchored = false
  426. local _, Point = workspace:FindPartOnRay(Ray.new(fhed.CFrame.p, near.CFrame.lookVector), workspace, false, true)
  427. Dist = (fhed.CFrame.p-Point).magnitude
  428. Diff = fhed.CFrame.Y-Point.Y
  429. neck.C0 = necknor*CFrame.Angles((math.tan(Diff/Dist)*0.75), 0, (((fhed.CFrame.p-Point).Unit):Cross(ftors.CFrame.lookVector)).Y*0.75)
  430. else
  431. GYRO.Parent = nil
  432. root.Anchored = false
  433. hed.Anchored = false
  434. end
  435. if torsvel < 1 then
  436. anim = "Idle"
  437. if attack == false then
  438. clerp(RS, RSnor * CFrame.Angles(Rad(0), Rad(0), Rad(0)) * CFrame.new(0, 0, 0), 0.3)
  439. clerp(LS, LSnor * CFrame.Angles(Rad(0), Rad(0), Rad(0)) * CFrame.new(0, 0, 0), 0.3)
  440. clerp(rootj, rootjnor * CFrame.Angles(Rad(0), 0, Rad(0)), 0.5)
  441. if near == nil then
  442. clerp(neck, necknor, 0.3)
  443. end
  444. clerp(RH, RHnor, 0.3)
  445. clerp(LH, LHnor, 0.3)
  446. end
  447. elseif torsvel > 1 then
  448. anim = "Walk"
  449. if attack == false then
  450. clerp(RS, RSnor * CFrame.Angles(Rad(0), Rad(0), Rad(0)) * CFrame.new(0, 0, 0), 0.3)
  451. clerp(LS, LSnor * CFrame.Angles(Rad(0), Rad(0), Rad(0)) * CFrame.new(0, 0, 0), 0.3)
  452. clerp(rootj, rootjnor * CFrame.Angles(Rad(0), 0, Rad(0)), 0.5)
  453. if near == nil then
  454. clerp(neck, necknor, 0.3)
  455. end
  456. clerp(RH, RHnor, 0.3)
  457. clerp(LH, LHnor, 0.3)
  458. end
  459. end
  460. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement