Hex4rr

Shoulder Pet Script (WIP NO FLING YET)

Aug 24th, 2020 (edited)
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.83 KB | None | 0 0
  1. -- recommended hats (ONLY PICK ONE):
  2.  
  3. -- https://web.roblox.com/catalog/106708450/Turtle-Shoulder-Friend
  4. -- https://web.roblox.com/catalog/4771505639/Pet-Rock
  5. -- vv BEST vv
  6. -- https://web.roblox.com/catalog/5548677744/Moon-Leech
  7. -- https://web.roblox.com/catalog/939236594/M3G4-Bot
  8.  
  9. -- CONTROLS
  10.  
  11. -- Z (on head idle)
  12. -- X (follow idle)
  13. -- C (on sholder idle)
  14. -- V (carry player)
  15. -- B (back of head idle)
  16. -- F (attack)
  17.  
  18. -- PET SCRIPT
  19.  
  20. -- NOT DONE
  21.  
  22. -- WILL ADD FLING LATER
  23.  
  24. -- E N J O Y
  25.  
  26. local value = Instance.new("NumberValue")
  27. for _,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  28. if (v:IsA("Accessory")) then
  29. value.Value = value.Value +1
  30. end
  31. end
  32. wait()
  33. print(value.Value)
  34. wait()
  35. if value.Value == 2 then
  36. game.Players.LocalPlayer.Character.Head:Destroy()
  37. spawn(function()
  38. local message = Instance.new("Message",workspace)
  39. message.Text = "ERROR"
  40. wait(1)
  41. message:Destroy()
  42. end)
  43. wait(1)
  44. spawn(function()
  45. local message = Instance.new("Message",workspace)
  46. message.Text = "PLEASE USE ONE HAT. (value.Value surpassed 1) .. HAT AMMOUNT: " .. value.Value
  47. wait(4)
  48. message:Destroy()
  49. end)
  50. end
  51.  
  52. if value.Value == 3 then
  53. game.Players.LocalPlayer.Character.Head:Destroy()
  54. spawn(function()
  55. local message = Instance.new("Message",workspace)
  56. message.Text = "ERROR"
  57. wait(1)
  58. message:Destroy()
  59. end)
  60. wait(1)
  61. spawn(function()
  62. local message = Instance.new("Message",workspace)
  63. message.Text = "PLEASE USE ONE HAT. (value.Value surpassed 1) .. HAT AMMOUNT: " .. value.Value
  64. wait(4)
  65. message:Destroy()
  66. end)
  67. end
  68.  
  69. if value.Value == 4 then
  70. game.Players.LocalPlayer.Character.Head:Destroy()
  71. spawn(function()
  72. local message = Instance.new("Message",workspace)
  73. message.Text = "ERROR"
  74. wait(1)
  75. message:Destroy()
  76. end)
  77. wait(1)
  78. spawn(function()
  79. local message = Instance.new("Message",workspace)
  80. message.Text = "PLEASE USE ONE HAT. (value.Value surpassed 1) .. HAT AMMOUNT: " .. value.Value
  81. wait(4)
  82. message:Destroy()
  83. end)
  84. end
  85.  
  86. if value.Value == 5 then
  87. game.Players.LocalPlayer.Character.Head:Destroy()
  88. spawn(function()
  89. local message = Instance.new("Message",workspace)
  90. message.Text = "ERROR"
  91. wait(1)
  92. message:Destroy()
  93. end)
  94. wait(1)
  95. spawn(function()
  96. local message = Instance.new("Message",workspace)
  97. message.Text = "PLEASE USE ONE HAT. (value.Value surpassed 1) .. HAT AMMOUNT: " .. value.Value
  98. wait(4)
  99. message:Destroy()
  100. end)
  101. end
  102.  
  103. if value.Value == 6 then
  104. game.Players.LocalPlayer.Character.Head:Destroy()
  105. spawn(function()
  106. local message = Instance.new("Message",workspace)
  107. message.Text = "ERROR"
  108. wait(1)
  109. message:Destroy()
  110. end)
  111. wait(1)
  112. spawn(function()
  113. local message = Instance.new("Message",workspace)
  114. message.Text = "PLEASE USE ONE HAT. (value.Value surpassed 1) .. HAT AMMOUNT: " .. value.Value
  115. wait(4)
  116. message:Destroy()
  117. end)
  118. end
  119.  
  120. if value.Value == 7 then
  121. game.Players.LocalPlayer.Character.Head:Destroy()
  122. spawn(function()
  123. local message = Instance.new("Message",workspace)
  124. message.Text = "ERROR"
  125. wait(1)
  126. message:Destroy()
  127. end)
  128. wait(1)
  129. spawn(function()
  130. local message = Instance.new("Message",workspace)
  131. message.Text = "PLEASE USE ONE HAT. (value.Value surpassed 1) .. HAT AMMOUNT: " .. value.Value
  132. wait(4)
  133. message:Destroy()
  134. end)
  135. end
  136.  
  137. if value.Value == 8 then
  138. game.Players.LocalPlayer.Character.Head:Destroy()
  139. spawn(function()
  140. local message = Instance.new("Message",workspace)
  141. message.Text = "ERROR"
  142. wait(1)
  143. message:Destroy()
  144. end)
  145. wait(1)
  146. spawn(function()
  147. local message = Instance.new("Message",workspace)
  148. message.Text = "PLEASE USE ONE HAT. (value.Value surpassed 1) .. HAT AMMOUNT: " .. value.Value
  149. wait(4)
  150. message:Destroy()
  151. end)
  152. end
  153.  
  154. if value.Value == 9 then
  155. game.Players.LocalPlayer.Character.Head:Destroy()
  156. spawn(function()
  157. local message = Instance.new("Message",workspace)
  158. message.Text = "ERROR"
  159. wait(1)
  160. message:Destroy()
  161. end)
  162. wait(1)
  163. spawn(function()
  164. local message = Instance.new("Message",workspace)
  165. message.Text = "PLEASE USE ONE HAT. (value.Value surpassed 1) .. HAT AMMOUNT: " .. value.Value
  166. wait(4)
  167. message:Destroy()
  168. end)
  169. end
  170.  
  171. if value.Value == 10 then
  172. game.Players.LocalPlayer.Character.Head:Destroy()
  173. spawn(function()
  174. local message = Instance.new("Message",workspace)
  175. message.Text = "ERROR"
  176. wait(1)
  177. message:Destroy()
  178. end)
  179. wait(1)
  180. spawn(function()
  181. local message = Instance.new("Message",workspace)
  182. message.Text = "PLEASE USE ONE HAT. (value.Value surpassed 1) .. HAT AMMOUNT: " .. value.Value
  183. wait(4)
  184. message:Destroy()
  185. end)
  186. end
  187.  
  188. local Xval = Instance.new("NumberValue")
  189. local Yval = Instance.new("NumberValue")
  190. local Zval = Instance.new("NumberValue")
  191.  
  192. local XvalO = Instance.new("NumberValue")
  193. local YvalO = Instance.new("NumberValue")
  194. local ZvalO = Instance.new("NumberValue")
  195.  
  196. local num3 = Instance.new("NumberValue")
  197. local ori = Instance.new("NumberValue")
  198. local an = Instance.new("NumberValue")
  199.  
  200. local angular = Vector3.new(0,0,0)
  201. ori.Value = 100
  202. num3.Value = 0
  203.  
  204. Xval.Value = 0
  205. Yval.Value = -4
  206. Zval.Value = 3
  207.  
  208. XvalO.Value = 0
  209. YvalO.Value = 0
  210. ZvalO.Value = 0
  211.  
  212. local plr = game.Players.LocalPlayer;
  213. plr.Character.Animate.idle.Animation2:Destroy()
  214. mouse = plr:GetMouse()
  215. mouse.KeyDown:connect(function(key)
  216.  
  217. if key == "z" then
  218. XvalO.Value = 0
  219. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  220. game.Players.LocalPlayer.Character.Animate.Disabled = false
  221. game.Players.LocalPlayer.Character.Humanoid.HipHeight = 0
  222. Xval.Value = 0
  223. Yval.Value = 1
  224. Zval.Value = 0
  225. end
  226. end)
  227.  
  228. mouse.KeyDown:connect(function(key)
  229.  
  230. if key == "x" then
  231. XvalO.Value = 0
  232. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  233. game.Players.LocalPlayer.Character.Animate.Disabled = false
  234. game.Players.LocalPlayer.Character.Humanoid.HipHeight = 0
  235. Xval.Value = 0
  236. Yval.Value = -4
  237. Zval.Value = 3
  238. end
  239. end)
  240.  
  241. mouse.KeyDown:connect(function(key)
  242.  
  243. if key == "v" then
  244. XvalO.Value = 0
  245. game.Players.LocalPlayer.Character.Animate.Disabled = true
  246. game.Players.LocalPlayer.Character.Humanoid.HipHeight = 0.4
  247. Xval.Value = 0
  248. Yval.Value = -4.8
  249. Zval.Value = 0
  250. wait()
  251. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 10
  252. end
  253. end)
  254.  
  255. mouse.KeyDown:connect(function(key)
  256.  
  257. if key == "c" then
  258. XvalO.Value = 0
  259. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  260. game.Players.LocalPlayer.Character.Animate.Disabled = false
  261. game.Players.LocalPlayer.Character.Humanoid.HipHeight = 0
  262. Xval.Value = -1.5
  263. Yval.Value = 0
  264. Zval.Value = 0
  265. end
  266. end)
  267.  
  268. mouse.KeyDown:connect(function(key)
  269.  
  270. if key == "b" then
  271. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  272. game.Players.LocalPlayer.Character.Animate.Disabled = false
  273. game.Players.LocalPlayer.Character.Humanoid.HipHeight = 0
  274. Xval.Value = 0
  275. Yval.Value = 0
  276. Zval.Value = 0.7
  277. XvalO.Value = 90
  278. end
  279. end)
  280.  
  281. local function cncltrue()
  282. for _, v in pairs(hum:GetAccessories()) do
  283. local b = v.Handle;
  284. b.CanCollide = true
  285. end
  286. end
  287.  
  288. local function cnclfalse()
  289. for _, v in pairs(hum:GetAccessories()) do
  290. local b = v.Handle;
  291. b.CanCollide = true
  292. end
  293. end
  294.  
  295. mouse.KeyDown:connect(function(key)
  296.  
  297. if key == "f" then
  298. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  299. game.Players.LocalPlayer.Character.Animate.Disabled = false
  300. game.Players.LocalPlayer.Character.Humanoid.HipHeight = 0
  301.  
  302. Xval.Value = 0
  303. Yval.Value = 0
  304. Zval.Value = -4
  305. wait()
  306. Zval.Value = -6.4
  307. Yval.Value = .5
  308. wait()
  309. Zval.Value = -8
  310. wait()
  311. Zval.Value = -6.4
  312. wait()
  313. Xval.Value = 0
  314. Yval.Value = 1
  315. Zval.Value = 0
  316.  
  317. for _, v in pairs(hum:GetAccessories()) do
  318. local b = v.Handle;
  319. b.CanCollide = false
  320. end
  321.  
  322. end
  323. end)
  324.  
  325. mouse.KeyDown:connect(function(key)
  326.  
  327. if key == "q" then
  328. XvalO.Value = 0
  329. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  330. game.Players.LocalPlayer.Character.Animate.Disabled = false
  331. game.Players.LocalPlayer.Character.Humanoid.HipHeight = 0
  332. Xval.Value = 0
  333. Yval.Value = -1.1
  334. Zval.Value = -1
  335. local Anim = Instance.new("Animation")
  336. Anim.AnimationId = "rbxassetid://161723112"
  337. local track = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(Anim)
  338. track:Play(10, 20, 2)
  339. wait(1.4)
  340. Xval.Value = 0
  341. Yval.Value = 1
  342. Zval.Value = 0
  343. end
  344. end)
  345.  
  346. local chr = plr.Character;
  347. local hum = chr.Humanoid;
  348. local mov = {};
  349. local mov2 = {};
  350.  
  351. --[[Network]]
  352. coroutine.resume(coroutine.create(function()
  353. settings().Physics.AllowSleep = false;
  354. game.RunService.RenderStepped:Connect(function()
  355. for i, v in pairs(game.Players:GetPlayers()) do
  356. if v ~= plr then
  357. v.MaximumSimulationRadius = 0.1;
  358. v.SimulationRadius = 0;
  359. else
  360. v.MaximumSimulationRadius = math.pow(math.huge, math.huge);
  361. v.SimulationRadius = math.pow(math.huge, 2);
  362. end
  363. end
  364. end)
  365. end))
  366.  
  367. for _, v in pairs(hum:GetAccessories()) do
  368. local b = v.Handle;
  369. b.CanCollide = false;
  370. b:BreakJoints();
  371. for _, k in pairs(v:GetChildren()) do
  372. if not k:IsA'SpecialMesh' and not k:IsA'Part' then
  373. k:Destroy();
  374. end
  375. end
  376. local still = Instance.new('BodyAngularVelocity', b);
  377. local align = Instance.new('AlignPosition', b);
  378. align.RigidityEnabled = true;
  379. local a0 = Instance.new('Attachment', b);
  380. local a1 = Instance.new('Attachment', chr.Head);
  381. align.Attachment0 = a0;
  382. align.Attachment1 = a1;
  383. table.insert(mov, a1);
  384. table.insert(mov2, still);
  385. end
  386.  
  387. local mode = 1;
  388. local l = 1;
  389. game['Run Service'].RenderStepped:Connect(function()
  390. if mode == 1 then
  391. for _, v in pairs(mov) do
  392. v.Position = Vector3.new(Xval.Value, Yval.Value, Zval.Value);
  393. end
  394. end
  395. end)
  396.  
  397. local function orie()
  398. while wait() do
  399. for _, v in pairs(hum:GetAccessories()) do
  400. local b = v.Handle;
  401. b.Orientation = Vector3.new(plr.Character.Head.Orientation.X + XvalO.Value, plr.Character.Head.Orientation.Y + YvalO.Value, plr.Character.Head.Orientation.Z + ZvalO.Value)
  402. end
  403. end
  404. end
  405.  
  406. for _, v in pairs(mov2) do
  407. v.AngularVelocity = angular;
  408. end
  409.  
  410. orie()
Add Comment
Please, Sign In to add comment