Advertisement
zza

predict

zza
Aug 3rd, 2020 (edited)
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.71 KB | None | 0 0
  1. local Plr = game.Players["iatemone"]
  2. local Char = Plr.Character
  3. local Hum = Char:FindFirstChildOfClass'Humanoid'
  4. local Vrson = 2
  5. local Torso = Char.Torso
  6.  
  7.  
  8. --Converted with ttyyuu12345's model to script plugin v4
  9. function sandbox(var,func)
  10. local env = getfenv(func)
  11. local newenv = setmetatable({},{
  12. __index = function(self,k)
  13. if k=="script" then
  14. return var
  15. else
  16. return env[k]
  17. end
  18. end,
  19. })
  20. setfenv(func,newenv)
  21. return func
  22. end
  23. cors = {}
  24. mas = Instance.new("Model",game:GetService("Lighting"))
  25. Model0 = Instance.new("Model")
  26. Part1 = Instance.new("Part")
  27. Part2 = Instance.new("Part")
  28. Part3 = Instance.new("Part")
  29. Part4 = Instance.new("Part")
  30. Weld5 = Instance.new("Weld")
  31. Weld6 = Instance.new("Weld")
  32. Weld7 = Instance.new("Weld")
  33. Model0.Name = "Prediciton walls"
  34. Model0.Parent = mas
  35. Part1.Name = "Top"
  36. Part1.Parent = Model0
  37. Part1.CFrame = CFrame.new(-54.4427261, 41.5299988, -36.7821465, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  38. Part1.Position = Vector3.new(-54.4427261, 41.5299988, -36.7821465)
  39. Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  40. Part1.Size = Vector3.new(26.0400009, 5.52999973, 16)
  41. Part1.BottomSurface = Enum.SurfaceType.Smooth
  42. Part1.BrickColor = BrickColor.new("Really black")
  43. Part1.CanCollide = false
  44. Part1.TopSurface = Enum.SurfaceType.Smooth
  45. Part1.brickColor = BrickColor.new("Really black")
  46. Part2.Name = "BackAndFront"
  47. Part2.Parent = Model0
  48. Part2.CFrame = CFrame.new(-54.4727249, 35.9399986, -36.7821465, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  49. Part2.Position = Vector3.new(-54.4727249, 35.9399986, -36.7821465)
  50. Part2.Color = Color3.new(1, 0, 0)
  51. Part2.Size = Vector3.new(3.88000107, 5.52999973, 16)
  52. Part2.BottomSurface = Enum.SurfaceType.Smooth
  53. Part2.BrickColor = BrickColor.new("Really red")
  54. Part2.CanCollide = false
  55. Part2.TopSurface = Enum.SurfaceType.Smooth
  56. Part2.brickColor = BrickColor.new("Really red")
  57. Part3.Name = "RightWall"
  58. Part3.Parent = Model0
  59. Part3.CFrame = CFrame.new(-46.9227219, 36, -36.7821465, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  60. Part3.Position = Vector3.new(-46.9227219, 36, -36.7821465)
  61. Part3.Color = Color3.new(0, 0, 1)
  62. Part3.Size = Vector3.new(11, 5.52999973, 16)
  63. Part3.BottomSurface = Enum.SurfaceType.Smooth
  64. Part3.BrickColor = BrickColor.new("Really blue")
  65. Part3.CanCollide = false
  66. Part3.TopSurface = Enum.SurfaceType.Smooth
  67. Part3.brickColor = BrickColor.new("Really blue")
  68. Part4.Name = "Main"
  69. Part4.Parent = Model0
  70. Part4.CFrame = CFrame.new(-61.9627266, 36, -36.7821465, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  71. Part4.Position = Vector3.new(-61.9627266, 36, -36.7821465)
  72. Part4.Color = Color3.new(0, 0, 1)
  73. Part4.Size = Vector3.new(11, 5.52999973, 16)
  74. Part4.BottomSurface = Enum.SurfaceType.Smooth
  75. Part4.BrickColor = BrickColor.new("Really blue")
  76. Part4.CanCollide = false
  77. Part4.TopSurface = Enum.SurfaceType.Smooth
  78. Part4.brickColor = BrickColor.new("Really blue")
  79. Weld5.Name = "BTWeld"
  80. Weld5.Parent = Part4
  81. Weld5.C1 = CFrame.new(-7.48999977, 0.0600013733, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  82. Weld5.Part0 = Part4
  83. Weld5.Part1 = Part2
  84. Weld5.part1 = Part2
  85. Weld6.Name = "BTWeld"
  86. Weld6.Parent = Part4
  87. Weld6.C1 = CFrame.new(-7.52000046, -5.52999878, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  88. Weld6.Part0 = Part4
  89. Weld6.Part1 = Part1
  90. Weld6.part1 = Part1
  91. Weld7.Name = "BTWeld"
  92. Weld7.Parent = Part4
  93. Weld7.C1 = CFrame.new(-15.0400028, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  94. Weld7.Part0 = Part4
  95. Weld7.Part1 = Part3
  96. Weld7.part1 = Part3
  97. for i,v in pairs(mas:GetChildren()) do
  98. v.Parent = script
  99. pcall(function() v:MakeJoints() end)
  100. end
  101. mas:Destroy()
  102. for i,v in pairs(cors) do
  103. spawn(function()
  104. pcall(v)
  105. end)
  106. end
  107.  
  108.  
  109. if Vrson < 2 then
  110. warn("This Prediction Script Is Old")
  111. script:Destroy()
  112. else
  113. print("All Updated")
  114. end
  115.  
  116. local Walls = script["Prediciton walls"]:Clone()
  117. script["Prediciton walls"]:Destroy()
  118.  
  119. for i,v in pairs(Walls:GetChildren()) do
  120. if v:IsA("Part") or v:IsA("BasePart") then
  121. v.Transparency = 1
  122. end
  123. end
  124.  
  125. function Predict(Model)
  126. local LeftWall = Model.Main
  127. local RightWall = Model.RightWall
  128. local BackAndFront = Model.BackAndFront
  129. local Top = Model.Top
  130. LeftWall.Touched:Connect(function()
  131. Torso.CFrame = Torso.CFrame * CFrame.new(5,0,0)
  132. end)
  133. RightWall.Touched:Connect(function()
  134. Torso.CFrame = Torso.CFrame * CFrame.new(-5,0,0)
  135. end)
  136. Top.Touched:Connect(function()
  137. Torso.CFrame = Torso.CFrame * CFrame.new(0,0,-5)
  138. end)
  139. BackAndFront.Touched:Connect(function()
  140. Torso.CFrame = Torso.CFrame * CFrame.new(0,0,-5)
  141. end)
  142. end
  143.  
  144. Plr.Chatted:Connect(function(chat)
  145. if chat == "/e pre" then
  146. print("PREDICTING")
  147. Walls.Parent = workspace
  148. Walls.Main.CFrame = Char.HumanoidRootPart.CFrame
  149. local MainWeld = Instance.new("Weld", Char.HumanoidRootPart)
  150. MainWeld.Part0 = Char.HumanoidRootPart
  151. MainWeld.Part1 = Walls.Main
  152. Predict(Walls)
  153. end
  154. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement