Cyculu

Cyculu S7

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