Advertisement
Godofadmin1337

badge thing fe

Sep 12th, 2018
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.77 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,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. IntValue4 = Instance.new("IntValue")
  23. Model0.Name = "BadgeAwarder"
  24. Model0.Parent = mas
  25. Part1.Name = "Platform"
  26. Part1.Parent = Model0
  27. Part1.BrickColor = BrickColor.new("Really black")
  28. Part1.Reflectance = 1
  29. Part1.Size = Vector3.new(10, 1.20000005, 10)
  30. Part1.CFrame = CFrame.new(49.5599976, 45.0007439, -59.7700005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  31. Part1.BackSurface = Enum.SurfaceType.Weld
  32. Part1.BottomSurface = Enum.SurfaceType.Weld
  33. Part1.FrontSurface = Enum.SurfaceType.Weld
  34. Part1.LeftSurface = Enum.SurfaceType.Weld
  35. Part1.RightSurface = Enum.SurfaceType.Weld
  36. Part1.TopSurface = Enum.SurfaceType.Weld
  37. Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  38. Part1.Position = Vector3.new(49.5599976, 45.0007439, -59.7700005)
  39. Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  40. Decal2.Parent = Part1
  41. Decal2.Texture = "http://www.roblox.com/asset/?id=1389644733"
  42. Decal2.Face = Enum.NormalId.Top
  43. Script3.Name = "BadgeAwarderScript"
  44. Script3.Parent = Part1
  45. table.insert(cors,sandbox(Script3,function()
  46. print("Badge Awarder Loaded. BadgeID: " .. script.Parent.BadgeID.Value)
  47.  
  48.  
  49.  
  50. -- ROBLOX scripter hackers, see what you can do with this:
  51. -- game:GetService("BadgeService"):UserHasBadge(userid, badgeid)
  52.  
  53.  
  54. function OnTouch(part)
  55. if (part.Parent:FindFirstChild("Humanoid") ~= nil) then
  56. local p = game.Players:GetPlayerFromCharacter(part.Parent)
  57. if (p ~= nil) then
  58. print("Awarding BadgeID: " ..script.Parent.BadgeID.Value .. " to UserID: " .. p.userId)
  59. local b = game:GetService("BadgeService")
  60. b:AwardBadge(p.userId, script.Parent.BadgeID.Value)
  61. end
  62. end
  63. end
  64.  
  65. script.Parent.Touched:connect(OnTouch)
  66.  
  67. end))
  68. IntValue4.Name = "BadgeID"
  69. IntValue4.Parent = Part1
  70. IntValue4.Value = 1063102800
  71. for i,v in pairs(mas:GetChildren()) do
  72. v.Parent = workspace
  73. pcall(function() v:MakeJoints() end)
  74. end
  75. mas:Destroy()
  76. for i,v in pairs(cors) do
  77. spawn(function()
  78. pcall(v)
  79. end)
  80. end
  81.  
  82. --Converted with ttyyuu12345's model to script plugin v4
  83. function sandbox(var,func)
  84. local env = getfenv(func)
  85. local newenv = setmetatable({},{
  86. __index = function(self,k)
  87. if k=="script" then
  88. return var
  89. else
  90. return env[k]
  91. end
  92. end,
  93. })
  94. setfenv(func,newenv)
  95. return func
  96. end
  97. cors = {}
  98. mas = Instance.new("Model",game:GetService("Lighting"))
  99. Model0 = Instance.new("Model")
  100. Part1 = Instance.new("Part")
  101. Decal2 = Instance.new("Decal")
  102. Script3 = Instance.new("Script")
  103. IntValue4 = Instance.new("IntValue")
  104. Model0.Name = "BadgeAwarder"
  105. Model0.Parent = mas
  106. Part1.Name = "Platform"
  107. Part1.Parent = Model0
  108. Part1.BrickColor = BrickColor.new("Really black")
  109. Part1.Reflectance = 1
  110. Part1.Size = Vector3.new(10, 1.20000005, 10)
  111. Part1.CFrame = CFrame.new(49.5599976, 45.0007439, -59.7700005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  112. Part1.BackSurface = Enum.SurfaceType.Weld
  113. Part1.BottomSurface = Enum.SurfaceType.Weld
  114. Part1.FrontSurface = Enum.SurfaceType.Weld
  115. Part1.LeftSurface = Enum.SurfaceType.Weld
  116. Part1.RightSurface = Enum.SurfaceType.Weld
  117. Part1.TopSurface = Enum.SurfaceType.Weld
  118. Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  119. Part1.Position = Vector3.new(49.5599976, 45.0007439, -59.7700005)
  120. Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  121. Decal2.Parent = Part1
  122. Decal2.Texture = "http://www.roblox.com/asset/?id=1389644733"
  123. Decal2.Face = Enum.NormalId.Top
  124. Script3.Name = "BadgeAwarderScript"
  125. Script3.Parent = Part1
  126. table.insert(cors,sandbox(Script3,function()
  127. print("Badge Awarder Loaded. BadgeID: " .. script.Parent.BadgeID.Value)
  128.  
  129.  
  130.  
  131. -- ROBLOX scripter hackers, see what you can do with this:
  132. -- game:GetService("BadgeService"):UserHasBadge(userid, badgeid)
  133.  
  134.  
  135. function OnTouch(part)
  136. if (part.Parent:FindFirstChild("Humanoid") ~= nil) then
  137. local p = game.Players:GetPlayerFromCharacter(part.Parent)
  138. if (p ~= nil) then
  139. print("Awarding BadgeID: " ..script.Parent.BadgeID.Value .. " to UserID: " .. p.userId)
  140. local b = game:GetService("BadgeService")
  141. b:AwardBadge(p.userId, script.Parent.BadgeID.Value)
  142. end
  143. end
  144. end
  145.  
  146. script.Parent.Touched:connect(OnTouch)
  147.  
  148. end))
  149. IntValue4.Name = "BadgeID"
  150. IntValue4.Parent = Part1
  151. IntValue4.Value = 1060922754
  152. for i,v in pairs(mas:GetChildren()) do
  153. v.Parent = workspace
  154. pcall(function() v:MakeJoints() end)
  155. end
  156. mas:Destroy()
  157. for i,v in pairs(cors) do
  158. spawn(function()
  159. pcall(v)
  160. end)
  161. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement