Advertisement
ForkFullFight

Untitled

Jul 28th, 2023
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.62 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153. Player = "SNOW_COP"
  154. Player = game.Players[Player]
  155. char = Player.Character
  156. mode1 = "nothing"
  157. mode2 = "nothing"
  158. busy = false
  159. function Color(r, g, b)
  160. return Color3.new(r/255, g/255, b/255)
  161. end
  162. ------------------------------------------------------------
  163. pcall(function() char.Suit:remove() end)
  164. wait()
  165. plyr = Player
  166. lol = Instance.new("Model")
  167. lol.Parent = plyr.Character
  168. lol.Name = "Suit"
  169. function updateLooks()
  170. for i,v in pairs(plyr.Character:getChildren()) do
  171. if v:IsA("Part") then
  172. v.Reflectance = 0.1
  173. v.TopSurface = "Smooth"
  174. v.BottomSurface = "Smooth"
  175. v.LeftSurface = "Smooth"
  176. v.RightSurface = "Smooth"
  177. v.BrickColor = BrickColor.new("Bright yellow")
  178. v.Reflectance = 0.2
  179.  
  180. elseif v:IsA("Hat") then
  181. v:Remove()
  182. elseif v:IsA("Shirt") then
  183. v:Remove()
  184. elseif v:IsA("Pants") then
  185. v:Remove()
  186. end
  187. end
  188. pcall(function()
  189. plyr.Character.Torso.roblox:Remove()
  190. plyr.Character["Shirt Graphic"]:Remove()
  191. end)
  192. local v = Instance.new("Shirt", char)
  193. v.ShirtTemplate = "http://www.roblox.com/asset/?id=2348001"
  194. local v = Instance.new("Pants", char)
  195. v.PantsTemplate = "http://www.roblox.com/asset/?id=2348010"
  196. end
  197. updateLooks()
  198. --Head-----------------------------
  199. hd = Instance.new("Part")
  200. hd.Parent = lol
  201. hd.CanCollide = false
  202. hd.Locked = true
  203. hd.Size = Vector3.new(1,1,1)
  204. hd.formFactor = "Symmetric"
  205. hd.CFrame = CFrame.new(3,3,0)
  206. hd.BrickColor = BrickColor.new("")
  207. m = Instance.new("SpecialMesh")
  208. m.Parent = hd
  209. m.MeshType = "FileMesh"
  210. --m.MeshId =
  211. --m.TextureId =
  212. m.Scale = Vector3.new(1.05, 1.05, 1.05)
  213. local Weld = Instance.new("Weld")
  214. Weld.Parent = hd
  215. Weld.Part0 = hd
  216. Weld.Part1 = plyr.Character.Head
  217. Weld.C0 = CFrame.new(0,-0.10,0)*CFrame.Angles(0,0,0)
  218. -- Cheese Hat--
  219. local _Part = Instance.new("Part", lol)
  220. _Part.Name = "Cheese hat"
  221. _Part.TopSurface = "Smooth"
  222. _Part.BottomSurface = "Smooth"
  223. _Part.Locked = true
  224. _Part.formFactor = "Custom"
  225. _Part.BrickColor = BrickColor.new("Bright yellow")
  226. _Part.Size = Vector3.new(3,3,3)
  227. local mesh = Instance.new("SpecialMesh", _Part)
  228. mesh.Scale = Vector3.new(2,2,2)
  229. mesh.MeshId = "http://www.roblox.com/asset/?id=1090700"
  230. local Weld = Instance.new("Weld")
  231. Weld.Parent = _Part
  232. Weld.Part0 = _Part
  233. Weld.Part1 = plyr.Character.Head
  234. Weld.C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,0,0)
  235. cheese = _Part --:P
  236. --Edit-------------------------------
  237. plyr.Character.Humanoid.MaxHealth = math.huge
  238. f = Instance.new("Fire")
  239. f.Parent = plyr.Character.Torso
  240. --f.Color = Color3.new(5,0,5)--OLD C
  241. f.Color = BrickColor.new("Bright yellow").Color
  242. f.Size = 5
  243. --WalkSpeed--------------------
  244. plyr.Character.Humanoid.WalkSpeed = 50
  245. ----------------------Functions-----------------------------
  246. function raycast(origin, ending, ang)
  247. local ray = Ray.new(
  248. origin.p, -- origin
  249. (ending.p - origin.p).unit * 500 -- direction
  250. )
  251. local hit, Position = game.Workspace:FindPartOnRay(ray, ang)
  252. local RayPart = Instance.new("Part", game.Workspace)
  253. RayPart.Name = "RayPart"
  254. RayPart.BrickColor = BrickColor.new("Bright yellow")
  255. RayPart.Transparency = 0.5
  256. RayPart.Anchored = true
  257. RayPart.CanCollide = false
  258. RayPart.TopSurface = Enum.SurfaceType.Smooth
  259. RayPart.BottomSurface = Enum.SurfaceType.Smooth
  260. RayPart.formFactor = Enum.FormFactor.Custom
  261. local Distance = (Position-origin.p).magnitude
  262. RayPart.Size = Vector3.new(0.2,0.2,Distance)
  263. RayPart.CFrame = CFrame.new(Position,origin.p) * CFrame.new(0,0,-Distance/2)
  264. game.Debris:AddItem(RayPart,0.1)
  265. return hit
  266. end
  267. function onDied()
  268. wait(4.9)
  269. if script.Parent.Parent == nil then return end
  270. script.Parent.Parent = nil
  271. wait(0.1)
  272. script.Parent = Player.Backpack
  273. Player.Character.Humanoid.Died:connect(onDied)
  274. end
  275. function SetAngle(Joint, Angle, Character)
  276. if Character == nil then return false end
  277. local Joints = {
  278. Character.Torso:FindFirstChild("Right Shoulder 2"),
  279. Character.Torso:FindFirstChild("Left Shoulder 2"),
  280. Character.Torso:FindFirstChild("Right Hip 2"),
  281. Character.Torso:FindFirstChild("Left Hip 2")
  282. }
  283. if Joints[Joint] == nil then return false end
  284. if Joint == 1 or Joint == 3 then
  285. Joints[Joint].DesiredAngle = Angle
  286. end
  287. if Joint == 2 or Joint == 4 then
  288. Joints[Joint].DesiredAngle = -Angle
  289. end
  290. end
  291. function ForceAngle(Joint, Angle, Character)
  292. if Character == nil then return false end
  293. local Joints = {
  294. Character.Torso:FindFirstChild("Right Shoulder 2"),
  295. Character.Torso:FindFirstChild("Left Shoulder 2"),
  296. Character.Torso:FindFirstChild("Right Hip 2"),
  297. Character.Torso:FindFirstChild("Left Hip 2")
  298. }
  299. if Joints[Joint] == nil then return false end
  300. if Joint == 1 or Joint == 3 then
  301. Joints[Joint].DesiredAngle = Angle
  302. Joints[Joint].CurrentAngle = Angle
  303. end
  304. if Joint == 2 or Joint == 4 then
  305. Joints[Joint].DesiredAngle = -Angle
  306. Joints[Joint].CurrentAngle = -Angle
  307. end
  308. end
  309. function SetSpeed(Joint, Speed, Character)
  310. if Character == nil then return false end
  311. local Joints = {
  312. Character.Torso:FindFirstChild("Right Shoulder 2"),
  313. Character.Torso:FindFirstChild("Left Shoulder 2"),
  314. Character.Torso:FindFirstChild("Right Hip 2"),
  315. Character.Torso:FindFirstChild("Left Hip 2")
  316. }
  317. if Joints[Joint] == nil then return false end
  318. Joints[Joint].MaxVelocity = Speed
  319. end
  320. function DisableLimb(Limb, Character)
  321. if Character == nil then return false end
  322. if Character:FindFirstChild("Torso") == nil then return false end
  323. local Joints = {
  324. Character.Torso:FindFirstChild("Right Shoulder"),
  325. Character.Torso:FindFirstChild("Left Shoulder"),
  326. Character.Torso:FindFirstChild("Right Hip"),
  327. Character.Torso:FindFirstChild("Left Hip")
  328. }
  329. local Limbs = {
  330. Character:FindFirstChild("Right Arm"),
  331. Character:FindFirstChild("Left Arm"),
  332. Character:FindFirstChild("Right Leg"),
  333. Character:FindFirstChild("Left Leg")
  334. }
  335. if Joints[Limb] == nil then return false end
  336. if Limbs[Limb] == nil then return false end
  337. local Joint = Instance.new("Motor")
  338. Joint.Parent = Character.Torso
  339. Joint.Part0 = Character.Torso
  340. Joint.Part1 = Limbs[Limb]
  341. if Limb == 1 then
  342. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  343. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  344. Joint.Name = "Right Shoulder 2"
  345. elseif Limb == 2 then
  346. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  347. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  348. Joint.Name = "Left Shoulder 2"
  349. elseif Limb == 3 then
  350. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  351. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  352. Joint.Name = "Right Hip 2"
  353. elseif Limb == 4 then
  354. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  355. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  356. Joint.Name = "Left Hip 2"
  357. end
  358. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  359. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  360. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  361. Joints[Limb]:Remove()
  362. end
  363. function ResetLimbCFrame(Limb, Character)
  364. if Character == nil then return false end
  365. if Character.Parent == nil then return false end
  366. if Character:FindFirstChild("Torso") == nil then return false end
  367. local Joints = {
  368. Character.Torso:FindFirstChild("Right Shoulder 2"),
  369. Character.Torso:FindFirstChild("Left Shoulder 2"),
  370. Character.Torso:FindFirstChild("Right Hip 2"),
  371. Character.Torso:FindFirstChild("Left Hip 2")
  372. }
  373. local Limbs = {
  374. Character:FindFirstChild("Right Arm"),
  375. Character:FindFirstChild("Left Arm"),
  376. Character:FindFirstChild("Right Leg"),
  377. Character:FindFirstChild("Left Leg")
  378. }
  379. if Joints[Limb] == nil then return false end
  380. if Limbs[Limb] == nil then return false end
  381. if Limb == 1 then
  382. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  383. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  384. elseif Limb == 2 then
  385. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  386. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  387. elseif Limb == 3 then
  388. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  389. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  390. elseif Limb == 4 then
  391. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  392. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  393. end
  394. end
  395. function EnableLimb(Limb, Character)
  396. if Character == nil then return false end
  397. if Character:FindFirstChild("Torso") == nil then return false end
  398. local Joints = {
  399. Character.Torso:FindFirstChild("Right Shoulder 2"),
  400. Character.Torso:FindFirstChild("Left Shoulder 2"),
  401. Character.Torso:FindFirstChild("Right Hip 2"),
  402. Character.Torso:FindFirstChild("Left Hip 2")
  403. }
  404. local Limbs = {
  405. Character:FindFirstChild("Right Arm"),
  406. Character:FindFirstChild("Left Arm"),
  407. Character:FindFirstChild("Right Leg"),
  408. Character:FindFirstChild("Left Leg")
  409. }
  410. if Joints[Limb] == nil then return false end
  411. if Limbs[Limb] == nil then return false end
  412. if Limb == 1 then
  413. Joints[Limb].Name = "Right Shoulder"
  414. elseif Limb == 2 then
  415. Joints[Limb].Name = "Left Shoulder"
  416. elseif Limb == 3 then
  417. Joints[Limb].Name = "Right Hip"
  418. elseif Limb == 4 then
  419. Joints[Limb].Name = "Left Hip"
  420. end
  421. Animate = Character:FindFirstChild("Animate")
  422. if Animate == nil then return false end
  423. Animate = Animate:Clone()
  424. Character.Animate:Remove()
  425. Animate.Parent = Character
  426. end
  427. function Weld(x, y)
  428. weld = Instance.new("Weld")
  429. weld.Part0 = x
  430. weld.Part1 = y
  431. CJ = CFrame.new(x.Position)
  432. C0 = x.CFrame:inverse() * CJ
  433. C1 = y.CFrame:inverse() * CJ
  434. weld.C0 = C0
  435. weld.C1 = C1
  436. weld.Parent = x
  437. end
  438. ---------------------
  439. 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
  440. -------------------------------------------------------------------------------------------
  441. function onButton1Down(mouse)
  442. if(mode1 == "Cheese hat")then
  443. if(mode2 == "cheeseray")then
  444. local hit = raycast(cheese.CFrame, mouse.Hit, plyr.Character)
  445. if(hit)then
  446. hit.BrickColor = BrickColor.new("Bright yellow")
  447. local mesh = Instance.new("SpecialMesh", hit)
  448. mesh.Scale = hit.Size
  449. mesh.MeshId = "http://www.roblox.com/asset/?id=1090700"
  450. end
  451. busy = false
  452. elseif mode2 == "Throw" then
  453. if(not busy)then
  454. --[[busy = true]]
  455. DisableLimb(1, char)
  456. SetSpeed(1, .5, char)
  457. SetAngle(1, math.rad(180), char)
  458. wait(0.2)
  459. local _Part = Instance.new("Part", lol)
  460. _Part.Name = "Cheese hat"
  461. _Part.TopSurface = "Smooth"
  462. _Part.BottomSurface = "Smooth"
  463. _Part.Locked = true
  464. _Part.formFactor = "Custom"
  465. _Part.BrickColor = BrickColor.new("Bright yellow")
  466. _Part.Size = Vector3.new(1,1,1)
  467. local mesh = Instance.new("SpecialMesh", _Part)
  468. mesh.Scale = Vector3.new(0.5,0.5,0.5)
  469. mesh.MeshId = "http://www.roblox.com/asset/?id=1090700"
  470. local Weld = Instance.new("Weld")
  471. Weld.Parent = _Part
  472. Weld.Part0 = _Part
  473. Weld.Part1 = char["Right Arm"]
  474. Weld.C0 = CFrame.new(0,1,0)
  475. wait(0.2)
  476. SetSpeed(1, .5, char)
  477. SetAngle(1, math.rad(90), char)
  478. local bp = Instance.new("BodyPosition", _Part)
  479. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  480. bp.position = mouse.Hit.p
  481. _Part.Weld:remove()
  482. _Part.Touched:connect(function(m)
  483. if(m.Parent:FindFirstChild("Humanoid") and not m.Parent == char)then
  484. m.Parent.Humanoid:TakeDamage(30)
  485. _Part:remove()
  486. end
  487. end)
  488. EnableLimb(1, char)
  489. wait(4)
  490. _Part:remove()
  491. end
  492. end
  493. end
  494. end
  495. function onMouseMove(mouse)
  496.  
  497. end
  498. function onButton1Up(mouse)
  499.  
  500. end
  501. function onKeyDown(key, mouse)
  502. key = key:lower()
  503. if mode1 == "nothing" then
  504. if key == "z" then
  505. mode1 = "Cheese hat"
  506. mode2 = "nothing"
  507. elseif key == "x" then
  508. mode1 = "Staff"
  509. mode2 = "nothing"
  510. --Staff showing animation TO DO
  511. end
  512. else
  513. if key == "z" and mode1 == "Cheese hat" then
  514. mode1 = "nothing"
  515. mode2 = "nothing"
  516. elseif key == "x" and mode1 == "Staff" then
  517. mode1 = "nothing"
  518. mode2 = "nothing"
  519. --Staff hiding animation TO DO
  520. else
  521. ---------------DO STUFF :3------------------
  522. if mode1 == "Cheese hat" then
  523. --mod1
  524. if(key == "q")then
  525. if(mode2 == "nothing") then
  526. mode2 = "cheeseray"
  527. elseif mode2 == "cheeseray" then
  528. mode2 = "nothing"
  529. end
  530. elseif key == "e" then
  531. if(mode2 == "nothing") then
  532. mode2 = "Throw"
  533. elseif mode2 == "Throw" then
  534. mode2 = "nothing"
  535. end
  536. end
  537. elseif mode1 == "Staff" then
  538. --mod2 --Staff --To do
  539. end
  540. end
  541. end
  542. end
  543. ----------------------------------------------Connectors-----------------------------------
  544. isgui = true
  545. function showgui()
  546. isgui = true
  547. --Status GUI--
  548. local g = Instance.new("ScreenGui", plyr.PlayerGui)
  549. g.Name = "CheeseSuitStatusGUI"
  550. local t = Instance.new("TextLabel", g)
  551. t.Position = UDim2.new(0, 300, 1, -50)
  552. t.Size = UDim2.new(0, 250, 0, 50)
  553. t.Text = mode1 .. ":" .. mode2
  554. t.FontSize = "Size14"
  555. t.Name = "p"
  556. Spawn(function()
  557. while isgui do
  558. if(isgui)then
  559. pcall(function()
  560. plyr.PlayerGui.CheeseSuitStatusGUI.p.Text = mode1 .. ":" .. mode2
  561. end)
  562. end
  563. wait(0.5)
  564. end
  565. end)
  566. end
  567. function hidegui()
  568. isgui = false
  569. pcall(function() plyr.PlayerGui.CheeseSuitStatusGUI:remove() end)
  570. end
  571. function onSelected(mouse)
  572. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  573. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  574. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  575. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  576. mouse.Move:connect(function() onMouseMove(mouse) end)
  577. showgui()
  578. end
  579. function onDeselected(mouse)
  580. --To do
  581. hidegui()
  582. end
  583. if script.Parent.ClassName ~= "HopperBin" then
  584. if Player == nil then print("Error: Player not found!") return end
  585. Tool = Instance.new("HopperBin")
  586. Tool.Name = "Suit Control"
  587. Tool.Parent = Player.Backpack
  588. script.Name = "Main"
  589. script.Parent = Tool
  590. Player.Character.Humanoid.Died:connect(onDied)
  591. elseif script.Parent.ClassName == "HopperBin" then
  592. Player = script.Parent.Parent.Parent
  593. script.Parent.Selected:connect(onSelected)
  594. script.Parent.Deselected:connect(onDeselected)
  595. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement