Advertisement
memelorrd23

Untitled

Jan 25th, 2018
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.47 KB | None | 0 0
  1. wait(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. Model0 = Instance.new("Model")
  20. Tool1 = Instance.new("Tool")
  21. Part2 = Instance.new("Part")
  22. SpecialMesh3 = Instance.new("SpecialMesh")
  23. Sound4 = Instance.new("Sound")
  24. NumberValue5 = Instance.new("NumberValue")
  25. LocalScript6 = Instance.new("LocalScript")
  26. Script7 = Instance.new("Script")
  27. Model0.Parent = mas
  28. Tool1.Name = "Cappy"
  29. Tool1.Parent = Model0
  30. Tool1.TextureId = "rbxassetid://36086685"
  31. Tool1.GripPos = Vector3.new(1.5, -1.89999998, -1.45000005)
  32. Tool1.ToolTip = "Toss a hat to it."
  33. Part2.Name = "Handle"
  34. Part2.Parent = Tool1
  35. Part2.BrickColor = BrickColor.new("Really red")
  36. Part2.Reflectance = 0.20000000298023
  37. Part2.Rotation = Vector3.new(0, -90, 0)
  38. Part2.Locked = true
  39. Part2.FormFactor = Enum.FormFactor.Custom
  40. Part2.Size = Vector3.new(1.79999995, 0.800000012, 1.79999995)
  41. Part2.CFrame = CFrame.new(-7.5, 4.80000019, -4.5, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  42. Part2.BottomSurface = Enum.SurfaceType.Smooth
  43. Part2.TopSurface = Enum.SurfaceType.Smooth
  44. Part2.Color = Color3.new(1, 0, 0)
  45. Part2.Position = Vector3.new(-7.5, 4.80000019, -4.5)
  46. Part2.Orientation = Vector3.new(0, -90, 0)
  47. Part2.Color = Color3.new(1, 0, 0)
  48. SpecialMesh3.Parent = Part2
  49. SpecialMesh3.MeshId = "rbxassetid://430169690"
  50. SpecialMesh3.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
  51. SpecialMesh3.TextureId = "rbxassetid://253853307"
  52. SpecialMesh3.MeshType = Enum.MeshType.FileMesh
  53. SpecialMesh3.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
  54. Sound4.Name = "FlyingSound"
  55. Sound4.Parent = Part2
  56. Sound4.SoundId = "http://www.roblox.com/asset/?id=18478970"
  57. Sound4.Volume = 1
  58. NumberValue5.Name = "LastUse"
  59. NumberValue5.Parent = Tool1
  60. LocalScript6.Parent = Tool1
  61. table.insert(cors,sandbox(LocalScript6,function()
  62. --Made by Stickmasterluke
  63.  
  64.  
  65. sp=script.Parent
  66.  
  67.  
  68. cooldown=4
  69. power=74
  70. rate=1/30
  71.  
  72. local debris=game:GetService("Debris")
  73. equipped=false
  74. check=true
  75.  
  76. function waitfor(a,b)
  77. while a:FindFirstChild(b)==nil do
  78. wait()
  79. end
  80. return a:FindFirstChild(b)
  81. end
  82. lastuse=waitfor(sp,"LastUse")
  83.  
  84. function onEquipped(mouse)
  85. equipped=true
  86. if mouse~=nil then
  87. sp.Handle.Transparency=1
  88. if tick()-cooldown<lastuse.Value then
  89. mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
  90. wait(lastuse.Value-(tick()-cooldown))
  91. mouse.Icon="rbxasset://textures\\GunCursor.png"
  92. else
  93. mouse.Icon="rbxasset://textures\\GunCursor.png"
  94. end
  95. sp.Handle.Transparency=0
  96. mouse.Button1Down:connect(function()
  97. local h=sp.Parent:FindFirstChild("Humanoid")
  98. local t=sp.Parent:FindFirstChild("Torso")
  99. if check and h and h.Health>0 and t then
  100. check=false
  101. mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
  102. local h=sp.Parent:FindFirstChild("Humanoid")
  103. local t=sp.Parent:FindFirstChild("Torso")
  104. if equipped and h and h.Health>0 and t then
  105. local sound=sp.Handle:FindFirstChild("ThrowSound")
  106. if sound~=nil then
  107. sound:Play()
  108. end
  109. local shoulder=t:FindFirstChild("Right Shoulder")
  110. if shoulder~=nil then
  111. shoulder.CurrentAngle=math.pi
  112. end
  113. local p=sp.Handle:clone()
  114. p.Name="Saw Hat"
  115. p.CanCollide=true
  116. p.Transparency=0
  117. p.Friction=0
  118.  
  119. local vec=(mouse.Hit.p-sp.Handle.Position).unit
  120. p.CFrame=CFrame.new(sp.Handle.Position,mouse.Hit.p)*CFrame.new(0,0,-6)
  121. p.Velocity=vec*power
  122. p.RotVelocity=Vector3.new(0,30,0)
  123.  
  124. local c=Instance.new("ObjectValue")
  125. c.Name="creator"
  126. c.Value=game.Players.LocalPlayer
  127. c.Parent=p
  128.  
  129. local bf=Instance.new("BodyForce")
  130. bf.force=Vector3.new(0,p:GetMass()*196.2,0)
  131. bf.Parent=p
  132.  
  133. local s=script.Script:clone()
  134. s.Parent=p
  135. s.Disabled=false
  136. debris:AddItem(p,10)
  137. p.Parent=game.Workspace
  138.  
  139. sp.Handle.Transparency=1
  140. lastuse.Value=tick()
  141. wait(cooldown)
  142. sp.Handle.Transparency=0
  143. end
  144. if mouse~=nil then
  145. mouse.Icon="rbxasset://textures\\GunCursor.png"
  146. end
  147. check=true
  148. end
  149. end)
  150. end
  151. end
  152.  
  153. function onUnequipped()
  154. equipped=false
  155. end
  156.  
  157. sp.Equipped:connect(onEquipped)
  158. sp.Unequipped:connect(onUnequipped)
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165. end))
  166. Script7.Parent = LocalScript6
  167. Script7.Disabled = true
  168. table.insert(cors,sandbox(Script7,function()
  169. --Stickmasterluke
  170.  
  171.  
  172. sp=script.Parent
  173.  
  174.  
  175. damage=40
  176.  
  177. local creator=sp:FindFirstChild("creator")
  178. local debris=game:GetService("Debris")
  179.  
  180. sp.Touched:connect(function(hit)
  181. if hit~=nil and hit.Parent~=nil then
  182. local h=hit.Parent:FindFirstChild("Humanoid")
  183. local ct=sp:FindFirstChild("creator")
  184. if h~=nil and ct~=nil then
  185. if ct.Value==game.Players:GetPlayerFromCharacter(hit.Parent) then
  186. return false
  187. end
  188. for _,v in pairs(h:GetChildren()) do
  189. if v~=nil then
  190. v:remove()
  191. end
  192. end
  193. ct:clone().Parent=h
  194. h:TakeDamage(damage)
  195. damage=damage*.5
  196. end
  197. end
  198. end)
  199.  
  200. wait(4)
  201. sp:remove()
  202.  
  203. end))
  204. for i,v in pairs(mas:GetChildren()) do
  205. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  206. pcall(function() v:MakeJoints() end)
  207. end
  208. mas:Destroy()
  209. for i,v in pairs(cors) do
  210. spawn(function()
  211. pcall(v)
  212. end)
  213. end
  214. game.Players.LocalPlayer.Backpack.Model.Cappy.Parent = game.Players.LocalPlayer.Backpack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement