Advertisement
Diamond_Nicholas

look at you 2

Mar 3rd, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.52 KB | None | 0 0
  1.  
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(Enum,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Model0 = Instance.new("Model")
  19. Part1 = Instance.new("Part")
  20. Decal2 = Instance.new("Decal")
  21. Script3 = Instance.new("Script")
  22. NumberValue4 = Instance.new("NumberValue")
  23. BodyGyro5 = Instance.new("BodyGyro")
  24. BodyPosition6 = Instance.new("BodyPosition")
  25. BodyVelocity7 = Instance.new("BodyVelocity")
  26. Model0.Name = "Im Looking At You"
  27. Model0.Parent = mas
  28. Part1.Parent = Model0
  29. Part1.CFrame = CFrame.new(-5.90999985, 8.82788563, -10.7949982, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  30. Part1.Position = Vector3.new(-5.90999985, 8.82788563, -10.7949982)
  31. Part1.Size = Vector3.new(4, 3.91999936, 3.85000038)
  32. Part1.BottomSurface = Enum.SurfaceType.Smooth
  33. Part1.TopSurface = Enum.SurfaceType.Smooth
  34. Decal2.Name = "faic"
  35. Decal2.Parent = Part1
  36. Decal2.Texture = "http://www.roblox.com/asset/?id=65724729"
  37. Script3.Name = "Aim"
  38. Script3.Parent = Part1
  39. table.insert(cors,sandbox(Script3,function()
  40. bin = script.Parent
  41.  
  42. function move(target)
  43. local dir = (target.Position - bin.Position).unit
  44. local spawnPos = bin.Position
  45. local pos = spawnPos + (dir * 1)
  46. bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
  47. bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
  48. end
  49.  
  50. function moveTo(target)
  51. bin.BodyPosition.position = target.Position
  52. bin.BodyPosition.maxForce = Vector3.new(0,0,0) * bin.Speed.Value
  53. end
  54.  
  55. function findNearestTorso(pos)
  56. local list = game.Workspace:GetChildren()
  57. local torso = nil
  58. local dist = 1000
  59. local temp = nil
  60. local human = nil
  61. local temp2 = nil
  62. for x = 1, #list do
  63. temp2 = list[x]
  64. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  65. temp = temp2:findFirstChild("Head")
  66. human = temp2:findFirstChild("Humanoid")
  67. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  68. if (temp.Position - pos).magnitude < dist then
  69. torso = temp
  70. dist = (temp.Position - pos).magnitude
  71. end
  72. end
  73. end
  74. end
  75. return torso
  76. end
  77.  
  78. while true do
  79. local torso = findNearestTorso(bin.Position)
  80. if torso~=nil then
  81. move(torso)
  82. moveTo(torso)
  83. end
  84. wait()
  85. end
  86.  
  87.  
  88. end))
  89. NumberValue4.Name = "Speed"
  90. NumberValue4.Parent = Part1
  91. NumberValue4.Value = 0.2
  92. BodyGyro5.Parent = Part1
  93. BodyGyro5.CFrame = CFrame.new(-81.6501541, 267.066833, 20.9726334, -0.486033261, 0.203790069, -0.849847794, 2.64563482e-09, 0.972432256, 0.233185336, 0.873940289, 0.113335826, -0.472634435)
  94. BodyGyro5.MaxTorque = Vector3.new(9000, 9000, 9000)
  95. BodyGyro5.maxTorque = Vector3.new(9000, 9000, 9000)
  96. BodyGyro5.cframe = CFrame.new(-81.6501541, 267.066833, 20.9726334, -0.486033261, 0.203790069, -0.849847794, 2.64563482e-09, 0.972432256, 0.233185336, 0.873940289, 0.113335826, -0.472634435)
  97. BodyPosition6.Parent = Part1
  98. BodyPosition6.Position = Vector3.new(-5.90999985, 8.82800007, -10.7950001)
  99. BodyPosition6.position = Vector3.new(-5.90999985, 8.82800007, -10.7950001)
  100. BodyVelocity7.Parent = Part1
  101. BodyVelocity7.MaxForce = Vector3.new(INF, INF, INF)
  102. BodyVelocity7.maxForce = Vector3.new(INF, INF, INF)
  103. BodyVelocity7.Velocity = Vector3.new(0, 0, 0)
  104. BodyVelocity7.velocity = Vector3.new(0, 0, 0)
  105. for i,v in pairs(mas:GetChildren()) do
  106. v.Parent = workspace
  107. pcall(function() v:MakeJoints() end)
  108. end
  109.  
  110. for i,v in pairs(cors) do
  111. spawn(function()
  112. pcall(v)
  113. end)
  114. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement