Advertisement
memberhero

Untitled

May 1st, 2016
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.19 KB | None | 0 0
  1. Player = "memberhero"
  2. Player = game.Players[Player]
  3. char = Player.Character
  4. mode1 = "nothing"
  5. mode2 = "nothing"
  6. busy = false
  7. function Color(r, g, b)
  8. return Color3.new(r/255, g/255, b/255)
  9. end
  10. ------------------------------------------------------------
  11. pcall(function() char.Suit:remove() end)
  12. wait()
  13. plyr = Player
  14. lol = Instance.new("Model")
  15. lol.Parent = plyr.Character
  16. lol.Name = "Suit"
  17. function updateLooks()
  18. for i,v in pairs(plyr.Character:getChildren()) do
  19. if v:IsA("Part") then
  20. v.Reflectance = 0.1
  21. v.TopSurface = "Smooth"
  22. v.BottomSurface = "Smooth"
  23. v.LeftSurface = "Smooth"
  24. v.RightSurface = "Smooth"
  25. v.BrickColor = BrickColor.new("Bright yellow")
  26. v.Reflectance = 0.2
  27.  
  28. elseif v:IsA("Hat") then
  29. v:Remove()
  30. elseif v:IsA("Shirt") then
  31. v:Remove()
  32. elseif v:IsA("Pants") then
  33. v:Remove()
  34. end
  35. end
  36. pcall(function()
  37. plyr.Character.Torso.roblox:Remove()
  38. plyr.Character["Shirt Graphic"]:Remove()
  39. end)
  40. local v = Instance.new("Shirt", char)
  41. v.ShirtTemplate = "http://www.roblox.com/asset/?id=2348001"
  42. local v = Instance.new("Pants", char)
  43. v.PantsTemplate = "http://www.roblox.com/asset/?id=2348010"
  44. end
  45. updateLooks()
  46. --Head-----------------------------
  47. hd = Instance.new("Part")
  48. hd.Parent = lol
  49. hd.CanCollide = false
  50. hd.Locked = true
  51. hd.Size = Vector3.new(1,1,1)
  52. hd.formFactor = "Symmetric"
  53. hd.CFrame = CFrame.new(3,3,0)
  54. hd.BrickColor = BrickColor.new("")
  55. m = Instance.new("SpecialMesh")
  56. m.Parent = hd
  57. m.MeshType = "FileMesh"
  58. --m.MeshId =
  59. --m.TextureId =
  60. m.Scale = Vector3.new(1.05, 1.05, 1.05)
  61. local Weld = Instance.new("Weld")
  62. Weld.Parent = hd
  63. Weld.Part0 = hd
  64. Weld.Part1 = plyr.Character.Head
  65. Weld.C0 = CFrame.new(0,-0.10,0)*CFrame.Angles(0,0,0)
  66. -- Cheese Hat--
  67. local _Part = Instance.new("Part", lol)
  68. _Part.Name = "Cheese hat"
  69. _Part.TopSurface = "Smooth"
  70. _Part.BottomSurface = "Smooth"
  71. _Part.Locked = true
  72. _Part.formFactor = "Custom"
  73. _Part.BrickColor = BrickColor.new("Bright yellow")
  74. _Part.Size = Vector3.new(3,3,3)
  75. local mesh = Instance.new("SpecialMesh", _Part)
  76. mesh.Scale = Vector3.new(2,2,2)
  77. mesh.MeshId = "http://www.roblox.com/asset/?id=1090700"
  78. local Weld = Instance.new("Weld")
  79. Weld.Parent = _Part
  80. Weld.Part0 = _Part
  81. Weld.Part1 = plyr.Character.Head
  82. Weld.C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,0,0)
  83. cheese = _Part --:P
  84. --Edit-------------------------------
  85. plyr.Character.Humanoid.MaxHealth = math.huge
  86. f = Instance.new("Fire")
  87. f.Parent = plyr.Character.Torso
  88. --f.Color = Color3.new(5,0,5)--OLD C
  89. f.Color = BrickColor.new("Bright yellow").Color
  90. f.Size = 5
  91. --WalkSpeed--------------------
  92. plyr.Character.Humanoid.WalkSpeed = 50
  93. ----------------------Functions-----------------------------
  94. function raycast(origin, ending, ang)
  95. local ray = Ray.new(
  96. origin.p, -- origin
  97. (ending.p - origin.p).unit * 500 -- direction
  98. )
  99. local hit, Position = game.Workspace:FindPartOnRay(ray, ang)
  100. local RayPart = Instance.new("Part", game.Workspace)
  101. RayPart.Name = "RayPart"
  102. RayPart.BrickColor = BrickColor.new("Bright yellow")
  103. RayPart.Transparency = 0.5
  104. RayPart.Anchored = true
  105. RayPart.CanCollide = false
  106. RayPart.TopSurface = Enum.SurfaceType.Smooth
  107. RayPart.BottomSurface = Enum.SurfaceType.Smooth
  108. RayPart.formFactor = Enum.FormFactor.Custom
  109. local Distance = (Position-origin.p).magnitude
  110. RayPart.Size = Vector3.new(0.2,0.2,Distance)
  111. RayPart.CFrame = CFrame.new(Position,origin.p) * CFrame.new(0,0,-Distance/2)
  112. game.Debris:AddItem(RayPart,0.1)
  113. return hit
  114. end
  115. function onDied()
  116. wait(4.9)
  117. if script.Parent.Parent == nil then return end
  118. script.Parent.Parent = nil
  119. wait(0.1)
  120. script.Parent = Player.Backpack
  121. Player.Character.Humanoid.Died:connect(onDied)
  122. end
  123. function SetAngle(Joint, Angle, Character)
  124. if Character == nil then return false end
  125. local Joints = {
  126. Character.Torso:FindFirstChild("Right Shoulder 2"),
  127. Character.Torso:FindFirstChild("Left Shoulder 2"),
  128. Character.Torso:FindFirstChild("Right Hip 2"),
  129. Character.Torso:FindFirstChild("Left Hip 2")
  130. }
  131. if Joints[Joint] == nil then return false end
  132. if Joint == 1 or Joint == 3 then
  133. Joints[Joint].DesiredAngle = Angle
  134. end
  135. if Joint == 2 or Joint == 4 then
  136. Joints[Joint].DesiredAngle = -Angle
  137. end
  138. end
  139. function ForceAngle(Joint, Angle, Character)
  140. if Character == nil then return false end
  141. local Joints = {
  142. Character.Torso:FindFirstChild("Right Shoulder 2"),
  143. Character.Torso:FindFirstChild("Left Shoulder 2"),
  144. Character.Torso:FindFirstChild("Right Hip 2"),
  145. Character.Torso:FindFirstChild("Left Hip 2")
  146. }
  147. if Joints[Joint] == nil then return false end
  148. if Joint == 1 or Joint == 3 then
  149. Joints[Joint].DesiredAngle = Angle
  150. Joints[Joint].CurrentAngle = Angle
  151. end
  152. if Joint == 2 or Joint == 4 then
  153. Joints[Joint].DesiredAngle = -Angle
  154. Joints[Joint].CurrentAngle = -Angle
  155. end
  156. end
  157. function SetSpeed(Joint, Speed, Character)
  158. if Character == nil then return false end
  159. local Joints = {
  160. Character.Torso:FindFirstChild("Right Shoulder 2"),
  161. Character.Torso:FindFirstChild("Left Shoulder 2"),
  162. Character.Torso:FindFirstChild("Right Hip 2"),
  163. Character.Torso:FindFirstChild("Left Hip 2")
  164. }
  165. if Joints[Joint] == nil then return false end
  166. Joints[Joint].MaxVelocity = Speed
  167. end
  168. function DisableLimb(Limb, Character)
  169. if Character == nil then return false end
  170. if Character:FindFirstChild("Torso") == nil then return false end
  171. local Joints = {
  172. Character.Torso:FindFirstChild("Right Shoulder"),
  173. Character.Torso:FindFirstChild("Left Shoulder"),
  174. Character.Torso:FindFirstChild("Right Hip"),
  175. Character.Torso:FindFirstChild("Left Hip")
  176. }
  177. local Limbs = {
  178. Character:FindFirstChild("Right Arm"),
  179. Character:FindFirstChild("Left Arm"),
  180. Character:FindFirstChild("Right Leg"),
  181. Character:FindFirstChild("Left Leg")
  182. }
  183. if Joints[Limb] == nil then return false end
  184. if Limbs[Limb] == nil then return false end
  185. local Joint = Instance.new("Motor")
  186. Joint.Parent = Character.Torso
  187. Joint.Part0 = Character.Torso
  188. Joint.Part1 = Limbs[Limb]
  189. if Limb == 1 then
  190. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  191. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  192. Joint.Name = "Right Shoulder 2"
  193. elseif Limb == 2 then
  194. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  195. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  196. Joint.Name = "Left Shoulder 2"
  197. elseif Limb == 3 then
  198. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  199. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  200. Joint.Name = "Right Hip 2"
  201. elseif Limb == 4 then
  202. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  203. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  204. Joint.Name = "Left Hip 2"
  205. end
  206. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  207. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  208. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  209. Joints[Limb]:Remove()
  210. end
  211. function ResetLimbCFrame(Limb, Character)
  212. if Character == nil then return false end
  213. if Character.Parent == nil then return false end
  214. if Character:FindFirstChild("Torso") == nil then return false end
  215. local Joints = {
  216. Character.Torso:FindFirstChild("Right Shoulder 2"),
  217. Character.Torso:FindFirstChild("Left Shoulder 2"),
  218. Character.Torso:FindFirstChild("Right Hip 2"),
  219. Character.Torso:FindFirstChild("Left Hip 2")
  220. }
  221. local Limbs = {
  222. Character:FindFirstChild("Right Arm"),
  223. Character:FindFirstChild("Left Arm"),
  224. Character:FindFirstChild("Right Leg"),
  225. Character:FindFirstChild("Left Leg")
  226. }
  227. if Joints[Limb] == nil then return false end
  228. if Limbs[Limb] == nil then return false end
  229. if Limb == 1 then
  230. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  231. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  232. elseif Limb == 2 then
  233. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  234. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  235. elseif Limb == 3 then
  236. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  237. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  238. elseif Limb == 4 then
  239. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  240. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  241. end
  242. end
  243. function EnableLimb(Limb, Character)
  244. if Character == nil then return false end
  245. if Character:FindFirstChild("Torso") == nil then return false end
  246. local Joints = {
  247. Character.Torso:FindFirstChild("Right Shoulder 2"),
  248. Character.Torso:FindFirstChild("Left Shoulder 2"),
  249. Character.Torso:FindFirstChild("Right Hip 2"),
  250. Character.Torso:FindFirstChild("Left Hip 2")
  251. }
  252. local Limbs = {
  253. Character:FindFirstChild("Right Arm"),
  254. Character:FindFirstChild("Left Arm"),
  255. Character:FindFirstChild("Right Leg"),
  256. Character:FindFirstChild("Left Leg")
  257. }
  258. if Joints[Limb] == nil then return false end
  259. if Limbs[Limb] == nil then return false end
  260. if Limb == 1 then
  261. Joints[Limb].Name = "Right Shoulder"
  262. elseif Limb == 2 then
  263. Joints[Limb].Name = "Left Shoulder"
  264. elseif Limb == 3 then
  265. Joints[Limb].Name = "Right Hip"
  266. elseif Limb == 4 then
  267. Joints[Limb].Name = "Left Hip"
  268. end
  269. Animate = Character:FindFirstChild("Animate")
  270. if Animate == nil then return false end
  271. Animate = Animate:Clone()
  272. Character.Animate:Remove()
  273. Animate.Parent = Character
  274. end
  275. function Weld(x, y)
  276. weld = Instance.new("Weld")
  277. weld.Part0 = x
  278. weld.Part1 = y
  279. CJ = CFrame.new(x.Position)
  280. C0 = x.CFrame:inverse() * CJ
  281. C1 = y.CFrame:inverse() * CJ
  282. weld.C0 = C0
  283. weld.C1 = C1
  284. weld.Parent = x
  285. end
  286. ---------------------
  287. function tagHumanoid(humanoid) local tag = Instance.new("ObjectValue") tag.Name = "creator" tag.Value = Player tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:FindFirstChild("creator") if tag ~= nil then tag:Remove() end end end
  288. -------------------------------------------------------------------------------------------
  289. function onButton1Down(mouse)
  290. if(mode1 == "Cheese hat")then
  291. if(mode2 == "cheeseray")then
  292. local hit = raycast(cheese.CFrame, mouse.Hit, plyr.Character)
  293. if(hit)then
  294. hit.BrickColor = BrickColor.new("Bright yellow")
  295. local mesh = Instance.new("SpecialMesh", hit)
  296. mesh.Scale = hit.Size
  297. mesh.MeshId = "http://www.roblox.com/asset/?id=1090700"
  298. end
  299. busy = false
  300. elseif mode2 == "Throw" then
  301. if(not busy)then
  302. --[[busy = true]]
  303. DisableLimb(1, char)
  304. SetSpeed(1, .5, char)
  305. SetAngle(1, math.rad(180), char)
  306. wait(0.2)
  307. local _Part = Instance.new("Part", lol)
  308. _Part.Name = "Cheese hat"
  309. _Part.TopSurface = "Smooth"
  310. _Part.BottomSurface = "Smooth"
  311. _Part.Locked = true
  312. _Part.formFactor = "Custom"
  313. _Part.BrickColor = BrickColor.new("Bright yellow")
  314. _Part.Size = Vector3.new(1,1,1)
  315. local mesh = Instance.new("SpecialMesh", _Part)
  316. mesh.Scale = Vector3.new(0.5,0.5,0.5)
  317. mesh.MeshId = "http://www.roblox.com/asset/?id=1090700"
  318. local Weld = Instance.new("Weld")
  319. Weld.Parent = _Part
  320. Weld.Part0 = _Part
  321. Weld.Part1 = char["Right Arm"]
  322. Weld.C0 = CFrame.new(0,1,0)
  323. wait(0.2)
  324. SetSpeed(1, .5, char)
  325. SetAngle(1, math.rad(90), char)
  326. local bp = Instance.new("BodyPosition", _Part)
  327. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  328. bp.position = mouse.Hit.p
  329. _Part.Weld:remove()
  330. _Part.Touched:connect(function(m)
  331. if(m.Parent:FindFirstChild("Humanoid") and not m.Parent == char)then
  332. m.Parent.Humanoid:TakeDamage(30)
  333. _Part:remove()
  334. end
  335. end)
  336. EnableLimb(1, char)
  337. wait(4)
  338. _Part:remove()
  339. end
  340. end
  341. end
  342. end
  343. function onMouseMove(mouse)
  344.  
  345. end
  346. function onButton1Up(mouse)
  347.  
  348. end
  349. function onKeyDown(key, mouse)
  350. key = key:lower()
  351. if mode1 == "nothing" then
  352. if key == "z" then
  353. mode1 = "Cheese hat"
  354. mode2 = "nothing"
  355. elseif key == "x" then
  356. mode1 = "Staff"
  357. mode2 = "nothing"
  358. --Staff showing animation TO DO
  359. end
  360. else
  361. if key == "z" and mode1 == "Cheese hat" then
  362. mode1 = "nothing"
  363. mode2 = "nothing"
  364. elseif key == "x" and mode1 == "Staff" then
  365. mode1 = "nothing"
  366. mode2 = "nothing"
  367. --Staff hiding animation TO DO
  368. else
  369. ---------------DO STUFF :3------------------
  370. if mode1 == "Cheese hat" then
  371. --mod1
  372. if(key == "q")then
  373. if(mode2 == "nothing") then
  374. mode2 = "cheeseray"
  375. elseif mode2 == "cheeseray" then
  376. mode2 = "nothing"
  377. end
  378. elseif key == "e" then
  379. if(mode2 == "nothing") then
  380. mode2 = "Throw"
  381. elseif mode2 == "Throw" then
  382. mode2 = "nothing"
  383. end
  384. end
  385. elseif mode1 == "Staff" then
  386. --mod2 --Staff --To do
  387. end
  388. end
  389. end
  390. end
  391. ----------------------------------------------Connectors-----------------------------------
  392. isgui = true
  393. function showgui()
  394. isgui = true
  395. --Status GUI--
  396. local g = Instance.new("ScreenGui", plyr.PlayerGui)
  397. g.Name = "CheeseSuitStatusGUI"
  398. local t = Instance.new("TextLabel", g)
  399. t.Position = UDim2.new(0, 300, 1, -50)
  400. t.Size = UDim2.new(0, 250, 0, 50)
  401. t.Text = mode1 .. ":" .. mode2
  402. t.FontSize = "Size14"
  403. t.Name = "p"
  404. Spawn(function()
  405. while isgui do
  406. if(isgui)then
  407. pcall(function()
  408. plyr.PlayerGui.CheeseSuitStatusGUI.p.Text = mode1 .. ":" .. mode2
  409. end)
  410. end
  411. wait(0.5)
  412. end
  413. end)
  414. end
  415. function hidegui()
  416. isgui = false
  417. pcall(function() plyr.PlayerGui.CheeseSuitStatusGUI:remove() end)
  418. end
  419. function onSelected(mouse)
  420. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  421. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  422. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  423. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  424. mouse.Move:connect(function() onMouseMove(mouse) end)
  425. showgui()
  426. end
  427. function onDeselected(mouse)
  428. --To do
  429. hidegui()
  430. end
  431. if script.Parent.ClassName ~= "HopperBin" then
  432. if Player == nil then print("Error: Player not found!") return end
  433. Tool = Instance.new("HopperBin")
  434. Tool.Name = "Suit Control"
  435. Tool.Parent = Player.Backpack
  436. script.Name = "Main"
  437. script.Parent = Tool
  438. Player.Character.Humanoid.Died:connect(onDied)
  439. elseif script.Parent.ClassName == "HopperBin" then
  440. Player = script.Parent.Parent.Parent
  441. script.Parent.Selected:connect(onSelected)
  442. script.Parent.Deselected:connect(onDeselected)
  443. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement