Advertisement
HenloMyDude

a horse

Dec 13th, 2019
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.58 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. do print("horse by somebody")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
  5.  
  6.  
  7. --Fixed By Kent and buggy
  8. Breeds = {
  9. {fur = BrickColor.new("Reddish brown"), mane = BrickColor.new("Really black"), saddle = BrickColor.new("Really black"), reins = BrickColor.new("Really black"), hoof = BrickColor.new("Really black")}
  10. ,
  11. {fur = BrickColor.new("Institutional white"), mane = BrickColor.new("Dark stone grey"), saddle = BrickColor.new("Really black"), reins = BrickColor.new("Really black"), hoof = BrickColor.new("Really black")}
  12. }
  13. Ply = game.Players.LocalPlayer
  14. Cha = Ply.Character
  15. local Breed = Breeds[math.random(1, #Breeds)]
  16. local ModelName = "Stallion"
  17. local ModelParent = Cha
  18. local ReinsHold = nil
  19. local Height = 6.2
  20. local rHeight = Height
  21. local HasHat = false
  22. local HatMeshId = "rbxassetid://111898512"
  23. local HatTexId = ""
  24. local HorseColor = Breed.fur
  25. local EyeColor = BrickColor.new("Really black")
  26. local ManeColor = Breed.mane
  27. local SaddleColor = Breed.saddle
  28. local ReinsColor = Breed.reins
  29. local HoofColor = Breed.hoof
  30. local oc = function(...)
  31. return ...
  32. end
  33. local ModelScale = 0.6
  34. local Speed = 0
  35. local WalkSpeed = 15
  36. local WalkSin = 6
  37. local TrotSpeed = 30
  38. local TrotSin = 4
  39. local GallopSin = 18
  40. local MaxSpeed = 70
  41. local SpeedLimit = 70
  42. local startpos = Cha.Head.CFrame * CFrame.new(0, Height + 1.5, 10)
  43. math.randomseed(tick() + 215819240)
  44. math.random()
  45. math.random()
  46. math.random()
  47. aran = function()
  48. return math.random()
  49. end
  50.  
  51. ran = function()
  52. return (math.random() - 0.5) * 2
  53. end
  54.  
  55. Weld = function(a, b, c, d)
  56. local w = Instance.new("Weld", a)
  57. w.Part0 = a
  58. w.Part1 = b
  59. if not c then
  60. w.C0 = CFrame.new()
  61. else
  62. w.C0 = c
  63. end
  64. if not d then
  65. w.C1 = CFrame.new()
  66. else
  67. w.C1 = d
  68. end
  69. return w
  70. end
  71.  
  72. function clerp(a,b,t)
  73. local qa = {QuaternionFromCFrame(a)}
  74. local qb = {QuaternionFromCFrame(b)}
  75. local ax, ay, az = a.x, a.y, a.z
  76. local bx, by, bz = b.x, b.y, b.z
  77. local _t = 1-t
  78. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  79. end
  80.  
  81. function QuaternionFromCFrame(cf)
  82. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  83. local trace = m00 + m11 + m22
  84. if trace > 0 then
  85. local s = math.sqrt(1 + trace)
  86. local recip = 0.5/s
  87. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  88. else
  89. local i = 0
  90. if m11 > m00 then
  91. i = 1
  92. end
  93. if m22 > (i == 0 and m00 or m11) then
  94. i = 2
  95. end
  96. if i == 0 then
  97. local s = math.sqrt(m00-m11-m22+1)
  98. local recip = 0.5/s
  99. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  100. elseif i == 1 then
  101. local s = math.sqrt(m11-m22-m00+1)
  102. local recip = 0.5/s
  103. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  104. elseif i == 2 then
  105. local s = math.sqrt(m22-m00-m11+1)
  106. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  107. end
  108. end
  109. end
  110.  
  111. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  112. local xs, ys, zs = x + x, y + y, z + z
  113. local wx, wy, wz = w*xs, w*ys, w*zs
  114. local xx = x*xs
  115. local xy = x*ys
  116. local xz = x*zs
  117. local yy = y*ys
  118. local yz = y*zs
  119. local zz = z*zs
  120. 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))
  121. end
  122.  
  123. function QuaternionSlerp(a, b, t)
  124. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  125. local startInterp, finishInterp;
  126. if cosTheta >= 0.0001 then
  127. if (1 - cosTheta) > 0.0001 then
  128. local theta = math.acos(cosTheta)
  129. local invSinTheta = 1/math.sin(theta)
  130. startInterp = math.sin((1-t)*theta)*invSinTheta
  131. finishInterp = math.sin(t*theta)*invSinTheta
  132. else
  133. startInterp = 1-t
  134. finishInterp = t
  135. end
  136. else
  137. if (1+cosTheta) > 0.0001 then
  138. local theta = math.acos(-cosTheta)
  139. local invSinTheta = 1/math.sin(theta)
  140. startInterp = math.sin((t-1)*theta)*invSinTheta
  141. finishInterp = math.sin(t*theta)*invSinTheta
  142. else
  143. startInterp = t-1
  144. finishInterp = t
  145. end
  146. end
  147. 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
  148. end
  149.  
  150. lerp = function(a, b, c)
  151. return a + (b - a) * c
  152. end
  153.  
  154. ctlerp = function(c1, c2, al)
  155. local com1 = {c1:components()}
  156. local com2 = {c2:components()}
  157. for i,v in pairs(com1) do
  158. com1[i] = lerp(v, com2[i], al)
  159. end
  160. return CFrame.new(unpack(com1))
  161. end
  162.  
  163. local Model = Instance.new("Model", ModelParent)
  164. Model.Name = ModelName
  165. local BasePart = Instance.new("Part")
  166. BasePart.Material = "SmoothPlastic"
  167. BasePart.FormFactor = "Custom"
  168. BasePart.Size = Vector3.new()
  169. BasePart.TopSurface = 10
  170. BasePart:BreakJoints()
  171. BasePart.CFrame = startpos
  172. NP = function()
  173. local p = BasePart:Clone()
  174. p.Parent = Model
  175. return p
  176. end
  177.  
  178. Sphere = function(parent, scale)
  179.  
  180. local sm = Instance.new("SpecialMesh", parent)
  181. sm.MeshType = "Sphere"
  182. if not scale then
  183. sm.Scale = Vector3.new(1, 1, 1)
  184. return sm
  185. end
  186. end
  187.  
  188. BasePart.BrickColor = HorseColor
  189. local Main = NP()
  190. Main.Size = Vector3.new(3.5, 4.5, 8)
  191. Main.CFrame = startpos
  192. MainMesh = Sphere(Main)
  193. local Neck = NP()
  194. Neck.Size = Vector3.new(2, 5, 2.5)
  195. local NeckWeld = Weld(Main, Neck, CFrame.new(0, 0.5, -3.2) * CFrame.Angles(math.rad(-20), 0, 0), CFrame.new(0, -1.5, 0))
  196. local NeckWeld0 = NeckWeld.C0
  197. Sphere(Neck, Vector3.new(1, 1, 1))
  198. local NeckBonus = NP()
  199. NeckBonus.Size = Vector3.new(1.9, 3, 2)
  200. Weld(Neck, NeckBonus, CFrame.new(0, -1.1, 0.5) * CFrame.Angles(-0.5, 0, 0))
  201. Sphere(NeckBonus)
  202. local Head = NP()
  203. Head.Size = Vector3.new(2, 3, 3)
  204. local HeadWeld = Weld(Neck, Head, CFrame.new(0, 2.5, -0.4), CFrame.new(0, 0, 1))
  205. local HeadWeld0 = HeadWeld.C0
  206. local HeadMesh = Instance.new("SpecialMesh", Head)
  207. HeadMesh.Scale = Vector3.new(0.7, 1, 1) * 1.6
  208. HeadMesh.MeshId = "http://www.roblox.com/asset/?id=114690930"
  209. if HasHat then
  210. local Hat = NP()
  211. Hat.Size = Vector3.new()
  212. Hat.BrickColor = SaddleColor
  213. local HatWeld = Weld(Head, Hat, CFrame.new(0, 0.7, 1.3), CFrame.Angles(math.rad(-20), 0, 0))
  214. local HatMesh = Instance.new("SpecialMesh", Hat)
  215. HatMesh.Scale = Vector3.new(1.5, 1.5, 1.5)
  216. HatMesh.MeshId = HatMeshId or "rbxassetid://42157240"
  217. HatMesh.TextureId = HatTexId or ""
  218. end
  219. do
  220. local EyeR = NP()
  221. EyeR.BrickColor = EyeColor
  222. EyeR.Reflectance = 0.1
  223. EyeR.Size = Vector3.new(0.2, 0.2, 0.2)
  224. Weld(Head, EyeR, CFrame.new(0.631, 0.23, 0.11) * CFrame.Angles(-0.2, 0.1, 0))
  225. Sphere(EyeR, Vector3.new(0.9, 2.1, 2.1))
  226. local EyeL = NP()
  227. EyeL.BrickColor = EyeColor
  228. EyeL.Reflectance = 0.1
  229. EyeL.Size = Vector3.new(0.2, 0.2, 0.2)
  230. Weld(Head, EyeL, CFrame.new(-0.631, 0.23, 0.11) * CFrame.Angles(-0.2, -0.1, 0))
  231. Sphere(EyeL, Vector3.new(0.9, 2.1, 2.1))
  232. BasePart.Name = "Reins"
  233. local RPart = NP()
  234. RPart.BrickColor = ReinsColor
  235. RPart.Size = Vector3.new(0.2, 0.7, 0.25)
  236. Weld(Head, RPart, CFrame.new(0.4, -0.5, -1.05) * CFrame.Angles(-0.25, 0, 0))
  237. local Cyl = NP()
  238. Cyl.BrickColor = ReinsColor
  239. Cyl.Size = Vector3.new(0.2495, 0.2, 0.2)
  240. Instance.new("SpecialMesh", Cyl).MeshType = "Cylinder"
  241. Weld(RPart, Cyl, CFrame.new(0, RPart.Size.Y / 2, 0) * CFrame.Angles(0, math.pi / 2, 0))
  242. local RPart = NP()
  243. RPart.BrickColor = ReinsColor
  244. RPart.Size = Vector3.new(0.2, 0.4, 0.25)
  245. Weld(Head, RPart, CFrame.new(0.4, -0.5, -1.05) * CFrame.Angles(-0.25, 0, 0) * CFrame.new(0, -0.35, 0) * CFrame.Angles(0, 0, -0.5) * CFrame.new(0, -0.2, 0))
  246. local Cyl = NP()
  247. Cyl.BrickColor = ReinsColor
  248. Cyl.Size = Vector3.new(0.2495, 0.2, 0.2)
  249. Instance.new("SpecialMesh", Cyl).MeshType = "Cylinder"
  250. Weld(RPart, Cyl, CFrame.new(0, RPart.Size.Y / 2, 0) * CFrame.Angles(0, math.pi / 2, 0))
  251. local ReinAnchorR = Cyl
  252. local RPart = NP()
  253. RPart.BrickColor = ReinsColor
  254. RPart.Size = Vector3.new(0.2, 0.7, 0.25)
  255. Weld(Head, RPart, CFrame.new(-0.4, -0.5, -1.05) * CFrame.Angles(-0.25, 0, 0))
  256. local Cyl = NP()
  257. Cyl.BrickColor = ReinsColor
  258. Cyl.Size = Vector3.new(0.2495, 0.2, 0.2)
  259. Instance.new("SpecialMesh", Cyl).MeshType = "Cylinder"
  260. Weld(RPart, Cyl, CFrame.new(0, RPart.Size.Y / 2, 0) * CFrame.Angles(0, math.pi / 2, 0))
  261. local RPart = NP()
  262. RPart.BrickColor = ReinsColor
  263. RPart.Size = Vector3.new(0.2, 0.4, 0.25)
  264. Weld(Head, RPart, CFrame.new(-0.4, -0.5, -1.05) * CFrame.Angles(-0.25, 0, 0) * CFrame.new(0, -0.35, 0) * CFrame.Angles(0, 0, 0.5) * CFrame.new(0, -0.2, 0))
  265. local Cyl = NP()
  266. Cyl.BrickColor = ReinsColor
  267. Cyl.Size = Vector3.new(0.2495, 0.2, 0.2)
  268. Instance.new("SpecialMesh", Cyl).MeshType = "Cylinder"
  269. Weld(RPart, Cyl, CFrame.new(0, RPart.Size.Y / 2, 0) * CFrame.Angles(0, math.pi / 2, 0))
  270. local ReinAnchorL = Cyl
  271. local RPart = NP()
  272. RPart.BrickColor = ReinsColor
  273. RPart.Size = Vector3.new(0.5, 0.2, 0.249)
  274. Weld(Head, RPart, CFrame.new(0, -0.5, -1.05) * CFrame.Angles(-0.25, 0, 0) * CFrame.new(0, -0.65, 0))
  275. local Cyl = NP()
  276. Cyl.BrickColor = ReinsColor
  277. Cyl.Size = Vector3.new(0.2495, 0.2, 0.2)
  278. Instance.new("SpecialMesh", Cyl).MeshType = "Cylinder"
  279. Weld(RPart, Cyl, CFrame.new(RPart.Size.X / 2, 0, 0) * CFrame.Angles(0, math.pi / 2, 0))
  280. local Cyl = NP()
  281. Cyl.BrickColor = ReinsColor
  282. Cyl.Size = Vector3.new(0.2495, 0.2, 0.2)
  283. Instance.new("SpecialMesh", Cyl).MeshType = "Cylinder"
  284. Weld(RPart, Cyl, CFrame.new(-RPart.Size.X / 2, 0, 0) * CFrame.Angles(0, math.pi / 2, 0))
  285. local RPart = NP()
  286. RPart.BrickColor = ReinsColor
  287. RPart.Size = Vector3.new(0.8, 0.2, 0.249)
  288. Weld(Head, RPart, CFrame.new(0, -0.5, -1.05) * CFrame.Angles(-0.25, 0, 0) * CFrame.new(0, 0.35, 0))
  289. local RPart = NP()
  290. RPart.BrickColor = ReinsColor
  291. local sm = Instance.new("SpecialMesh", RPart)
  292. sm.MeshType = "Sphere"
  293. local ReinSphereL = Weld(Main, RPart, CFrame.new(-1, 3, 0))
  294. local RPart = NP()
  295. RPart.BrickColor = ReinsColor
  296. local sm = Instance.new("SpecialMesh", RPart)
  297. sm.MeshType = "Cylinder"
  298. local ReinLineL = Weld(Main, RPart, CFrame.new(-1, 3, -1))
  299. local RPart = NP()
  300. RPart.BrickColor = ReinsColor
  301. local sm = Instance.new("SpecialMesh", RPart)
  302. sm.MeshType = "Sphere"
  303. local ReinSphereR = Weld(Main, RPart, CFrame.new(1, 3, 0))
  304. local RPart = NP()
  305. RPart.BrickColor = ReinsColor
  306. local sm = Instance.new("SpecialMesh", RPart)
  307. sm.MeshType = "Cylinder"
  308. local ReinLineR = Weld(Main, RPart, CFrame.new(1, 3, -1))
  309. local RPart = NP()
  310. RPart.BrickColor = ReinsColor
  311. local sm = Instance.new("SpecialMesh", RPart)
  312. sm.MeshType = "Cylinder"
  313. local ReinLineM = Weld(Main, RPart, CFrame.new(0, 3, 0))
  314. BasePart.Name = "Part"
  315. local Tail = NP()
  316. Tail.BrickColor = ManeColor
  317. Tail.CanCollide = false
  318. Tail.Transparency = 1
  319. Tail.Size = Vector3.new(0.8, 4.5, 0.8)
  320. local TailWeld = Weld(Main, Tail, CFrame.new(0, 0.88, 3.4) * CFrame.Angles(0, math.rad(10), 0), CFrame.new(0, -2.3, 0) * CFrame.Angles(math.rad(-130), 0, 0))
  321. local TailWeld0 = TailWeld.C0
  322. local TailHairs = {}
  323. for i = 1, 8 do
  324. local t = NP()
  325. t.CanCollide = false
  326. t.BrickColor = Tail.BrickColor
  327. t.Size = Vector3.new(0.4 + aran() * 0.2, 5.5 - i * 0.1, 0.4 + aran() * 0.2)
  328. local tw = Weld(Tail, t, CFrame.new(0, -Tail.Size.Y / 2, 0) * CFrame.Angles(ran() * 0.15, ran() * 0.5, ran() * 0.15) * CFrame.new(ran() * 0.1, 0, ran() * 0.1), CFrame.new(0, -t.Size.Y / 2 + 0.05, 0))
  329. table.insert(TailHairs, {w = tw, c0 = tw.C0})
  330. end
  331. local BackHairs = {}
  332. for i = 0, 10 do
  333. if i < 1 or i > 7 then
  334. local x = i / 10
  335. local m = NP()
  336. m.CanCollide = false
  337. m.BrickColor = ManeColor
  338. m.Size = Vector3.new(0.6 + aran() * 0.2 + math.sin(x * 2.7) * 0.5, 0.9 + ran() * 0.1, 0.9 + ran() * 0.1)
  339. if i < 1 then
  340. m.Size = m.Size * 0.7
  341. end
  342. local tw = Weld(Main, m, CFrame.new(0, 0.9 + math.sin(x * 2.8) * 1.2, 3.4 - x * 6), CFrame.Angles(ran() * 0.1, aran() * 0.1, ran() * 0.2))
  343. table.insert(BackHairs, {w = tw, c0 = tw.C0})
  344. end
  345. end
  346. local NeckHairs = {}
  347. for i = 0, 6 do
  348. local x = i / 6
  349. local m = NP()
  350. m.CanCollide = false
  351. m.BrickColor = ManeColor
  352. m.Size = Vector3.new(0.8 + ran() * 0.2, 0.7 + ran() * 0.1, 0.9 + ran() * 0.1)
  353. local tw = Weld(Neck, m, CFrame.new(0, -1.3 + x * 3.5, 1 + math.sin(0.55 + x * 3.7) * 0.5), CFrame.Angles(ran() * 0.08, aran() * 0.15, ran() * 0.08))
  354. table.insert(NeckHairs, {w = tw, c0 = tw.C0})
  355. end
  356. local HeadHairs = {}
  357. for i = 0, 6 do
  358. local x = math.min(1, i / 3)
  359. local m = NP()
  360. m.CanCollide = false
  361. m.BrickColor = ManeColor
  362. if HasHat then
  363. m.Transparency = 1
  364. end
  365. m.Size = Vector3.new(0.95 + ran() * 0.2, 1, 0.4)
  366. local tw = Weld(Head, m, CFrame.new(0, -0.8 + x * 1.6, 2.02 - i * 0.23) * CFrame.Angles(-0.2 - i * 0.3, 0, 0), CFrame.Angles(ran() * 0.08, aran() * 0.03, ran() * 0.08))
  367. table.insert(HeadHairs, {w = tw, c0 = tw.C0})
  368. end
  369. local LHip = NP()
  370. LHip.Size = Vector3.new(1.5, 3.7, 3.5)
  371. Weld(Main, LHip, CFrame.new(-1, -0.5, 2.2) * CFrame.Angles(0, 0.35, 0))
  372. Sphere(LHip)
  373. local LThigh = NP()
  374. LThigh.CanCollide = false
  375. LThigh.Size = Vector3.new(1.6, 4, 2.2)
  376. local BL1 = Weld(LHip, LThigh, CFrame.new(-0.05, 0.3, -0.5) * CFrame.Angles(0, -0.35, 0) * CFrame.Angles(0, 0, 0), CFrame.new(0, 1.7, 0))
  377. Sphere(LThigh)
  378. local LBCannon = NP()
  379. LBCannon.CanCollide = false
  380. LBCannon.Size = Vector3.new(1, 2.8, 1)
  381. local sm = Instance.new("SpecialMesh", LBCannon)
  382. sm.MeshType = "Head"
  383. local BL2 = Weld(LThigh, LBCannon, CFrame.new(0, -LThigh.Size.Y / 2 + 0.4, -0.05) * CFrame.Angles(0, 0, 0), CFrame.new(0, 1.3, 0))
  384. local LBKnee = NP()
  385. LBKnee.CanCollide = false
  386. LBKnee.Size = Vector3.new(1, 1, 1)
  387. local sm = Instance.new("SpecialMesh", LBKnee)
  388. sm.MeshType = "Sphere"
  389. Weld(LBCannon, LBKnee, CFrame.new(0, LBCannon.Size.Y / 2 - 0.1, 0))
  390. local LBHoof = NP()
  391. LBHoof.BrickColor = HoofColor
  392. LBHoof.CanCollide = false
  393. LBHoof.Size = Vector3.new(1, 0.7, 1)
  394. Instance.new("CylinderMesh", LBHoof)
  395. local BL3 = Weld(LBCannon, LBHoof, CFrame.new(0, -LBCannon.Size.Y / 2, 0) * CFrame.Angles(0, 0, 0), CFrame.new(0, 0.12, 0.2))
  396. local Hoof = NP()
  397. Hoof.BrickColor = HoofColor
  398. Hoof.CanCollide = false
  399. Hoof.Size = Vector3.new(0.2, 0.699, 0.5)
  400. Weld(LBHoof, Hoof, CFrame.new(0.4, 0, 0.25))
  401. local Hoof = NP()
  402. Hoof.BrickColor = HoofColor
  403. Hoof.CanCollide = false
  404. Hoof.Size = Vector3.new(0.2, 0.699, 0.5)
  405. Weld(LBHoof, Hoof, CFrame.new(-0.4, 0, 0.25))
  406. local RHip = NP()
  407. RHip.Size = Vector3.new(1.5, 3.7, 3.5)
  408. Weld(Main, RHip, CFrame.new(1, -0.5, 2.2) * CFrame.Angles(0, -0.35, 0))
  409. Sphere(RHip)
  410. local RThigh = NP()
  411. RThigh.CanCollide = false
  412. RThigh.Size = Vector3.new(1.6, 4, 2.2)
  413. local BR1 = Weld(RHip, RThigh, CFrame.new(0.05, 0.3, -0.4) * CFrame.Angles(0, 0.35, 0) * CFrame.Angles(0, 0, 0), CFrame.new(0, 1.7, 0))
  414. Sphere(RThigh)
  415. local RBCannon = NP()
  416. RBCannon.CanCollide = false
  417. RBCannon.Size = Vector3.new(1, 2.8, 1)
  418. local sm = Instance.new("SpecialMesh", RBCannon)
  419. sm.MeshType = "Head"
  420. local BR2 = Weld(RThigh, RBCannon, CFrame.new(0, -RThigh.Size.Y / 2 + 0.4, -0.05) * CFrame.Angles(0, 0, 0), CFrame.new(0, 1.3, 0))
  421. local RBKnee = NP()
  422. RBKnee.CanCollide = false
  423. RBKnee.Size = Vector3.new(1, 1, 1)
  424. local sm = Instance.new("SpecialMesh", RBKnee)
  425. sm.MeshType = "Sphere"
  426. Weld(RBCannon, RBKnee, CFrame.new(0, RBCannon.Size.Y / 2 - 0.1, 0))
  427. local RBHoof = NP()
  428. RBHoof.BrickColor = HoofColor
  429. RBHoof.CanCollide = false
  430. RBHoof.Size = Vector3.new(1, 0.7, 1)
  431. Instance.new("CylinderMesh", RBHoof)
  432. local BR3 = Weld(RBCannon, RBHoof, CFrame.new(0, -RBCannon.Size.Y / 2, 0) * CFrame.Angles(0, 0, 0), CFrame.new(0, 0.12, 0.2))
  433. local Hoof = NP()
  434. Hoof.BrickColor = HoofColor
  435. Hoof.CanCollide = false
  436. Hoof.Size = Vector3.new(0.2, 0.699, 0.5)
  437. Weld(RBHoof, Hoof, CFrame.new(0.4, 0, 0.25))
  438. local Hoof = NP()
  439. Hoof.BrickColor = HoofColor
  440. Hoof.CanCollide = false
  441. Hoof.Size = Vector3.new(0.2, 0.699, 0.5)
  442. Weld(RBHoof, Hoof, CFrame.new(-0.4, 0, 0.25))
  443. local LShoulder = NP()
  444. LShoulder.Size = Vector3.new(1.5, 2.5, 2)
  445. Weld(Main, LShoulder, CFrame.new(-0.9, -0.5, -2.4) * CFrame.Angles(0, 0.15, 0))
  446. Sphere(LShoulder)
  447. local LForearm = NP()
  448. LForearm.CanCollide = false
  449. LForearm.Size = Vector3.new(1.2, 3.5, 1.5)
  450. local FL1 = Weld(LShoulder, LForearm, CFrame.new(-0.1, 0.2, 0.1) * CFrame.Angles(0, 0, 0), CFrame.new(0, 1.45, 0))
  451. Sphere(LForearm)
  452. local LFCannon = NP()
  453. LFCannon.CanCollide = false
  454. LFCannon.Size = Vector3.new(0.8, 2.8, 0.8)
  455. local sm = Instance.new("SpecialMesh", LFCannon)
  456. sm.MeshType = "Head"
  457. local FL2 = Weld(LForearm, LFCannon, CFrame.new(0, -LForearm.Size.Y / 2 + 0.4, -0.05) * CFrame.Angles(0, 0, 0), CFrame.new(0, 1.3, 0))
  458. local LFKnee = NP()
  459. LFKnee.CanCollide = false
  460. LFKnee.Size = Vector3.new(0.8, 0.8, 0.8)
  461. local sm = Instance.new("SpecialMesh", LFKnee)
  462. sm.MeshType = "Sphere"
  463. Weld(LFCannon, LFKnee, CFrame.new(0, LFCannon.Size.Y / 2 - 0.1, 0))
  464. local LFHoof = NP()
  465. LFHoof.BrickColor = HoofColor
  466. LFHoof.CanCollide = false
  467. LFHoof.Size = Vector3.new(0.8, 0.6, 0.8)
  468. Instance.new("CylinderMesh", LFHoof)
  469. local FL3 = Weld(LFCannon, LFHoof, CFrame.new(0, -LFCannon.Size.Y / 2, 0) * CFrame.Angles(0, 0, 0), CFrame.new(0, 0.12, 0.2))
  470. local Hoof = NP()
  471. Hoof.BrickColor = HoofColor
  472. Hoof.CanCollide = false
  473. Hoof.Size = Vector3.new(0.2, 0.599, 0.4)
  474. Weld(LFHoof, Hoof, CFrame.new(0.3, 0, 0.2))
  475. local Hoof = NP()
  476. Hoof.BrickColor = HoofColor
  477. Hoof.CanCollide = false
  478. Hoof.Size = Vector3.new(0.2, 0.599, 0.4)
  479. Weld(LFHoof, Hoof, CFrame.new(-0.3, 0, 0.2))
  480. local RShoulder = NP()
  481. RShoulder.Size = Vector3.new(1.5, 2.5, 2)
  482. Weld(Main, RShoulder, CFrame.new(0.9, -0.5, -2.4) * CFrame.Angles(0, -0.15, 0))
  483. Sphere(RShoulder)
  484. local RForearm = NP()
  485. RForearm.CanCollide = false
  486. RForearm.Size = Vector3.new(1.2, 3.5, 1.5)
  487. local FR1 = Weld(RShoulder, RForearm, CFrame.new(0.1, 0.2, -0.1) * CFrame.Angles(0, 0, 0), CFrame.new(0, 1.45, 0))
  488. Sphere(RForearm)
  489. local RFCannon = NP()
  490. RFCannon.CanCollide = false
  491. RFCannon.Size = Vector3.new(0.8, 2.8, 0.8)
  492. local sm = Instance.new("SpecialMesh", RFCannon)
  493. sm.MeshType = "Head"
  494. local FR2 = Weld(RForearm, RFCannon, CFrame.new(0, -RForearm.Size.Y / 2 + 0.4, -0.05) * CFrame.Angles(0, 0, 0), CFrame.new(0, 1.3, 0))
  495. local RFKnee = NP()
  496. RFKnee.CanCollide = false
  497. RFKnee.Size = Vector3.new(0.8, 0.8, 0.8)
  498. local sm = Instance.new("SpecialMesh", RFKnee)
  499. sm.MeshType = "Sphere"
  500. Weld(RFCannon, RFKnee, CFrame.new(0, RFCannon.Size.Y / 2 - 0.1, 0))
  501. local RFHoof = NP()
  502. RFHoof.BrickColor = HoofColor
  503. RFHoof.CanCollide = false
  504. RFHoof.Size = Vector3.new(0.8, 0.6, 0.8)
  505. Instance.new("CylinderMesh", RFHoof)
  506. local FR3 = Weld(RFCannon, RFHoof, CFrame.new(0, -RFCannon.Size.Y / 2, 0) * CFrame.Angles(0, 0, 0), CFrame.new(0, 0.12, 0.2))
  507. local Hoof = NP()
  508. Hoof.BrickColor = HoofColor
  509. Hoof.CanCollide = false
  510. Hoof.Size = Vector3.new(0.2, 0.599, 0.4)
  511. Weld(RFHoof, Hoof, CFrame.new(0.3, 0, 0.2))
  512. local Hoof = NP()
  513. Hoof.BrickColor = HoofColor
  514. Hoof.CanCollide = false
  515. Hoof.Size = Vector3.new(0.2, 0.599, 0.4)
  516. Weld(RFHoof, Hoof, CFrame.new(-0.3, 0, 0.2))
  517. Seat = Instance.new("VehicleSeat", Model)
  518. Seat.TopSurface = 10
  519. Seat.Size = Vector3.new(2, 1.2, 0.5)
  520. Seat.HeadsUpDisplay = false
  521. Seat.CanCollide = false
  522. Seat:BreakJoints()
  523. Seat.Transparency = 1
  524. Seat.CFrame = Main.CFrame
  525. SeatWeld = Weld(Main, Seat, CFrame.new(0, 2.5, -0.5), CFrame.new(0, 0, 0))
  526. local SeatWeld0 = SeatWeld.C0
  527. Seat2 = Instance.new("Seat", Model)
  528. Seat2.TopSurface = 10
  529. Seat2.Size = Vector3.new(2, 1.2, 0.5)
  530. Seat2.CanCollide = false
  531. Seat2.CFrame = Main.CFrame
  532. Seat2:BreakJoints()
  533. Seat2.Transparency = 1
  534. Weld(Seat2, Seat, CFrame.new(0, 0, -1.8))
  535. SaddleMain = NP()
  536. SaddleMain.Size = Vector3.new(2, 1, 3.5)
  537. SaddleMain.BrickColor = SaddleColor
  538. Sphere(SaddleMain)
  539. Weld(Seat, SaddleMain, CFrame.new(0, -0.5, 0.6))
  540. SaddleFront = NP()
  541. SaddleFront.Size = Vector3.new(1.6, 1, 0.3)
  542. SaddleFront.BrickColor = SaddleColor
  543. Sphere(SaddleFront)
  544. Weld(SaddleMain, SaddleFront, CFrame.new(0, 0.4, -1.4) * CFrame.Angles(math.rad(-30), 0, 0))
  545. SaddleBack = NP()
  546. SaddleBack.Size = Vector3.new(1.6, 1, 0.5)
  547. SaddleBack.BrickColor = SaddleColor
  548. Sphere(SaddleBack)
  549. Weld(SaddleMain, SaddleBack, CFrame.new(0, 0.3, 1.4) * CFrame.Angles(math.rad(30), 0, 0))
  550. SaddleFlankR = NP()
  551. SaddleFlankR.Size = Vector3.new(0.3, 1.7, 1.8)
  552. SaddleFlankR.BrickColor = SaddleColor
  553. Sphere(SaddleFlankR)
  554. Weld(SaddleMain, SaddleFlankR, CFrame.new(1.5, -0.8, 0), CFrame.new(0.1, -0.7, 0) * CFrame.Angles(0, 0, math.rad(-30)))
  555. SaddleFlankL = NP()
  556. SaddleFlankL.Size = Vector3.new(0.3, 1.7, 1.8)
  557. SaddleFlankL.BrickColor = SaddleColor
  558. Sphere(SaddleFlankL)
  559. Weld(SaddleMain, SaddleFlankL, CFrame.new(-1.5, -0.8, 0), CFrame.new(-0.1, -0.7, 0) * CFrame.Angles(0, 0, math.rad(30)))
  560. local sWeld1, sWeld2 = nil, nil
  561. Seat.DescendantAdded:connect(function(obj)
  562.  
  563. if obj.Name == "SeatWeld" then
  564. sWeld1 = obj
  565. torso2 = obj.Part1.Parent.Torso
  566. local Torso = obj.Part1.Parent.Torso
  567. obj.C0 = obj.C0 * CFrame.new(0, 0, -1.5)
  568. local lhipr = Torso:FindFirstChild("Left Hip")
  569. local rhipr = Torso:FindFirstChild("Right Hip")
  570. if not lhipr or not rhipr then
  571. game:service("Debris"):addItem(obj, 0.1)
  572. return
  573. end
  574. for i,v in pairs(Model:GetChildren()) do
  575. if v.Name == "Reins" and v:IsA("BasePart") then
  576. v.Transparency = Main.Transparency
  577. end
  578. end
  579. local lh0, lh1 = lhipr.Part0, lhipr.Part1
  580. local rh0, rh1 = rhipr.Part0, rhipr.Part1
  581. lhipr.Part0 = nil
  582. rhipr.Part0 = nil
  583. local lhip = lhipr:Clone()
  584. lhip.Name = "LH"
  585. lhip.Parent = lhipr.Parent
  586. lhip.Part0 = lh0
  587. local rhip = rhipr:Clone()
  588. rhip.Name = "RH"
  589. rhip.Parent = rhipr.Parent
  590. rhip.Part0 = rh0
  591. lhip.DesiredAngle = 0
  592. rhip.DesiredAngle = 0
  593. local lhip0, lhip1, rhip0, rhip1 = lhip.C0, lhip.C1, rhip.C0, rhip.C1
  594. lhip.C0 = lhip0 * CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-45), 0, math.rad(-40))
  595. lhip.C1 = lhip1 * CFrame.new(0.1, -0.2, 0)
  596. rhip.C0 = rhip0 * CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-45), 0, math.rad(40))
  597. rhip.C1 = rhip1 * CFrame.new(-0.1, -0.2, 0)
  598. local toolOn = false
  599. local toolAn = 0
  600. local toolCon, toolChan = nil, nil
  601. local oc0 = obj.C0
  602. local newChild = function(d)
  603.  
  604. local md = d:FindFirstChild("MouseDown")
  605. if d:IsA("Tool") and md and md:IsA("BoolValue") then
  606. pcall(function()
  607.  
  608. toolChan:disconnect()
  609. end
  610. )
  611. toolOn = false
  612. toolChan = md.Changed:connect(function()
  613.  
  614. toolOn = md.Value
  615. if not toolOn then
  616. return
  617. end
  618. pcall(function()
  619.  
  620. ReinsHold = CFrame.new(0, 2, -1.7)
  621. end
  622. )
  623. while toolOn and game:service("RunService").Stepped:wait() do
  624. toolAn = math.min(1, toolAn + 0.2)
  625. obj.C0 = CFrame.new(toolAn * 1.8, toolAn * -1.1, 0) * CFrame.Angles(0, 0, -toolAn * 0.9) * oc0
  626. end
  627. while true do
  628. if not toolOn and game:service("RunService").Stepped:wait() then
  629. toolAn = math.max(0, toolAn - 0.2)
  630. obj.C0 = CFrame.new(toolAn * 1.8, toolAn * -1.1, 0) * CFrame.Angles(0, 0, -toolAn * 0.9) * oc0
  631. end
  632. if toolAn == 0 then
  633. break
  634. end
  635. end
  636. ReinsHold = nil
  637. end
  638. )
  639. end
  640. end
  641.  
  642. local ctrlgui = nil
  643. if Torso.Parent then
  644. toolCon = Torso.Parent.ChildAdded:connect(newChild)
  645. for i,v in pairs(Torso.Parent:GetChildren()) do
  646. newChild(v)
  647. end
  648. local plr = game.Players:GetPlayerFromCharacter(Torso.Parent)
  649. if plr then
  650. ctrlgui = Instance.new("ScreenGui")
  651. local fr = Instance.new("Frame", ctrlgui)
  652. fr.Position = UDim2.new(1, 0, 0.9, 0)
  653. fr.Size = UDim2.new(-0.07, 0, 0.02, 0)
  654. fr.BackgroundTransparency = 1
  655. local nbtn = function(text, indent)
  656.  
  657. for i,v in pairs(fr:GetChildren()) do
  658. v.Position = v.Position - UDim2.new(0, 0, 1, 1)
  659. end
  660. local tb = Instance.new("TextButton", fr)
  661. tb.Size = UDim2.new(-1, 4 + (indent - 1) * 3, 1, -4)
  662. tb.Position = UDim2.new(1, 2, 0, 2)
  663. tb.BorderSizePixel = 3
  664. tb.BackgroundColor3 = HorseColor.Color
  665. tb.BorderColor3 = ManeColor.Color
  666. tb.Text = " " .. text .. " "
  667. tb.TextXAlignment = "Left"
  668. tb.TextColor3 = Color3.new(1, 1, 1)
  669. tb.TextStrokeTransparency = 0.6
  670. tb.TextScaled = true
  671. tb.ZIndex = 10
  672. local il = Instance.new("ImageLabel", tb)
  673. il.Size = UDim2.new(-1, 2, 1, -2)
  674. il.Image = "rbxassetid://129465985"
  675. il.SizeConstraint = "RelativeYY"
  676. il.BackgroundTransparency = 1
  677. il.Position = UDim2.new(1, 0, 0, 2)
  678. il.ZIndex = 10
  679. return tb
  680. end
  681.  
  682. nbtn("| Horse menu", 1).AutoButtonColor = false
  683. nbtn("- Max speed", 2).AutoButtonColor = false
  684. local gal = nbtn("~ Gallop", 3)
  685. local trot = nbtn("~ Trot", 3)
  686. local walk = nbtn("~ Walk", 3)
  687. local tar = (SpeedLimit == MaxSpeed and gal) or (SpeedLimit == TrotSpeed and trot) or walk
  688. tar.BackgroundColor3 = Color3.new(0, 0.7, 0)
  689. gal.MouseButton1Down:connect(function()
  690.  
  691. gal.BackgroundColor3 = Color3.new(0, 0.7, 0)
  692. trot.BackgroundColor3 = HorseColor.Color
  693. walk.BackgroundColor3 = HorseColor.Color
  694. SpeedLimit = MaxSpeed
  695. end
  696. )
  697. trot.MouseButton1Down:connect(function()
  698.  
  699. gal.BackgroundColor3 = HorseColor.Color
  700. trot.BackgroundColor3 = Color3.new(0, 0.7, 0)
  701. walk.BackgroundColor3 = HorseColor.Color
  702. SpeedLimit = TrotSpeed
  703. end
  704. )
  705. walk.MouseButton1Down:connect(function()
  706.  
  707. gal.BackgroundColor3 = HorseColor.Color
  708. trot.BackgroundColor3 = HorseColor.Color
  709. walk.BackgroundColor3 = Color3.new(0, 0.7, 0)
  710. SpeedLimit = WalkSpeed
  711. end
  712. )
  713. pcall(function()
  714.  
  715. for i,v in pairs(plr:GetChildren()) do
  716. pcall(function()
  717.  
  718. if v:IsA("PlayerGui") then
  719. ctrlgui.Parent = v
  720. end
  721. end
  722. )
  723. end
  724. end
  725. )
  726. end
  727. end
  728. obj.AncestryChanged:connect(function(c, p)
  729.  
  730. if c ~= obj or p == Seat then
  731. return
  732. end
  733. lhip:Destroy()
  734. rhip:Destroy()
  735. lhipr.Part0 = lh0
  736. rhipr.Part0 = rh0
  737. obj:Destroy()
  738. ReinsHold = nil
  739. for i,v in pairs(Model:GetChildren()) do
  740. if v.Name == "Reins" and v:IsA("BasePart") then
  741. v.Transparency = 1
  742. end
  743. end
  744. pcall(function()
  745.  
  746. toolCon:disconnect()
  747. end
  748. )
  749. pcall(function()
  750.  
  751. toolChan:disconnect()
  752. end
  753. )
  754. pcall(game.Destroy, ctrlgui)
  755. end
  756. )
  757. end
  758. end
  759. )
  760. Seat2.DescendantAdded:connect(function(obj)
  761. if obj.Name == "SeatWeld" then
  762. sWeld2 = obj
  763. local Torso = obj.Part1.Parent.Torso
  764. obj.C0 = obj.C0 * CFrame.new(0, 0.5, -1.5)
  765. local lhipr = Torso:FindFirstChild("Left Hip")
  766. local rhipr = Torso:FindFirstChild("Right Hip")
  767. --local animate = Torso.Parent:FindFirstChild("Animate")
  768. if not lhipr or not rhipr then
  769. game:service("Debris"):addItem(obj, 0.1)
  770. return
  771. end
  772. local lh0, lh1 = lhipr.Part0, lhipr.Part1
  773. local rh0, rh1 = rhipr.Part0, rhipr.Part1
  774. lhipr.Part0 = nil
  775. rhipr.Part0 = nil
  776. -- animate.Parent = nil
  777. local lhip = lhipr:Clone()
  778. lhip.Name = "LH"
  779. lhip.Parent = lhipr.Parent
  780. lhip.Part0 = lh0
  781. local rhip = rhipr:Clone()
  782. rhip.Name = "RH"
  783. rhip.Parent = rhipr.Parent
  784. rhip.Part0 = rh0
  785. lhip.DesiredAngle = 0
  786. rhip.DesiredAngle = 0
  787. local lhip0, lhip1, rhip0, rhip1 = lhip.C0, lhip.C1, rhip.C0, rhip.C1
  788. lhip.C0 = lhip0 * CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-45), 0, math.rad(-40))
  789. lhip.C1 = lhip1 * CFrame.new(0.1, -0.2, 0)
  790. rhip.C0 = rhip0 * CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-45), 0, math.rad(40))
  791. rhip.C1 = rhip1 * CFrame.new(-0.1, -0.2, 0)
  792. local toolOn = false
  793. local toolAn = 0
  794. local toolCon, toolChan = nil, nil
  795. local oc0 = obj.C0
  796. local newChild = function(d)
  797.  
  798. local md = d:FindFirstChild("MouseDown")
  799. if d:IsA("Tool") and md and md:IsA("BoolValue") then
  800. pcall(function()
  801.  
  802. toolChan:disconnect()
  803. end
  804. )
  805. toolOn = false
  806. toolChan = md.Changed:connect(function()
  807.  
  808. toolOn = md.Value
  809. if not toolOn then
  810. return
  811. end
  812. while toolOn and game:service("RunService").Stepped:wait() do
  813. toolAn = math.min(1, toolAn + 0.2)
  814. obj.C0 = CFrame.new(toolAn * 1.8, toolAn * -1.1, 0) * CFrame.Angles(0, 0, -toolAn * 0.9) * oc0
  815. end
  816. while 1 do
  817. if not toolOn and game:service("RunService").Stepped:wait() then
  818. toolAn = math.max(0, toolAn - 0.2)
  819. obj.C0 = CFrame.new(toolAn * 1.8, toolAn * -1.1, 0) * CFrame.Angles(0, 0, -toolAn * 0.9) * oc0
  820. end
  821. if toolAn == 0 then
  822. break
  823. end
  824. end
  825. end
  826. )
  827. end
  828. end
  829.  
  830. toolCon = Torso.Parent.ChildAdded:connect(newChild)
  831. for i,v in pairs(Torso.Parent:GetChildren()) do
  832. newChild(v)
  833. end
  834. obj.AncestryChanged:connect(function(c, p)
  835.  
  836. if c ~= obj or p == Seat2 then
  837. return
  838. end
  839. --animate.Parent = Torso.Parent
  840. lhip:Destroy()
  841. rhip:Destroy()
  842. lhipr.Part0 = lh0
  843. rhipr.Part0 = rh0
  844. obj:Destroy()
  845. end
  846. )
  847. end
  848. end
  849. )
  850. for i,v in pairs(Model:GetChildren()) do
  851. if v.Name == "Reins" and v:IsA("BasePart") then
  852. v.Transparency = 1
  853. end
  854. end
  855. local Filler = NP()
  856. Filler.Size = Vector3.new(3, 4, 7)
  857. Filler.Transparency = 1
  858. Weld(Main, Filler, CFrame.new(0, -2, 0))
  859. local BallB = NP()
  860. BallB.CanCollide = true
  861. BallB.Shape = "Ball"
  862. BallB.Size = Vector3.new(3, 3, 3)
  863. BallB.Transparency = 1
  864. local BBW = Weld(Main, BallB, CFrame.new(0, -Height + BallB.Size.Y / 2, 3))
  865. BBW0 = BBW.C0
  866. local BallF = NP()
  867. BallF.CanCollide = true
  868. BallF.Shape = "Ball"
  869. BallF.Size = Vector3.new(3, 3, 3)
  870. BallF.Transparency = 1
  871. local FBW = Weld(Main, BallF, CFrame.new(0, -Height + BallB.Size.Y / 2, -3))
  872. FBW0 = FBW.C0
  873. local BG = Instance.new("BodyGyro", Main)
  874. BG.cframe = Main.CFrame
  875. local bgcf = BG.cframe
  876. BG.maxTorque = Vector3.new(1, 1, 1) * 4000000
  877. local BF = Instance.new("BodyForce", Main)
  878. BF.force = Vector3.new(0, 10000, 0)
  879. local BV = Instance.new("BodyVelocity", Main)
  880. BV.maxForce = Vector3.new(1, 1, 1) * 4000000
  881. BV.velocity = Vector3.new()
  882. local bvvel = Vector3.new()
  883. local Legs = {FR1, FR2, FR3, FL1, FL2, FL3, BR1, BR2, BR3, BL1, BL2, BL3}
  884. local Legs0 = {}
  885. for i,v in pairs(Legs) do
  886. Legs0[i] = v.C0
  887. end
  888. RayCast = function(Ray, Ignore)
  889.  
  890. local hit, p = workspace:FindPartOnRayWithIgnoreList(Ray, Ignore)
  891. if not hit or hit.CanCollide then
  892. return hit, p
  893. elseif hit then
  894. table.insert(Ignore, hit)
  895. return RayCast(Ray, Ignore)
  896. end
  897. end
  898.  
  899. local climbangle = 0
  900. local blinktimer = 0
  901. local connection = nil
  902. connection = game:GetService("RunService").Stepped:connect(oc(function()
  903.  
  904. if not Model:IsDescendantOf(workspace) then
  905. pcall(game.Destroy, Model)
  906. pcall(game.Destroy, script)
  907. connection:disconnect()
  908. end
  909. local th = Seat.Throttle
  910. local st = Seat.Steer
  911. local TailSin = math.sin(tick() * (th == 1 and 0.5 + Speed / MaxSpeed * 6 or 2))
  912. local BreathSin = math.sin(tick() * 2)--(((th == 1 and (Speed > WalkSpeed or not WalkSin / 2) and (Speed > TrotSpeed or not TrotSin / 2) and GallopSin / 2)) or 2))
  913. TailWeld.C0 = clerp(TailWeld.C0, TailWeld0 * CFrame.Angles(math.rad((th == 1 and 20 + math.min(1, Speed / MaxSpeed) * (-50 + TailSin * 10)) or (th == -1 and 25) or 20), 0, TailSin * 0.3), 0.15)
  914. local d, un = 10, nil
  915. if th == 0 and st == 0 then
  916. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  917. do
  918. pcall(function()
  919.  
  920. local dis = v:DistanceFromCharacter(Head.Position)
  921. if dis < d then
  922. local u = Main.CFrame:vectorToObjectSpace((v.Character.Head.Position - Head.Position).unit)
  923. if u.Z < 0 then
  924. d = dis
  925. end
  926. end
  927. end
  928. )
  929. end
  930. end
  931. end
  932. if math.random(1, 150) == 1 then
  933. blinktimer = 4
  934. end
  935. if blinktimer > 0 then
  936. EyeR.BrickColor = HorseColor
  937. EyeL.BrickColor = HorseColor
  938. blinktimer = blinktimer - 1
  939. else
  940. EyeR.BrickColor = EyeColor
  941. EyeL.BrickColor = EyeColor
  942. end
  943. NeckWeld.C0 = clerp(NeckWeld.C0, CFrame.Angles(0, -st * 0.1 - (un and math.sin(un.X) / 2 or 0), -st * 0.1) * NeckWeld0 * CFrame.Angles(math.rad(BreathSin * 2 + ((th == 1 and -math.min(1, math.max(0, Speed - 10) / (MaxSpeed - 10)) * 45) or (th == -1 and 10) or 0)) + (un and math.sin(un.Y) / 2 or 0), 0, 0), 0.15)
  944. HeadWeld.C0 = clerp(HeadWeld.C0, CFrame.Angles(0, -st * 0.3 - (un and math.sin(un.X) / 2 or 0), -st * 0.1) * HeadWeld0 * CFrame.Angles(math.rad(BreathSin * -4 + ((th == 1 and 10) or (th == -1 and -30) or 0)) + (un and math.sin(un.Y) / 2 or 0), 0, 0), 0.15)
  945. MainMesh.Scale = Vector3.new(1, 1 + BreathSin * 0.025, 1)
  946. SeatWeld.C0 = SeatWeld0 + Vector3.new(0, BreathSin * 0.05, 0)
  947. bgcf = bgcf * CFrame.Angles(0, -st * 0.05, 0)
  948. BG.cframe = clerp(bgcf, bgcf * CFrame.Angles(0, 0, th == 1 and -st * (0.1 + Speed / MaxSpeed * 0.1) or 0), 0.1) * CFrame.Angles(climbangle, 0, -st * 0.25 * (Speed / MaxSpeed))
  949. Speed = math.max((th == -1 and -WalkSpeed) or (th == 1 and math.min(SpeedLimit, 10)) or 0, math.min(SpeedLimit, Speed + (th == 1 and 0.25 or -3)))
  950. if --[[not updown]] 5 == 5 then
  951. updown = math.max(0, (th == 1 and TrotSpeed < Speed and math.abs(math.sin((tick() - 0.1) * 3)) or 0) - 0.1)
  952. local front = Main.CFrame * CFrame.new(0, 0, -3)
  953. local back = Main.CFrame * CFrame.new(0, 0, 3)
  954. local fHit, fP = RayCast(Ray.new(front.p, front:vectorToWorldSpace(Vector3.new(0, -Height * 6, 0))), {Model})
  955. local fDiff = (front.p - fP).magnitude
  956. if Height * 2 < fDiff then
  957. fHit = nil
  958. end
  959. local fY = math.max(fP.Y, front.Y - Height)
  960. local bHit, bP = RayCast(Ray.new(back.p, back:vectorToWorldSpace(Vector3.new(0, -Height * 6, 0))), {Model})
  961. local bDiff = (back.p - bP).magnitude
  962. if Height * 2 < bDiff then
  963. bHit = nil
  964. end
  965. local bY = math.max(bP.Y, back.Y - Height)
  966. local diffY = (fY + bY) / 2 - (Main.Position.Y - Height)
  967. if --[[not fHit or not bHit or not math.asin((fP - bP).unit.Y)]] 2 == 2 then
  968. climbangle = climbangle * 0.5
  969. bvvel = (Main.CFrame.lookVector).unit * Speed
  970. BV.velocity = (fP - bP).unit * Speed + Vector3.new(0, -(math.min(fDiff - Height, bDiff - Height) + updown * 0.8) * 3, 0)
  971. BV.maxForce = Vector3.new(1, 1, 1) * 4000000
  972. BBW.C0 = BBW0 + Vector3.new(0, updown * 0.8, -1.4)
  973. FBW.C0 = FBW0 + Vector3.new(0, updown * 0.8, 1.4)
  974. for i = 1, #Legs, 3 do
  975. local ang = 0
  976. local ang2 = 0
  977. local ang3 = 0
  978. local time = tick()
  979. if i < #Legs / 2 then
  980. if i % 6 == 1 then
  981. if th == 1 then
  982. if Speed <= WalkSpeed then
  983. ang = math.sin(time * WalkSin) * 0.15 + 0.05
  984. ang2 = -math.abs(math.cos(time * WalkSin / 2)) * 0.4
  985. elseif Speed <= TrotSpeed then
  986. ang = math.sin(time * TrotSin) * 0.5 + 0.4
  987. ang2 = -math.abs(math.cos(time * TrotSin / 2)) * 1.7
  988. else
  989. ang = math.sin(time * 6) * 0.8 + 0.35
  990. ang2 = -math.abs(math.cos(time * 3)) * 1.8
  991. end
  992. elseif th == -1 then
  993. ang = math.sin(time * 6) * 0.3 + 0.25
  994. time = time - 0.1
  995. ang2 = -math.abs(math.sin((time) * 3)) * 1.3 + 0.2
  996. else
  997. ang = math.sin(tick() * 2) * 0.5 + 0.5
  998. ang2 = -math.abs(math.cos(tick() * 1)) * 1.5
  999. ang3 = ang2
  1000. end
  1001. else
  1002. if th == 1 then
  1003. if Speed <= WalkSpeed then
  1004. time = time + math.pi / WalkSin
  1005. ang = math.sin((time) * WalkSin) * 0.15 + 0.05
  1006. ang2 = -math.abs(math.cos((time) * WalkSin / 2)) * 0.4
  1007. elseif Speed <= TrotSpeed then
  1008. time = time + math.pi / TrotSin
  1009. ang = math.sin((time) * TrotSin) * 0.5 + 0.4
  1010. ang2 = -math.abs(math.cos((time) * TrotSin / 2)) * 1.7
  1011. else
  1012. time = time + 0.15
  1013. ang = math.sin((time) * 6) * 0.8 + 0.35
  1014. ang2 = -math.abs(math.cos((time) * 3)) * 1.8
  1015. end
  1016. elseif th == -1 then
  1017. time = time + math.pi / 2
  1018. ang = math.sin((time) * 6) * 0.3 + 0.25
  1019. time = time - 0.1
  1020. ang2 = -math.abs(math.sin((time) * 3)) * 1.3 + 0.2
  1021. end
  1022. end
  1023. elseif i % 6 == 1 then
  1024. if th == 1 then
  1025. if Speed <= WalkSpeed then
  1026. ang = math.sin((time) * WalkSin) * 0.1 - 0.6
  1027. ang2 = math.abs(math.cos((time) * WalkSin / 2)) * 0.5 + 0.4
  1028. elseif Speed <= TrotSpeed then
  1029. ang = math.sin((time) * TrotSin) * 0.5 - 0.8
  1030. ang2 = math.abs(math.cos((time) * TrotSin / 2)) * 1.4 - 0.1
  1031. ang3 = ang2 - 1
  1032. else
  1033. time = time + math.pi / 2
  1034. ang = math.sin((time) * 6) * 0.5 - 0.8
  1035. ang2 = math.abs(math.cos((time) * 3)) * 1.4 - 0.1
  1036. ang3 = ang2 - 1
  1037. end
  1038. elseif th == -1 then
  1039. ang = math.sin((time) * 6) * 0.2 - 0.6
  1040. time = time - 0.5
  1041. ang2 = math.abs(math.cos((time) * 3)) * 1.4 - 0.1
  1042. ang3 = math.sin((time) * 6) * 0.2
  1043. else
  1044. ang = -0.5
  1045. ang2 = 0.65
  1046. ang3 = -0.15
  1047. end
  1048. else
  1049. if th == 1 then
  1050. if Speed <= WalkSpeed then
  1051. time = time + math.pi / WalkSin
  1052. ang = math.sin((time) * WalkSin) * 0.1 - 0.7
  1053. ang2 = math.abs(math.cos((time) * WalkSin / 2)) * 0.5 + 0.4
  1054. elseif Speed <= TrotSpeed then
  1055. time = time - math.pi / TrotSin
  1056. ang = math.sin((time) * TrotSin) * 0.5 - 0.8
  1057. ang2 = math.abs(math.cos((time) * TrotSin / 2)) * 1.4 - 0.1
  1058. ang3 = ang2 - 1
  1059. else
  1060. time = time + math.pi / 2 - 0.15
  1061. ang = math.sin((time) * 6) * 0.5 - 0.8
  1062. ang2 = math.abs(math.cos((time) * 3)) * 1.4 - 0.1
  1063. ang3 = ang2 - 1
  1064. end
  1065. elseif th == -1 then
  1066. time = time + math.pi / 2
  1067. ang = math.sin((time) * 6) * 0.2 - 0.6
  1068. time = time - 0.5
  1069. ang2 = math.abs(math.cos((time) * 3)) * 1.4 - 0.1
  1070. ang3 = math.sin((time) * 6) * 0.2
  1071. else
  1072. ang = -0.55
  1073. ang2 = 0.65
  1074. ang3 = -0.1
  1075. end
  1076. end
  1077. Legs[i].C0 = clerp(Legs[i].C0, Legs0[i] * CFrame.Angles(ang, 0, 0), 0.2)
  1078. Legs[i + 1].C0 = clerp(Legs[i + 1].C0, Legs0[i + 1] * CFrame.Angles(ang2, 0, 0), 0.2)
  1079. Legs[i + 2].C0 = clerp(Legs[i + 2].C0, Legs0[i + 2] * CFrame.Angles(ang3, 0, 0), 0.2)
  1080. end
  1081. if ReinLineM and ReinLineM.Part1 and ReinLineM.Part1.Transparency < 1 then
  1082. if not ReinsHold then
  1083. local rHold = CFrame.new(0, 3.5, -2)
  1084. ReinSphereL.C0 = rHold * CFrame.new(-1.8, 0, 0) + Vector3.new(0, BreathSin * 0.05, 0)
  1085. ReinSphereR.C0 = rHold * CFrame.new(1.8, 0, 0) + Vector3.new(0, BreathSin * 0.05, 0)
  1086. local lp1 = Main.CFrame:pointToObjectSpace(ReinAnchorL.Position) + Vector3.new(-0.05, 0, 0)
  1087. local lp2 = ReinSphereL.C0.p
  1088. ReinLineL.C0 = CFrame.new(lp1:Lerp(lp2, 0.5), lp2) * CFrame.Angles(0, math.pi / 2, 0)
  1089. ReinLineL.Part1.Mesh.Scale = Vector3.new((lp2 - lp1).magnitude / ReinLineL.Part1.Size.X, 1, 1)
  1090. local rp1 = Main.CFrame:pointToObjectSpace(ReinAnchorR.Position) + Vector3.new(0.05, 0, 0)
  1091. local rp2 = ReinSphereR.C0.p
  1092. ReinLineR.C0 = CFrame.new(rp1:Lerp(rp2, 0.5), rp2) * CFrame.Angles(0, math.pi / 2, 0)
  1093. ReinLineR.Part1.Mesh.Scale = Vector3.new((rp2 - rp1).magnitude / ReinLineR.Part1.Size.X, 1, 1)
  1094. ReinLineM.C0 = CFrame.new(lp2:Lerp(rp2, 0.5), rp2) * CFrame.Angles(0, math.pi / 2, 0)
  1095. ReinLineM.Part1.Mesh.Scale = Vector3.new((rp2 - lp2).magnitude / ReinLineM.Part1.Size.X, 1, 1)
  1096. end
  1097. end
  1098. for i,v in pairs(BackHairs) do
  1099. v.w.C0 = v.c0 * CFrame.Angles(math.sin(BreathSin + i) * 0.05, math.sin(BreathSin + i ^ 2) * 0.05, math.sin(BreathSin + i ^ 3) * 0.05) + Vector3.new(0, BreathSin * 0.05, 0)
  1100. end
  1101. end
  1102. end
  1103. end
  1104. ))
  1105. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement