Advertisement
Robloxian_Scripter

Untitled

Mar 26th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Script1 = Instance.new("Script")
  21. LocalScript2 = Instance.new("LocalScript")
  22. Part3 = Instance.new("Part")
  23. Part4 = Instance.new("Part")
  24. StringValue5 = Instance.new("StringValue")
  25. Script6 = Instance.new("Script")
  26. Script7 = Instance.new("Script")
  27. Tool0.Name = "Kill"
  28. Tool0.Parent = mas
  29. Tool0.Grip = CFrame.new(0, 0.5, 0.100000001, 0.00502918055, 0.999987364, -2.41980124e-05, -2.42013066e-05, 2.43250979e-05, 1, 0.999987364, -0.00502919592, 2.4314586e-05)
  30. Tool0.GripForward = Vector3.new(2.41980124e-05, -1, -2.4314586e-05)
  31. Tool0.GripPos = Vector3.new(0, 0.5, 0.100000001)
  32. Tool0.GripRight = Vector3.new(0.00502918055, -2.42013066e-05, 0.999987364)
  33. Tool0.GripUp = Vector3.new(0.999987364, 2.43250979e-05, -0.00502919592)
  34. Script1.Name = "Main"
  35. Script1.Parent = Tool0
  36. table.insert(cors,sandbox(Script1,function()
  37. bin = script.Parent
  38. kill = script.Parent.Kill:clone()
  39. player = game.Players.LocalPlayer
  40.  
  41. function onActivated()
  42. h = player.Character.Humanoid.TargetPoint
  43. b = kill:clone()
  44. b.Parent = game.Workspace
  45. b.CFrame = CFrame.new(h)
  46. b:findFirstChild("Owner").Value = player.Name
  47. end
  48.  
  49.  
  50. script.Parent.Activated:connect(onActivated)
  51.  
  52. end))
  53. LocalScript2.Name = "Local Gui"
  54. LocalScript2.Parent = Tool0
  55. table.insert(cors,sandbox(LocalScript2,function()
  56. local Tool = script.Parent;
  57.  
  58. function onEquippedLocal(mouse)
  59. if mouse == nil then return end
  60. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  61. end
  62.  
  63.  
  64. Tool.Equipped:connect(onEquippedLocal)
  65.  
  66. end))
  67. Part3.Name = "Handle"
  68. Part3.Parent = Tool0
  69. Part3.CFrame = CFrame.new(-53, 1.67970109, -1.50222015, 1.04847568e-05, 0.999989331, 0.00462258654, 0.999989688, 1.04847568e-05, -0.00453626877, -0.00453626877, 0.00462258654, -0.999979019)
  70. Part3.Orientation = Vector3.new(0.25999999, 179.740005, 90)
  71. Part3.Position = Vector3.new(-53, 1.67970109, -1.50222015)
  72. Part3.Rotation = Vector3.new(179.740005, 0.25999999, -90)
  73. Part3.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  74. Part3.Transparency = 1
  75. Part3.Size = Vector3.new(1, 2, 1)
  76. Part3.BottomSurface = Enum.SurfaceType.Smooth
  77. Part3.BrickColor = BrickColor.new("Really black")
  78. Part3.TopSurface = Enum.SurfaceType.Smooth
  79. Part3.brickColor = BrickColor.new("Really black")
  80. Part3.FormFactor = Enum.FormFactor.Symmetric
  81. Part3.formFactor = Enum.FormFactor.Symmetric
  82. Part4.Name = "Kill"
  83. Part4.Parent = Tool0
  84. Part4.CFrame = CFrame.new(1, 1.39999998, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  85. Part4.Position = Vector3.new(1, 1.39999998, 0)
  86. Part4.Color = Color3.new(0.105882, 0.164706, 0.207843)
  87. Part4.Transparency = 1
  88. Part4.Size = Vector3.new(6, 0.400000006, 6)
  89. Part4.BottomSurface = Enum.SurfaceType.Smooth
  90. Part4.BrickColor = BrickColor.new("Black")
  91. Part4.CanCollide = false
  92. Part4.TopSurface = Enum.SurfaceType.Smooth
  93. Part4.brickColor = BrickColor.new("Black")
  94. Part4.FormFactor = Enum.FormFactor.Plate
  95. Part4.formFactor = Enum.FormFactor.Plate
  96. StringValue5.Name = "Owner"
  97. StringValue5.Parent = Part4
  98. Script6.Name = "Kill"
  99. Script6.Parent = Part4
  100. table.insert(cors,sandbox(Script6,function()
  101. function onTouched(part)
  102. p = part.Parent
  103. if p == nil then return end
  104. h = part.Parent:findFirstChild("Humanoid")
  105. if h == nil then return end
  106. if p.Name == script.Parent.Owner.Value then return end
  107. h.Health = 0
  108. end
  109.  
  110. script.Parent.Touched:connect(onTouched)
  111.  
  112. end))
  113. Script7.Name = "Clean"
  114. Script7.Parent = Part4
  115. table.insert(cors,sandbox(Script7,function()
  116. wait(.1)
  117. script.Parent:remove()
  118. end))
  119. for i,v in pairs(mas:GetChildren()) do
  120. v.Parent = workspace
  121. pcall(function() v:MakeJoints() end)
  122. end
  123. mas:Destroy()
  124. for i,v in pairs(cors) do
  125. spawn(function()
  126. pcall(v)
  127. end)
  128. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement