minecrafter206

laundrysimulator

May 11th, 2021 (edited)
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.73 KB | None | 0 0
  1.  
  2. while wait() do
  3.     --Auto Grab Clothes
  4.     for _,v in pairs(game:GetService("Workspace").Debris.Clothing:GetChildren()) do
  5.         game:GetService("ReplicatedStorage").Events.GrabClothing:FireServer(v)
  6.     end
  7.  
  8.     wait()
  9.  
  10.     --Auto Load
  11.     for _,v in pairs(game:GetService("Workspace").Plots:GetChildren()) do
  12.         local owner = v:FindFirstChild("Owner")
  13.  
  14.         if owner.Value == game:GetService("Players").LocalPlayer then
  15.             for k,l in pairs(game:GetService("Workspace").Plots[tostring(v)].WashingMachines:GetChildren()) do
  16.                 game:GetService("ReplicatedStorage").Events.LoadWashingMachine:FireServer(l)
  17.             end
  18.         end
  19.     end
  20.  
  21.     wait(15)
  22.  
  23.     --Auto Unload
  24.     for _,v in pairs(game:GetService("Workspace").Plots:GetChildren()) do
  25.         local owner = v:FindFirstChild("Owner")
  26.  
  27.         if owner.Value == game:GetService("Players").LocalPlayer then
  28.             for k,l in pairs(game:GetService("Workspace").Plots[tostring(v)].WashingMachines:GetChildren()) do
  29.                 game:GetService("ReplicatedStorage").Events.UnloadWashingMachine:FireServer(l)
  30.             end
  31.         end
  32.     end
  33.  
  34.     wait()
  35.  
  36.     --Auto Drop
  37.     game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-145, 4, -12)
  38.     wait(1)
  39.     game:GetService("ReplicatedStorage").Events.DropClothesInChute:FireServer()
  40.     wait(1)
  41.     for _,v in pairs(game:GetService("Workspace").Plots:GetChildren()) do
  42.         local owner = v:FindFirstChild("Owner")
  43.  
  44.         if owner.Value == game:GetService("Players").LocalPlayer then
  45.             game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v:FindFirstChild("Base").CFrame * CFrame.new(0, 10, 0)
  46.         end
  47.     end
  48.     wait(1)
  49. end
Add Comment
Please, Sign In to add comment