SHARE
TWEET

Do i like poop?

hhjfdgdfgdfg Jul 16th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --SynapseX Decompiler
  2.  
  3. wait(0.2)
  4. local player = game.Players.LocalPlayer
  5. local character = player.Character
  6. local humanoid = character:FindFirstChild("Humanoid")
  7. local repStorage = game.ReplicatedStorage
  8. local userInput = game:GetService("UserInputService")
  9. local inputManager = game.Players.LocalPlayer.PlayerScripts:WaitForChild("InputManager")
  10. local soundScape = game:GetService("SoundService")
  11. local debris = game:GetService("Debris")
  12. local mouse = player:GetMouse()
  13. local torso = character:FindFirstChild("HumanoidRootPart")
  14. local head = character:FindFirstChild("Head")
  15. local camera = require(game.ReplicatedStorage.CameraPlus)
  16. local cameraObj = game.Workspace.CurrentCamera
  17. local Raycast = require(repStorage.ModuleScripts.RaycastModule)
  18. local ra = Ray.new
  19. local kill = require(game.ReplicatedStorage:WaitForChild("ModuleScripts"):WaitForChild("KillPlayer"))
  20. local message = require(game.ReplicatedStorage.ModuleScripts.PlayerMessage)
  21. local pseats = require(game.ReplicatedStorage:WaitForChild("ModuleScripts"):WaitForChild("VehicleSeats"))
  22. local es = script:WaitForChild("exiting_seat")
  23. local translator = require(game.ReplicatedStorage:WaitForChild("ModuleScripts"):WaitForChild("Translate"))
  24. local platform_listener = require(game.ReplicatedStorage:WaitForChild("ModuleScripts"):WaitForChild("platform_listener"))
  25. local GetPrettyKeyCodeName_Function = player.PlayerScripts:WaitForChild("InputManager"):WaitForChild("GetPrettyKeyCodeName")
  26. local GetKeyImage_Function = player.PlayerScripts:WaitForChild("InputManager"):WaitForChild("GetKeyImage")
  27. game.Lighting.ColorCorrection.Saturation = 0
  28. if not player.PlayerGui:FindFirstChild("IntroGui") then
  29.     game.Lighting.Blur.Enabled = false
  30. end
  31. local vehicle
  32. local moneyPerMile = 1
  33. local sprint = script.Sprint
  34. local intWalkSpeed = 18
  35. humanoid.WalkSpeed = intWalkSpeed
  36. humanoid.JumpPower = 48
  37. local debounce = true
  38. local q = false
  39. local HatchOpen = false
  40. spawn(function()
  41.     if character and character:FindFirstChild("Humanoid") then
  42.         camera.CameraSubject = character.Humanoid
  43.         camera.CameraType = "Attach"
  44.         camera.CameraType = "Custom"
  45.     end
  46. end)
  47. characterIgnorelist = {
  48.     character,
  49.     game.Workspace.Weather
  50. }
  51. userInput.TextBoxFocused:connect(function()
  52.     isChatting = true
  53. end)
  54. userInput.TextBoxFocusReleased:connect(function()
  55.     isChatting = false
  56. end)
  57. humanoid.MaxSlopeAngle = 70
  58. inputManager:WaitForChild("InputBegan").Event:connect(function(key)
  59.     if not isChatting and key == "Interact" then
  60.         f = true
  61.     end
  62. end)
  63. inputManager:WaitForChild("InputEnded").Event:connect(function(key)
  64.     if not isChatting and key == "Interact" then
  65.         f = false
  66.     end
  67. end)
  68. local fallCounter = 0
  69. local parachuteDebounce = false
  70. local parachuting = script.Parachute
  71. spawn(function()
  72.     while character do
  73.         if humanoid then
  74.             local ignore = {
  75.                 character,
  76.                 workspace:WaitForChild("Vehicles"),
  77.                 workspace:WaitForChild("Weather"),
  78.                 workspace:WaitForChild("Parachutes")
  79.             }
  80.             local h, p = game.Workspace:FindPartOnRayWithIgnoreList(ra(head.Position, Vector3.new(0, -1, 0).unit * 20), ignore)
  81.             if h == nil and humanoid.Sit == false then
  82.                 fallCounter = fallCounter + 1
  83.                 if fallCounter > 5 then
  84.                     if player.PlayerGui:FindFirstChild("CharacterGui") and not parachuteDebounce then
  85.                         player.PlayerGui.CharacterGui.CharacterControls.Parachute.Visible = true
  86.                         player.PlayerGui.CharacterGui.CharacterGamepadControls.Parachute.Visible = true
  87.                     end
  88.                     if f and not parachuteDebounce then
  89.                         if player.PlayerGui:FindFirstChild("CharacterGui") then
  90.                             player.PlayerGui.CharacterGui.CharacterControls.Parachute.Visible = false
  91.                             player.PlayerGui.CharacterGui.CharacterGamepadControls.Parachute.Visible = false
  92.                         end
  93.                         parachuteDebounce = true
  94.                         if character.R15Ragdoll.Ragdoll.Value then
  95.                             character.R15Ragdoll.Ragdoll.Value = false
  96.                             repStorage.ActivateParachute:FireServer(character, true)
  97.                         else
  98.                             repStorage.ActivateParachute:FireServer(character, true)
  99.                         end
  100.                         wait()
  101.                         parachuting.Value = true
  102.                         wait(10)
  103.                         parachuteDebounce = false
  104.                         repeat
  105.                             wait(0.07)
  106.                         until humanoid.SeatPart == nil
  107.                         parachuting.Value = false
  108.                     end
  109.                 end
  110.             else
  111.                 fallCounter = 0
  112.                 if player.PlayerGui:FindFirstChild("CharacterGui") then
  113.                     player.PlayerGui.CharacterGui.CharacterControls.Parachute.Visible = false
  114.                     player.PlayerGui.CharacterGui.CharacterGamepadControls.Parachute.Visible = false
  115.                 end
  116.             end
  117.         end
  118.         wait(0.05)
  119.     end
  120. end)
  121. humanoid.Changed:connect(function(prop)
  122.     if prop == "Sit" then
  123.         local seat
  124.         if humanoid.SeatPart then
  125.             seat = humanoid.SeatPart
  126.         end
  127.         if humanoid.Sit == false then
  128.             repStorage.SeatDensity:FireServer(character, false)
  129.         else
  130.             repStorage.SeatDensity:FireServer(character, true)
  131.         end
  132.     end
  133. end)
  134. if character then
  135.     repStorage.HatDensity:FireServer(character)
  136. end
  137. mouse.Move:connect(function()
  138.     if mouse.Target then
  139.         local target = mouse.Target
  140.         if target:FindFirstChild("Grab") and not target:IsDescendantOf(character) and not target:FindFirstChild("Move") then
  141.             mouse.Icon = humanoid:GetState() == Enum.HumanoidStateType.Climbing and humanoid:GetState() == Enum.HumanoidStateType.Ragdoll and humanoid:GetState() == Enum.HumanoidStateType.Swimming or "rbxassetid://303323245"
  142.         else
  143.             mouse.Icon = ""
  144.         end
  145.     end
  146. end)
  147. local grabObj = script.GrabObject
  148. grabObj.Value = nil
  149. local cellDebounce = false
  150. mouse.Button1Down:connect(function()
  151.     if mouse.Target then
  152.         local target = mouse.Target
  153.         if target:FindFirstChild("Grab") and not target:IsDescendantOf(character) and not target:FindFirstChild("Move") and (humanoid:GetState() ~= Enum.HumanoidStateType.Climbing or humanoid:GetState() ~= Enum.HumanoidStateType.Ragdoll or humanoid:GetState() ~= Enum.HumanoidStateType.Swimming) and not target.Grab.Value then
  154.             local distance = (torso.Position - target.Position).magnitude
  155.             if distance <= 16 then
  156.                 grabObj.Value = target
  157.             end
  158.         end
  159.         if target.Name == "Kill" then
  160.             character.Head:FindFirstChild("Neck"):Destroy()
  161.             if target:FindFirstChild("FireNitro") then
  162.                 local fire = target.FireNitro:Clone()
  163.                 fire.Parent = character:FindFirstChild("Head")
  164.                 fire.Enabled = true
  165.             end
  166.         end
  167.         if target.Name == "Hose" then
  168.             local hose = grabObj.Value
  169.             if hose and hose.Parent ~= nil then
  170.                 local rope = hose.Parent.Nozzle:FindFirstChild("Hose")
  171.                 if rope then
  172.                     rope.Length = 16
  173.                     target.Water.Enabled = true
  174.                 end
  175.             end
  176.         end
  177.         if target.Name == "Button1" then
  178.             game.ReplicatedStorage.ElevatorEvents.ElevatorButton:FireServer("Button1")
  179.         elseif target.Name == "Button2" then
  180.             game.ReplicatedStorage.ElevatorEvents.ElevatorButton:ngeFireServer("Button2")
  181.         end
  182.         if target.Name == "CellDoor" and (target.Position - torso.Position).magnitude <= 16 and not cellDebounce then
  183.             cellDebounce = true
  184.             if target:FindFirstChild("Opened") then
  185.                 if target.Opened.Value then
  186.                     repStorage.CellDoor:FireServer(target, false, target.Opened)
  187.                 else
  188.                     repStorage.CellDoor:FireServer(target, true, target.Opened)
  189.                 end
  190.             end
  191.             wait(1)
  192.             cellDebounce = false
  193.         end
  194.     end
  195.     local tools = character:GetChildren()
  196.     for i = 1, #tools do
  197.         local tool = tools[i]
  198.         if tool:IsA("Tool") then
  199.             if tool:FindFirstChild("Donut") then
  200.                 local donut = tool.Name
  201.                 local animTrack = Instance.new("Animation")
  202.                 animTrack.AnimationId = "http://www.roblox.com/Asset?ID=869559978"
  203.                 local anim = humanoid:LoadAnimation(animTrack)
  204.                 anim.Priority = Enum.AnimationPriority.Movement
  205.                 anim:Play()
  206.                 local quan = repStorage.items.consume_item:InvokeServer(donut)
  207.                 repStorage.items.donut_consumed:FireServer()
  208.                 wait(1.6)
  209.                 if quan == 0 or quan == nil then
  210.                     tool:Destroy()
  211.                 end
  212.             end
  213.             if tool:FindFirstChild("Drink") then
  214.                 local drink = tool.Name
  215.                 local animTrack = Instance.new("Animation")
  216.                 animTrack.AnimationId = "http://www.roblox.com/Asset?ID=869559978"
  217.                 local anim = humanoid:LoadAnimation(animTrack)
  218.                 anim.Priority = Enum.AnimationPriority.Movement
  219.                 anim:Play()
  220.                 local quan = repStorage.items.consume_item:InvokeServer(drink)
  221.                 wait(1.6)
  222.                 if quan == 0 or quan == nil then
  223.                     tool:Destroy()
  224.                 end
  225.             end
  226.         end
  227.     end
  228. end)
  229. function ButtonPressed(name, bool)
  230.     if not player:FindFirstChild(name) then
  231.         local buttonobj = Instance.new("BoolValue")
  232.         buttonobj.Name = name
  233.         buttonobj.Value = bool
  234.         buttonobj.Parent = player
  235.     end
  236. end
  237. mouse.Button2Down:connect(function()
  238.     if mouse.Target then
  239.         local target = mouse.Target
  240.         if (target.Position - torso.Position).magnitude <= 30 then
  241.             if target.Name == "BlueButton" then
  242.                 ButtonPressed("BlueButton", true)
  243.                 target.BrickColor = BrickColor.Black()
  244.                 workspace.ExMundoPortal.Torches.BlueTorch.ParticleEmitter.Enabled = true
  245.                 workspace.ExMundoPortal.Torches.BlueTorch.PointLight.Enabled = true
  246.             elseif target.Name == "GreenButton" then
  247.                 ButtonPressed("GreenButton", true)
  248.                 target.BrickColor = BrickColor.Black()
  249.                 workspace.ExMundoPortal.Torches.GreenTorch.ParticleEmitter.Enabled = true
  250.                 workspace.ExMundoPortal.Torches.GreenTorch.PointLight.Enabled = true
  251.             elseif target.Name == "PurpleButton" then
  252.                 ButtonPressed("PurpleButton", true)
  253.                 target.BrickColor = BrickColor.Black()
  254.                 workspace.ExMundoPortal.Torches.PurpleTorch.ParticleEmitter.Enabled = true
  255.                 workspace.ExMundoPortal.Torches.PurpleTorch.PointLight.Enabled = true
  256.             elseif target.Name == "RedButton" then
  257.                 ButtonPressed("RedButton", true)
  258.                 target.BrickColor = BrickColor.Black()
  259.                 workspace.ExMundoPortal.Torches.RedTorch.ParticleEmitter.Enabled = true
  260.                 workspace.ExMundoPortal.Torches.RedTorch.PointLight.Enabled = true
  261.             elseif target.Name == "YellowButton" then
  262.                 ButtonPressed("YellowButton", true)
  263.                 target.BrickColor = BrickColor.Black()
  264.                 workspace.ExMundoPortal.Torches.YellowTorch.ParticleEmitter.Enabled = true
  265.                 workspace.ExMundoPortal.Torches.YellowTorch.PointLight.Enabled = true
  266.             elseif target.Name == "PlaceStaff" then
  267.                 workspace.ExMundoPortal.PlacedStaff.Transparency = 0
  268.                 workspace.ExMundoPortal.PortalKeyhole.Keyhole.Spark.Color = ColorSequence.new(Color3.new(0.3333333333333333, 0.3333333333333333, 1))
  269.                 staffPlaced = true
  270.             elseif target.Name == "BluePlacement" then
  271.                 if character:FindFirstChild("Dominus Azureus") then
  272.                     local blueDom = workspace.ExMundoPortal.BlueDominus:GetChildren()
  273.                     for i = 1, #blueDom do
  274.                         if blueDom[i]:IsA("BasePart") then
  275.                             blueDom[i].Transparency = 0
  276.                             if blueDom[i].Name == "Handle" then
  277.                                 blueDom[i].FireNitro.Enabled = true
  278.                             end
  279.                         end
  280.                     end
  281.                     blueP = true
  282.                 end
  283.             elseif target.Name == "GreenPlacement" then
  284.                 if character:FindFirstChild("Dominus Viride") then
  285.                     local greenDom = workspace.ExMundoPortal.GreenDominus:GetChildren()
  286.                     for i = 1, #greenDom do
  287.                         if greenDom[i]:IsA("BasePart") then
  288.                             greenDom[i].Transparency = 0
  289.                             if greenDom[i].Name == "Handle" then
  290.                                 greenDom[i].FireNitro.Enabled = true
  291.                             end
  292.                         end
  293.                     end
  294.                     greenP = true
  295.                 end
  296.             elseif target.Name == "YellowPlacement" and character:FindFirstChild("Dominus Aurum") then
  297.                 local yellowDom = workspace.ExMundoPortal.YellowDominus:GetChildren()
  298.                 for i = 1, #yellowDom do
  299.                     if yellowDom[i]:IsA("BasePart") then
  300.                         yellowDom[i].Transparency = 0
  301.                         if yellowDom[i].Name == "Handle" then
  302.                             yellowDom[i].FireNitro.Enabled = true
  303.                         end
  304.                     end
  305.                 end
  306.                 yellowP = true
  307.             end
  308.         end
  309.         if target:FindFirstChild("Grab") and not target:IsDescendantOf(character) and not target:FindFirstChild("Move") and (humanoid:GetState() ~= Enum.HumanoidStateType.Climbing or humanoid:GetState() ~= Enum.HumanoidStateType.Ragdoll or humanoid:GetState() ~= Enum.HumanoidStateType.Swimming) and not target.Grab.Value then
  310.             local distance = (torso.Position - target.Position).magnitude
  311.             if distance <= 16 and target.Name == "Hook" and target:FindFirstChild("HookAttachment") then
  312.                 target.HookAttachment:Destroy()
  313.                 repStorage.VehicleEvents.Towing:FireServer(false, target)
  314.             end
  315.         end
  316.     end
  317. end)
  318. mouse.Button1Up:connect(function()
  319.     if grabObj.Value and grabObj.Value.Name == "Hook" then
  320.         local hook = grabObj.Value
  321.         if hook.Parent and hook.Parent.Parent and hook.Parent.Parent:FindFirstChild("owner") and grabObj.Value.Parent.Parent.owner.Value == player.Name then
  322.             local rope = hook:FindFirstChild("RopeConstraint")
  323.             if rope then
  324.                 for i = 40, 20, -1 do
  325.                     rope.Length = i / 4
  326.                     wait()
  327.                 end
  328.                 repStorage.VehicleEvents.Rope:FireServer(rope, rope.Length)
  329.                 repStorage.VehicleEvents.HookTouch:FireServer()
  330.             end
  331.         end
  332.     end
  333.     if grabObj.Value and grabObj.Value.Name == "Hose" then
  334.         local hose = grabObj.Value
  335.         hose.Water.Enabled = false
  336.         if hose.Parent and hose.Parent.Nozzle then
  337.             local rope = hose.Parent.Nozzle:FindFirstChild("Hose")
  338.             if rope then
  339.                 for i = 50, 8, -1 do
  340.                     rope.Length = i / 4
  341.                     wait()
  342.                 end
  343.             end
  344.         end
  345.     end
  346.     if grabObj.Value then
  347.         local move = grabObj.Value:FindFirstChild("Move")
  348.         if move then
  349.             local handles = grabObj.Value:GetChildren()
  350.             for i = 1, #handles do
  351.                 if handles[i].Name == "Move" then
  352.                     handles[i]:Destroy()
  353.                 end
  354.             end
  355.             repStorage.DragObject:FireServer(false, grabObj.Value, nil)
  356.         end
  357.     end
  358.     if grabObj.Value and grabObj.Value:FindFirstChild("Draggable") then
  359.         grabObj.Value:FindFirstChild("Draggable"):Destroy()
  360.     end
  361.     grabObj.Value = nil
  362. end)
  363. function Search(object)
  364.     for i, v in pairs(object:GetChildren()) do
  365.         table.insert(Found, v)
  366.         Search(v)
  367.     end
  368. end
  369. grabObj.Changed:connect(function()
  370.     if grabObj.Value then
  371.         if not grabObj.Value:FindFirstChild("Draggable") then
  372.             local glow = Instance.new("SphereHandleAdornment")
  373.             glow.Name = "Draggable"
  374.             glow.Radius = (grabObj.Value.Size.X + grabObj.Value.Size.Z) * 0.5
  375.             glow.Adornee = grabObj.Value
  376.             glow.Visible = true
  377.             glow.Parent = grabObj.Value
  378.             glow.Transparency = 0.8
  379.         end
  380.         if grabObj.Value.Name == "Hook" then
  381.             local hook = grabObj.Value
  382.             local hookAttach = hook.Attachment
  383.             if hook.Parent.Parent:FindFirstChild("owner") then
  384.                 if grabObj.Value.Parent.Parent.owner.Value == player.Name then
  385.                     local rope = hook:FindFirstChild("RopeConstraint")
  386.                     if rope then
  387.                         rope.Length = 13
  388.                         repStorage.VehicleEvents.Rope:FireServer(rope, rope.Length)
  389.                         repStorage.VehicleEvents.HookTouch:FireServer(hook, hookAttach, grabObj.Value.Parent.Parent)
  390.                     end
  391.                 end
  392.             else
  393.                 local move = grabObj.Value:FindFirstChild("Move")
  394.                 if move then
  395.                     move:Destroy()
  396.                     repStorage.DragObject:FireServer(false, grabObj.Value)
  397.                 end
  398.                 grabObj.Value = nil
  399.             end
  400.         end
  401.         local move = Instance.new("BodyPosition")
  402.         move.Name = "Move"
  403.         move.Parent = grabObj.Value
  404.         move.MaxForce = grabObj.Value:GetMass() * 192.6 * Vector3.new(0.5, 0.5, 0.5)
  405.         if grabObj.Value:FindFirstChild("Float") then
  406.             Found = {}
  407.             local totalmass = 0
  408.             Search(script.Parent)
  409.             for i, v in pairs(Found) do
  410.                 if v:IsA("BasePart") then
  411.                     local partmass = v:GetMass() * 192.6
  412.                     totalmass = totalmass + partmass
  413.                 end
  414.             end
  415.             move.MaxForce = totalmass * Vector3.new(10, 10, 10)
  416.         end
  417.         local dragDistance = 10
  418.         repeat
  419.             local obj = grabObj.Value
  420.             if obj and (torso.Position - obj.Position).magnitude <= 16 then
  421.                 local y = 1.6
  422.                 local mouseDirection = (mouse.Hit.p - torso.Position).unit
  423.                 move.Position = mouseDirection * dragDistance + Vector3.new(0, y, 0) + torso.Position
  424.                 repStorage.DragObject:FireServer(true, obj, move.Position)
  425.             end
  426.             wait(0.11)
  427.         until character:FindFirstChild("died")
  428.         if grabObj.Value then
  429.             local move = grabObj.Value:FindFirstChild("Move")
  430.             if move then
  431.                 move:Destroy()
  432.                 repStorage.DragObject:FireServer(false, grabObj.Value)
  433.             end
  434.         end
  435.         if grabObj.Value and grabObj.Value.Name == "Hook" then
  436.             local hook = grabObj.Value
  437.             if hook.Parent.Parent:FindFirstChild("owner") and grabObj.Value.Parent.Parent.owner.Value == player.Name then
  438.                 local rope = hook:FindFirstChild("RopeConstraint")
  439.                 if rope then
  440.                     rope.Length = 2
  441.                     repStorage.VehicleEvents.Rope:FireServer(rope, rope.Length)
  442.                     repStorage.VehicleEvents.HookTouch:FireServer()
  443.                 end
  444.             end
  445.         end
  446.         grabObj.Value = nil
  447.     end
  448. end)
  449. mouse.Button2Down:connect(function()
  450.     if mouse.Target then
  451.         local target = mouse.Target
  452.         if target.Name == "Kill" and target.Parent.Name == "Dominus" then
  453.             if target.Parent.Parent.Name == "ShambhalaEasterEgg" then
  454.                 repStorage.items.give_item:InvokeServer("Dominus Azureus")
  455.             elseif target.Parent.Parent.Name == "MountainEasterEgg" then
  456.                 repStorage.items.give_item:InvokeServer("Dominus Viride")
  457.                 if workspace.MountainEasterEgg:FindFirstChild("Map") then
  458.                     workspace.MountainEasterEgg.Map.Anchored = false
  459.                 end
  460.             elseif target.Parent.Parent.Name == "BuriedEasterEgg" then
  461.                 repStorage.items.give_item:InvokeServer("Dominus Aurum")
  462.             end
  463.         end
  464.         if target.Name == "AlienMap" then
  465.             repStorage.items.give_item:InvokeServer("Alien Map")
  466.         end
  467.         if target.Name == "VirgamPaschaOvo" then
  468.             repStorage.items.give_item:InvokeServer("Virgam Pascha Ovo")
  469.             if game.ReplicatedStorage:FindFirstChild("ExMundoButtons") then
  470.                 game.ReplicatedStorage.ExMundoButtons.Parent = workspace
  471.             end
  472.         end
  473.     end
  474. end)
  475. repStorage.VehicleEvents.HookDetach.OnClientEvent:connect(function(hook)
  476.     local rope = hook:FindFirstChild("RopeConstraint")
  477.     if rope then
  478.         rope.Length = 2
  479.         repStorage.VehicleEvents.Rope:FireServer(rope, rope.Length)
  480.     end
  481. end)
  482. local cameraTweening = false
  483. inputManager.InputBegan.Event:Connect(function(key)
  484.     if not isChatting and key == "Sprint" and not humanoid.Sit and humanoid.WalkSpeed ~= 0 and not cameraTweening then
  485.         sprint.Value = true
  486.     end
  487. end)
  488. inputManager.InputEnded.Event:Connect(function(key)
  489.     if not isChatting and key == "Sprint" and humanoid.WalkSpeed ~= 0 then
  490.         if not cameraTweening then
  491.             sprint.Value = false
  492.         else
  493.             repeat
  494.                 wait()
  495.             until not cameraTweening
  496.             sprint.Value = false
  497.         end
  498.     end
  499. end)
  500. sprint.Changed:connect(function()
  501.     if sprint.Value == true then
  502.         cameraTweening = true
  503.         humanoid.WalkSpeed = humanoid.WalkSpeed + 6
  504.         camera:TweenToFOV(80, 0.4, camera.Ease.Out.Expo)
  505.         cameraTweening = false
  506.     else
  507.         cameraTweening = true
  508.         humanoid.WalkSpeed = intWalkSpeed
  509.         camera:TweenToFOV(70, 0.4, camera.Ease.In.Sine)
  510.         cameraTweening = false
  511.     end
  512. end)
  513. inputManager.InputBegan.Event:Connect(function(key)
  514.     if not isChatting and key == "Ragdoll" and humanoid.WalkSpeed ~= 0 then
  515.         q = true
  516.         if not humanoid.Sit and not humanoid.PlatformStand and debounce then
  517.             debounce = false
  518.             if character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  519.                 character.R15Ragdoll.Ragdoll.Value = not character.R15Ragdoll.Ragdoll.Value
  520.             end
  521.             wait(1)
  522.             debounce = true
  523.         end
  524.     end
  525. end)
  526. inputManager.InputEnded.Event:Connect(function(key)
  527.     if not isChatting and key == "Ragdoll" then
  528.         q = false
  529.     end
  530. end)
  531. local s
  532. local seated = false
  533. local exit_db = false
  534. local carseat_folder = game.ReplicatedStorage:WaitForChild("VehicleEvents"):WaitForChild("car_seating")
  535. local npc_block = false
  536. local enter_debounce = false
  537. local current_seat
  538. local seat_remote = carseat_folder:WaitForChild("seat")
  539. function check_exit(override)
  540.     if not isChatting and not exit_db and seated and not player.PlayerGui.Autoshop.autoshop_open.Value and (s == nil or s ~= nil and (s.ClassName == "VehicleSeat" and override or s.ClassName == "Seat")) then
  541.         exit_db = true
  542.         pseats.exit_seat(game.Players.LocalPlayer, game.Players.LocalPlayer.Character, s)
  543.         humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
  544.         seated = false
  545.         s = nil
  546.         exit_db = false
  547.     elseif s == nil and override and not enter_debounce and not seated and not exit_db and not npc_block and current_seat ~= nil and not current_seat.Disabled and current_seat.Parent ~= nil and humanoid ~= nil and not humanoid.PlatformStand and (not humanoid.SeatPart or humanoid.SeatPart.Parent.Parent.Name == "Parachute") and not character:FindFirstChild("died") then
  548.         enter_debounce = true
  549.         seat_remote:FireServer(current_seat)
  550.         wait(1)
  551.         enter_debounce = false
  552.     end
  553. end
  554. humanoid:GetPropertyChangedSignal("SeatPart"):connect(function()
  555.     wait()
  556.     if humanoid.SeatPart ~= nil and (humanoid.SeatPart.Name == "VehicleSeat" and humanoid.SeatPart.Parent.Name == "Chassis" or humanoid.SeatPart.Name == "Seat" and humanoid.SeatPart.Parent.Name == "Bodykit") then
  557.         seated = true
  558.         s = humanoid.SeatPart
  559.         humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
  560.     elseif humanoid.SeatPart == nil then
  561.         if not exit_db then
  562.             check_exit(true)
  563.         elseif exit_db and seated then
  564.             humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
  565.             seated = false
  566.             s = nil
  567.         end
  568.     end
  569. end)
  570. userInput.JumpRequest:connect(check_exit)
  571. inputManager.InputBegan.Event:connect(function(key)
  572.     if not isChatting and key == "Interact" then
  573.         check_exit(true)
  574.     end
  575. end)
  576. local ws = game.Workspace
  577. local vehicle_folder = game.Workspace:WaitForChild("Vehicles")
  578. local min_mag = 22
  579. local debounce = false
  580. local r3 = Region3.new
  581. local ra = Ray.new
  582. local v3 = Vector3.new
  583. local tos = tostring
  584. local lp = game.Players.LocalPlayer
  585. local wl = {vehicle_folder}
  586. repeat
  587.     wait()
  588. until character ~= nil and character:FindFirstChild("HumanoidRootPart") ~= nil
  589. local uis = game:GetService("UserInputService")
  590. local fl = {}
  591. local gui = carseat_folder:WaitForChild("Prompt"):Clone()
  592. gui.Parent = script.Parent
  593. local functions = {}
  594. uis.TextBoxFocused:connect(function()
  595.     isChatting = true
  596. end)
  597. uis.TextBoxFocusReleased:connect(function()
  598.     isChatting = false
  599. end)
  600. local w2
  601. function check_friends(plr)
  602.     if plr ~= nil and lp:IsFriendsWith(plr.userId) then
  603.         fl[tos(plr)] = true
  604.     end
  605. end
  606. game.Players.PlayerAdded:connect(check_friends)
  607. for _, v in pairs(game.Players:GetPlayers()) do
  608.     spawn(function()
  609.         if v ~= lp then
  610.             check_friends(v)
  611.         end
  612.     end)
  613. end
  614. function change_platform(bool)
  615.     if bool then
  616.         if current_seat then
  617.             if current_seat.ClassName == "Seat" then
  618.                 local tempIcon = GetKeyImage_Function:Invoke("Interact", true)
  619.                 local tempImage_button = gui:WaitForChild("Frame"):WaitForChild("image_button")
  620.                 tempImage_button.Image = tempIcon.ImageID
  621.                 tempImage_button.ImageRectOffset = tempIcon.ImageRectOffset
  622.                 tempImage_button.ImageRectSize = tempIcon.ImageRectSize
  623.                 tempImage_button.Visible = true
  624.                 gui.Frame:WaitForChild("pc_label").Visible = false
  625.                 gui.Frame.gamepad_label.Text = translator:FormatByKey("enter_passenger_seat_xbox")
  626.                 gui.Frame:WaitForChild("gamepad_label").Visible = true
  627.             else
  628.                 local tempIcon = GetKeyImage_Function:Invoke("Interact", true)
  629.                 local tempImage_button = gui:WaitForChild("Frame"):WaitForChild("image_button")
  630.                 tempImage_button.Image = tempIcon.ImageID
  631.                 tempImage_button.ImageRectOffset = tempIcon.ImageRectOffset
  632.                 tempImage_button.ImageRectSize = tempIcon.ImageRectSize
  633.                 tempImage_button.Visible = true
  634.                 gui.Frame:WaitForChild("pc_label").Visible = false
  635.                 gui.Frame.gamepad_label.Text = translator:FormatByKey("enter_driver_seat_xbox")
  636.                 gui.Frame:WaitForChild("gamepad_label").Visible = true
  637.             end
  638.         end
  639.     elseif current_seat then
  640.         if current_seat.ClassName == "Seat" then
  641.             local InteractKeyName = GetPrettyKeyCodeName_Function:Invoke("Interact", false)
  642.             gui:WaitForChild("Frame"):WaitForChild("pc_label").Text = translator:FormatByKey("enter_passenger_seat_pc")
  643.             gui.Frame.pc_label.Visible = true
  644.             gui.Frame:WaitForChild("image_button").Visible = false
  645.             gui.Frame:WaitForChild("gamepad_label").Visible = false
  646.         else
  647.             local InteractKeyName = GetPrettyKeyCodeName_Function:Invoke("Interact", false)
  648.             gui:WaitForChild("Frame"):WaitForChild("pc_label").Text = translator:FormatByKey("enter_driver_seat_pc")
  649.             gui.Frame.pc_label.Visible = true
  650.             gui.Frame:WaitForChild("image_button").Visible = false
  651.             gui.Frame:WaitForChild("gamepad_label").Visible = false
  652.         end
  653.     end
  654. end
  655. change_platform(platform_listener.link(change_platform, "vehicle_enter"))
  656. spawn(function()
  657.     while true do
  658.         wait(0.33)
  659.         ypcall(function()
  660.             if torso ~= nil then
  661.                 npc_block = false
  662.                 if w2 then
  663.                     local r = game.Workspace:FindPartOnRayWithWhitelist(ra(torso.Position, v3(0, -1, 0).unit * 15), w2)
  664.                     if r ~= nil then
  665.                         npc_block = true
  666.                     end
  667.                 end
  668.             end
  669.             if torso ~= nil and not enter_debounce and not npc_block and not humanoid.PlatformStand and 0 < humanoid.WalkSpeed and (humanoid.SeatPart == nil or humanoid.SeatPart.Parent.Parent.Name == "Parachute") then
  670.                 do
  671.                     local torsop = torso.Position
  672.                     local r3p = r3(torsop - v3(min_mag, min_mag, min_mag), torsop + v3(min_mag, min_mag, min_mag))
  673.                     local parts = ws:FindPartsInRegion3WithWhiteList(r3p, wl, 1000)
  674.                     local ts
  675.                     local mm = min_mag + 10
  676.                     for _, v in pairs(parts) do
  677.                         ypcall(function()
  678.                             if v ~= nil and v.Parent ~= nil and v.Parent.Parent ~= ws and (v.ClassName == "VehicleSeat" or v.ClassName == "Seat") and not v.Disabled and v.Parent.Parent.Name ~= "Parachute" and v.Parent.Parent:FindFirstChild("owner") and not v.Parent.Parent:FindFirstChild("Police") and not v.Parent.Parent:FindFirstChild("Junker") and (v.Position - torsop).magnitude < mm then
  679.                                 local l = v.Parent.Parent:WaitForChild("Variables"):WaitForChild("lock_status").Value
  680.                                 local o = v.Parent.Parent:WaitForChild("owner").Value
  681.                                 local p = game.Players:FindFirstChild(o)
  682.                                 if p ~= nil and v.Occupant == nil and (lp == p or l == "everyone" or l == "friends" and fl[tos(p)] ~= nil) then
  683.                                     mm = (v.Position - torsop).magnitude
  684.                                     ts = v
  685.                                 end
  686.                             end
  687.                         end)
  688.                     end
  689.                     if ts ~= nil and (current_seat == nil or ts ~= current_seat) then
  690.                         current_seat = ts
  691.                         change_platform(platform_listener.check_platform())
  692.                         gui.Adornee = ts
  693.                         gui.Enabled = true
  694.                     elseif ts == nil and (current_seat ~= nil or gui.Adornee ~= nil) then
  695.                         gui.Enabled = false
  696.                         current_seat = nil
  697.                         gui.Adornee = nil
  698.                     end
  699.                 end
  700.             elseif current_seat ~= nil or gui.Adornee ~= nil then
  701.                 gui.Enabled = false
  702.                 current_seat = nil
  703.                 gui.Adornee = nil
  704.             end
  705.         end)
  706.     end
  707. end)
  708. player:WaitForChild("leaderstats")
  709. local currentVehicle = player.leaderstats.CurrentVehicle
  710. currentVehicle.Changed:connect(function()
  711.     if (player.Name == "Simbuilder" or player.Name == "TheAmazeman" or player.Name == "Belzebass") and player.TeamColor == BrickColor.new("Dark green") then
  712.         repStorage.TeamChange:FireServer(BrickColor.new("Gold"))
  713.     end
  714. end)
  715. local whitelist = {
  716.     game.Workspace:WaitForChild("Zones")
  717. }
  718. local zone = script:WaitForChild("Zone")
  719. while true do
  720.     if head then
  721.         if head.Velocity.magnitude >= 150 and character.R15Ragdoll.Ragdoll.Value == false and not humanoid.Sit then
  722.             if character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  723.                 wait(0.2)
  724.                 if head.Velocity.magnitude >= 150 and character.R15Ragdoll.Ragdoll.Value == false and not humanoid.Sit and humanoid:GetState() ~= Enum.HumanoidStateType.Swimming and not parachuting.Value and character.R15Ragdoll.Ragdoll.Value == false then
  725.                     character.R15Ragdoll.Ragdoll.Value = true
  726.                 end
  727.             end
  728.         elseif head.Velocity.magnitude < 3 and not q and character:FindFirstChild("R15Ragdoll") ~= nil and character:FindFirstChild("R15Ragdoll"):FindFirstChild("Ragdoll") ~= nil and character:FindFirstChild("R15Ragdoll"):FindFirstChild("Ragdoll").Value == true then
  729.             wait(1)
  730.             if head.Velocity.magnitude < 3 and character.R15Ragdoll.Ragdoll.Value == true and character.Humanoid.RigType == Enum.HumanoidRigType.R15 and character.R15Ragdoll.Ragdoll.Value == true then
  731.                 character.R15Ragdoll.Ragdoll.Value = false
  732.             end
  733.         end
  734.     end
  735.     if character:FindFirstChild("HumanoidRootPart") then
  736.         local ray = ra(character:WaitForChild("HumanoidRootPart").Position, Vector3.new(0, -1, 0).unit * 50)
  737.         local partD = game.Workspace:FindPartOnRayWithWhitelist(ray, whitelist)
  738.         if partD ~= nil then
  739.             zone.Value = partD.Name
  740.         else
  741.             zone.Value = ""
  742.         end
  743.         local ray = ra(character:WaitForChild("HumanoidRootPart").Position, Vector3.new(0, 1, 0).unit * 50)
  744.         local partU = game.Workspace:FindPartOnRayWithWhitelist(ray, whitelist)
  745.         if partU ~= nil and zone.Value == "" then
  746.             zone.Value = partU.Name
  747.         end
  748.         if partD and partD:FindFirstChild("Sound") and partD:FindFirstChild("Sound") ~= nil and partD.Sound:FindFirstChild("Sound") ~= nil and not partD.Sound.Sound.Playing then
  749.             game.Players.LocalPlayer.PlayerScripts:WaitForChild("SoundManager"):WaitForChild("AttachSound"):Fire(partD.Sound.Sound, "SFX")
  750.             partD.Sound.Sound:Play()
  751.         end
  752.     end
  753.     if zone.Value == "Tunnel" then
  754.         soundScape.AmbientReverb = "Bathroom"
  755.     elseif zone.Value == "Hangar" then
  756.         soundScape.AmbientReverb = "Hangar"
  757.     elseif zone.Value == "Floor" then
  758.         soundScape.AmbientReverb = "Room"
  759.     elseif zone.Value == "Cave" then
  760.         soundScape.AmbientReverb = "Cave"
  761.     elseif zone.Value == "ExHocMundo" then
  762.         soundScape.AmbientReverb = "Bathroom"
  763.     elseif zone.Value == "WaterfallCave" then
  764.         soundScape.AmbientReverb = "Cave"
  765.     elseif zone.Value == "Arena" then
  766.         soundScape.AmbientReverb = "Arena"
  767.     elseif zone.Value == "Prison" then
  768.         soundScape.AmbientReverb = "Arena"
  769.     else
  770.         soundScape.AmbientReverb = "NoReverb"
  771.     end
  772.     if zone.Value == "PressurePlate" then
  773.         if not game.Workspace.Atlantis.Hatch.Open.Playing then
  774.             game.Workspace.Atlantis.Hatch.Open:Play()
  775.             game.Workspace.Atlantis.Hatch.Transparency = 1
  776.             game.Workspace.Atlantis.Hatch.CanCollide = false
  777.         end
  778.     elseif zone.Value == "Portal" and workspace.ExMundoPortal.Portal.Portal.Enabled == true then
  779.         repStorage.EasterEgg:FireServer(Vector3.new(20000, 8, 0), staffPlaced, blueP, greenP, yellowP)
  780.     end
  781.     wait(0.15)
  782.     local ignore = {
  783.         character,
  784.         workspace:WaitForChild("Vehicles"),
  785.         workspace:WaitForChild("Weather"),
  786.         workspace.RadioStation
  787.     }
  788.     if character and not character:FindFirstChild("died") and not humanoid.Jump and not humanoid.Sit then
  789.         local st = humanoid:GetState()
  790.         if st ~= Enum.HumanoidStateType.Climbing and st ~= Enum.HumanoidStateType.Swimming then
  791.             for _, v in pairs(game.Players:GetChildren()) do
  792.                 if v.Character ~= nil then
  793.                     table.insert(ignore, v.Character)
  794.                 end
  795.             end
  796.             local dist, hit, pos, norm, material = Raycast.new(torso.CFrame.p, Vector3.new(0, -1, 0), ignore)
  797.             if hit and hit.Name ~= "Ignore" then
  798.                 if hit.Name == "BarbedWire" then
  799.                     if 0 < humanoid.Health then
  800.                         humanoid.Health = humanoid.Health - 10
  801.                     else
  802.                         spawn(function()
  803.                             kill.kill()
  804.                         end)
  805.                     end
  806.                 end
  807.                 if hit.Name == "Coil" then
  808.                     if 0 < humanoid.Health then
  809.                         humanoid.Health = humanoid.Health - 20
  810.                     else
  811.                         spawn(function()
  812.                             kill.kill()
  813.                         end)
  814.                     end
  815.                 end
  816.                 if material ~= "Water" then
  817.                     local deg = math.abs(90 - math.asin(norm.y) * 57.2958)
  818.                     if deg >= 75 and not character.R15Ragdoll.Ragdoll.Value then
  819.                         character.R15Ragdoll.Ragdoll.Value = true
  820.                     end
  821.                     if material == "CrackedLava" then
  822.                         if 0 < humanoid.Health - 10 then
  823.                             humanoid.Health = humanoid.Health - 15
  824.                         else
  825.                             spawn(function()
  826.                                 kill.kill()
  827.                             end)
  828.                         end
  829.                     end
  830.                 end
  831.             end
  832.         end
  833.     end
  834.     if player:FindFirstChild("RedButton") and player:FindFirstChild("BlueButton") and player:FindFirstChild("YellowButton") and player:FindFirstChild("PurpleButton") and player:FindFirstChild("GreenButton") then
  835.         if workspace.ExMundoPortal.LavaLight.SurfaceLight.Enabled == false then
  836.             game.Players.LocalPlayer.PlayerScripts:WaitForChild("SoundManager"):WaitForChild("AttachSound"):Fire(workspace.ExMundoPortal.Hatch.Hatch.Sound, "SFX")
  837.             workspace.ExMundoPortal.Hatch.Hatch.Sound:Play()
  838.             workspace.ExMundoPortal.LavaLight.SurfaceLight.Enabled = true
  839.             workspace.ExMundoPortal.LavaLight.ParticleEmitter.Enabled = true
  840.             workspace.ExMundoPortal.LavaLight.FireNitro.Enabled = true
  841.             workspace.ExMundoPortal.Hatch.Hatch.CanCollide = false
  842.             workspace.ExMundoPortal.Hatch.Hatch.Transparency = 1
  843.         end
  844.     end
  845.     if staffPlaced and blueP and greenP and yellowP and workspace.ExMundoPortal.Portal.Portal.Enabled == false then
  846.         workspace.ExMundoPortal.Portal.Portal.Enabled = true
  847.     end
  848. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top