sIendytubble

circus baby scooper (SUGGESTED)

Jun 29th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.39 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,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  51. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then
  95. return typeof(s[k])=="function"
  96. and function(_,...)return s[k](s,...)end or s[k]
  97. end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return rawget(self,s) or _rg:GetService(s)
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. RunService = FakeService({
  120. _btrs = {},
  121. RenderStepped = _rg:GetService("RunService").Heartbeat,
  122. BindToRenderStep = function(self,name,_,fun)
  123. self._btrs[name] = self.Heartbeat:Connect(fun)
  124. end,
  125. UnbindFromRenderStep = function(self,name)
  126. self._btrs[name]:Disconnect()
  127. end,
  128. },"RunService")
  129. }
  130. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  131. g.service = g.GetService
  132. FakeService(g,game)
  133. --Changing owner to fake player object to support owner:GetMouse()
  134. game,owner = g,g.Players.LocalPlayer
  135. end
  136. player = game.Players.LocalPlayer
  137. char = player.Character
  138. mas = char.Torso
  139. Model0 = Instance.new("Model")
  140. Part1 = Instance.new("Part")
  141. Part2 = Instance.new("Part")
  142. Weld3 = Instance.new("Weld")
  143. CFrameValue4 = Instance.new("CFrameValue")
  144. Part5 = Instance.new("Part")
  145. Weld6 = Instance.new("Weld")
  146. CFrameValue7 = Instance.new("CFrameValue")
  147. Part8 = Instance.new("Part")
  148. Weld9 = Instance.new("Weld")
  149. CFrameValue10 = Instance.new("CFrameValue")
  150. Part11 = Instance.new("Part")
  151. Weld12 = Instance.new("Weld")
  152. CFrameValue13 = Instance.new("CFrameValue")
  153. Part14 = Instance.new("Part")
  154. Weld15 = Instance.new("Weld")
  155. CFrameValue16 = Instance.new("CFrameValue")
  156. Part17 = Instance.new("Part")
  157. Weld18 = Instance.new("Weld")
  158. CFrameValue19 = Instance.new("CFrameValue")
  159. Model0.Name = "scooper"
  160. Model0.Parent = mas
  161. Part1.Parent = Model0
  162. Part1.CFrame = CFrame.new(-28.9927673, 2.19209909, 5.91230297, 0.999999702, 4.94616907e-05, -0.000781218871, -6.83548496e-05, 0.999707043, -0.0242027212, 0.000779792899, 0.0242027678, 0.999706745)
  163. Part1.Orientation = Vector3.new(1.38999999, -0.0399999991, 0)
  164. Part1.Position = Vector3.new(-28.9927673, 2.19209909, 5.91230297)
  165. Part1.Rotation = Vector3.new(1.38999999, -0.0399999991, 0)
  166. Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  167. Part1.Size = Vector3.new(0.5, 0.5, 1.25)
  168. Part1.BottomSurface = Enum.SurfaceType.Smooth
  169. Part1.BrickColor = BrickColor.new("Dark stone grey")
  170. Part1.TopSurface = Enum.SurfaceType.Smooth
  171. Part1.brickColor = BrickColor.new("Dark stone grey")
  172. Part2.Parent = Model0
  173. Part2.CFrame = CFrame.new(-28.9918785, 1.86806905, 4.74309731, 0.999999702, 0.000313671189, -0.000717188814, -6.83548496e-05, 0.947695255, 0.319176555, 0.000779792899, -0.319176465, 0.947695017)
  174. Part2.Orientation = Vector3.new(-18.6100006, -0.0399999991, 0)
  175. Part2.Position = Vector3.new(-28.9918785, 1.86806905, 4.74309731)
  176. Part2.Rotation = Vector3.new(-18.6100006, -0.0399999991, -0.0199999996)
  177. Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
  178. Part2.Size = Vector3.new(0.5, 0.5, 1.45000017)
  179. Part2.BottomSurface = Enum.SurfaceType.Smooth
  180. Part2.BrickColor = BrickColor.new("Dark stone grey")
  181. Part2.TopSurface = Enum.SurfaceType.Smooth
  182. Part2.brickColor = BrickColor.new("Dark stone grey")
  183. Weld3.Name = "qCFrameWeldThingy"
  184. Weld3.Parent = Part2
  185. Weld3.C1 = CFrame.new(0, -0.0661015511, 1.21147394, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736)
  186. Weld3.Part0 = Part1
  187. Weld3.Part1 = Part2
  188. Weld3.part1 = Part2
  189. CFrameValue4.Name = "qRelativeCFrameWeldValue"
  190. CFrameValue4.Parent = Part2
  191. CFrameValue4.Value = CFrame.new(0, -0.0661015511, 1.21147394, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736)
  192. Part5.Parent = Model0
  193. Part5.CFrame = CFrame.new(-28.9912262, 1.62797928, 3.88532567, 0.999999702, 4.94617125e-05, -0.000781218871, -6.83548496e-05, 0.999707043, -0.024202751, 0.000779792899, 0.024202738, 0.999706745)
  194. Part5.Orientation = Vector3.new(1.38999999, -0.0399999991, 0)
  195. Part5.Position = Vector3.new(-28.9912262, 1.62797928, 3.88532567)
  196. Part5.Rotation = Vector3.new(1.38999999, -0.0399999991, 0)
  197. Part5.Color = Color3.new(0.388235, 0.372549, 0.384314)
  198. Part5.Size = Vector3.new(0.5, 0.5, 0.550000131)
  199. Part5.BottomSurface = Enum.SurfaceType.Smooth
  200. Part5.BrickColor = BrickColor.new("Dark stone grey")
  201. Part5.TopSurface = Enum.SurfaceType.Smooth
  202. Part5.brickColor = BrickColor.new("Dark stone grey")
  203. Weld6.Name = "qCFrameWeldThingy"
  204. Weld6.Parent = Part5
  205. Weld6.C1 = CFrame.new(0, 0.613013029, 2.01273108, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1)
  206. Weld6.Part0 = Part1
  207. Weld6.Part1 = Part5
  208. Weld6.part1 = Part5
  209. CFrameValue7.Name = "qRelativeCFrameWeldValue"
  210. CFrameValue7.Parent = Part5
  211. CFrameValue7.Value = CFrame.new(0, 0.613013029, 2.01273108, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1)
  212. Part8.Parent = Model0
  213. Part8.CFrame = CFrame.new(-28.9918423, 2.57232952, 4.76014853, 0.999999702, -0.000220713613, -0.000751022599, -6.83548496e-05, 0.931139588, -0.364662826, 0.000779792899, 0.364662766, 0.93113935)
  214. Part8.Orientation = Vector3.new(21.3899994, -0.0500000007, 0)
  215. Part8.Position = Vector3.new(-28.9918423, 2.57232952, 4.76014853)
  216. Part8.Rotation = Vector3.new(21.3899994, -0.0399999991, 0.00999999978)
  217. Part8.Color = Color3.new(0.388235, 0.372549, 0.384314)
  218. Part8.Size = Vector3.new(0.5, 0.5, 1.44999981)
  219. Part8.BottomSurface = Enum.SurfaceType.Smooth
  220. Part8.BrickColor = BrickColor.new("Dark stone grey")
  221. Part8.TopSurface = Enum.SurfaceType.Smooth
  222. Part8.brickColor = BrickColor.new("Dark stone grey")
  223. Weld9.Name = "qCFrameWeldThingy"
  224. Weld9.Parent = Part8
  225. Weld9.C1 = CFrame.new(0, 0.066100359, 1.21147299, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736)
  226. Weld9.Part0 = Part1
  227. Weld9.Part1 = Part8
  228. Weld9.part1 = Part8
  229. CFrameValue10.Name = "qRelativeCFrameWeldValue"
  230. CFrameValue10.Parent = Part8
  231. CFrameValue10.Value = CFrame.new(0, 0.066100359, 1.21147299, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736)
  232. Part11.Parent = Model0
  233. Part11.CFrame = CFrame.new(-28.9911652, 2.82762766, 3.91436911, 0.999999702, 4.94616907e-05, -0.000781218871, -6.83548496e-05, 0.999707043, -0.0242027212, 0.000779792899, 0.0242027678, 0.999706745)
  234. Part11.Orientation = Vector3.new(1.38999999, -0.0399999991, 0)
  235. Part11.Position = Vector3.new(-28.9911652, 2.82762766, 3.91436911)
  236. Part11.Rotation = Vector3.new(1.38999999, -0.0399999991, 0)
  237. Part11.Color = Color3.new(0.388235, 0.372549, 0.384314)
  238. Part11.Size = Vector3.new(0.5, 0.5, 0.550000131)
  239. Part11.BottomSurface = Enum.SurfaceType.Smooth
  240. Part11.BrickColor = BrickColor.new("Dark stone grey")
  241. Part11.TopSurface = Enum.SurfaceType.Smooth
  242. Part11.brickColor = BrickColor.new("Dark stone grey")
  243. Weld12.Name = "qCFrameWeldThingy"
  244. Weld12.Parent = Part11
  245. Weld12.C1 = CFrame.new(0, -0.586986959, 2.01273108, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  246. Weld12.Part0 = Part1
  247. Weld12.Part1 = Part11
  248. Weld12.part1 = Part11
  249. CFrameValue13.Name = "qRelativeCFrameWeldValue"
  250. CFrameValue13.Parent = Part11
  251. CFrameValue13.Value = CFrame.new(0, -0.586986959, 2.01273108, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  252. Part14.Name = "torso"
  253. Part14.Parent = Model0
  254. Part14.CFrame = CFrame.new(-28.9932442, 2.42689896, 6.54316998, 0.999999702, 4.94616907e-05, -0.000781218871, -6.83548496e-05, 0.999707043, -0.0242027212, 0.000779792899, 0.0242027678, 0.999706745)
  255. Part14.Orientation = Vector3.new(1.38999999, -0.0399999991, 0)
  256. Part14.Position = Vector3.new(-28.9932442, 2.42689896, 6.54316998)
  257. Part14.Rotation = Vector3.new(1.38999999, -0.0399999991, 0)
  258. Part14.Transparency = 1
  259. Part14.Size = Vector3.new(2, 2, 1)
  260. Part14.BottomSurface = Enum.SurfaceType.Smooth
  261. Part14.TopSurface = Enum.SurfaceType.Smooth
  262. Weld15.Name = "qCFrameWeldThingy"
  263. Weld15.Parent = Part14
  264. Weld15.C1 = CFrame.new(0, -0.249999821, -0.624999523, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  265. Weld15.Part0 = Part1
  266. Weld15.Part1 = Part14
  267. Weld15.part1 = Part14
  268. CFrameValue16.Name = "qRelativeCFrameWeldValue"
  269. CFrameValue16.Parent = Part14
  270. CFrameValue16.Value = CFrame.new(0, -0.249999821, -0.624999523, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  271. Part17.Name = "norso"
  272. Part17.Parent = Model0
  273. Part17.CFrame = CFrame.new(-28.9911556, 2.22901344, 3.84986162, 0.999999702, 4.94616907e-05, -0.000781218871, -6.83548496e-05, 0.999707043, -0.0242027212, 0.000779792899, 0.0242027678, 0.999706745)
  274. Part17.Orientation = Vector3.new(1.38999999, -0.0399999991, 0)
  275. Part17.Position = Vector3.new(-28.9911556, 2.22901344, 3.84986162)
  276. Part17.Rotation = Vector3.new(1.38999999, -0.0399999991, 0)
  277. Part17.Color = Color3.new(0.388235, 0.372549, 0.384314)
  278. Part17.Transparency = 1
  279. Part17.Size = Vector3.new(0.5, 1.70000029, 0.650000155)
  280. Part17.BottomSurface = Enum.SurfaceType.Smooth
  281. Part17.BrickColor = BrickColor.new("Dark stone grey")
  282. Part17.CanCollide = false
  283. Part17.TopSurface = Enum.SurfaceType.Smooth
  284. Part17.brickColor = BrickColor.new("Dark stone grey")
  285. Weld18.Name = "qCFrameWeldThingy"
  286. Weld18.Parent = Part17
  287. Weld18.C1 = CFrame.new(0, 0.0130130649, 2.06273127, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  288. Weld18.Part0 = Part1
  289. Weld18.Part1 = Part17
  290. Weld18.part1 = Part17
  291. CFrameValue19.Name = "qRelativeCFrameWeldValue"
  292. CFrameValue19.Parent = Part17
  293. CFrameValue19.Value = CFrame.new(0, 0.0130130649, 2.06273127, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  294. weldpart = Part14
  295. hitpart = Part17
  296. weldpartweld = Instance.new("Weld",weldpart)
  297. weldpartweld.Part0 = char.Torso
  298. weldpartweld.Part1 = weldpart
  299. weldpart.CanCollide = false
  300. scooper = Model0
  301. function scoop(charx)
  302. charx:FindFirstChildOfClass("Humanoid").PlatformStand = true
  303. for i,v in pairs(charx:GetDescendants()) do
  304. if v.ClassName == "Decal" or v.ClassName == "Texture" then
  305. v:Destroy()
  306. end
  307. end
  308. for i,v in pairs(charx:GetDescendants()) do
  309. if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  310. if v.Name ~= "Torso" and v.Name ~= "Head" and v.Name ~= "HumanoidRootPart" and v.Name ~= "UpperTorso" then
  311. v:Destroy()
  312. end
  313. end
  314. end
  315. for i,v in pairs(charx:GetDescendants()) do
  316. if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  317. v.Size = Vector3.new(0,0,0)
  318. v.Transparency = 1
  319. v.Anchored = false
  320. v.CFrame = mas.CFrame
  321. v.Massless = true
  322. local cf = mas.CFrame
  323. vweld = Instance.new("Weld",v)
  324. vweld.Part0 = mas
  325. vweld.Part1 = v
  326. --mas.CFrame = cf
  327. end
  328. end
  329. end
  330. hitpart.Touched:Connect(function(part)
  331. if scooping == true then
  332. if part.Parent:FindFirstChildOfClass("Humanoid") then
  333. wait(1)
  334. scoop(part.Parent)
  335. end
  336. end
  337. end)
  338. for i,v in pairs(scooper:GetChildren()) do
  339. v.Transparency = 1
  340. v.CanCollide = false
  341. v.Massless = true
  342. end
  343. mouse = player:GetMouse()
  344. scooping = false
  345. mouse.Button1Down:Connect(function()
  346. if scooping == false then
  347. scooping = true
  348. for i,v in pairs(scooper:GetChildren()) do
  349. if v ~= weldpart and v ~= hitpart then
  350. v.Transparency = 0
  351. v.CanCollide = true
  352. end
  353. end
  354. wait(1)
  355. for i,v in pairs(scooper:GetChildren()) do
  356. v.Transparency = 1
  357. v.CanCollide = false
  358. end
  359. scooping = false
  360. end
  361. end)
Add Comment
Please, Sign In to add comment