Advertisement
StarzoZero

Roblox FE Cococola

Dec 21st, 2018
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.84 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87.  
  88. --Made by Ahtoh13131423144235, Rufus14
  89. --Credit to ttyyuu12345 for the model to script plugin v4
  90. --Credit to Rufus14 for helping
  91.  
  92. --[[
  93. Change log:
  94. -Added u attack
  95. --]]
  96.  
  97. wait(2)
  98.  
  99. local player = owner
  100. local char = player.Character
  101. local canAttack = false
  102. local damage = false
  103. local rootJointC0 = char.HumanoidRootPart.RootJoint.C0
  104. char.Torso["Right Shoulder"]:Remove()
  105.  
  106. --Converted with ttyyuu12345's model to script plugin v4
  107. function sandbox(var,func)
  108. local env = getfenv(func)
  109. local newenv = setmetatable({},{
  110. __index = function(self,k)
  111. if k=="script" then
  112. return var
  113. else
  114. return env[k]
  115. end
  116. end,
  117. })
  118. setfenv(func,newenv)
  119. return func
  120. end
  121. cors = {}
  122. mas = Instance.new("Model",game:GetService("Lighting"))
  123. Part0 = Instance.new("Part")
  124. Part0:BreakJoints()
  125. Weld1 = Instance.new("Weld")
  126. Weld2 = Instance.new("Weld")
  127. Weld3 = Instance.new("Weld")
  128. SpecialMesh2 = Instance.new("SpecialMesh")
  129. Part0.Name = "Handle"
  130. Part0.Parent = mas
  131. Part0.BrickColor = BrickColor.new("Mid gray")
  132. Part0.Rotation = Vector3.new(-180, 0, 180)
  133. Part0.FormFactor = Enum.FormFactor.Plate
  134. Part0.Size = Vector3.new(1, 1.20000005, 1)
  135. Part0.CFrame = CFrame.new(-18.1699982, 0.600000024, -0.639984131, -1, -1.21401766e-17, -2.78761293e-23, -1.21401766e-17, 1, 1.21401766e-17, 2.78761293e-23, 1.21401766e-17, -1)
  136. Part0.BottomSurface = Enum.SurfaceType.Smooth
  137. Part0.TopSurface = Enum.SurfaceType.Smooth
  138. Part0.Color = Color3.new(0.803922, 0.803922, 0.803922)
  139. Part0.Position = Vector3.new(-18.1699982, 0.600000024, -0.639984131)
  140. Part0.Orientation = Vector3.new(0, -180, 0)
  141. Part0.Color = Color3.new(0.803922, 0.803922, 0.803922)
  142. Weld1.C0 = Weld1.C0 * CFrame.new(0,-1,-0.5) * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
  143. Weld1.Parent = char["Right Arm"]
  144. Weld1.Part0 = char["Right Arm"]
  145. Weld1.Part1 = Part0
  146. Weld2.C0 = CFrame.new(1.5,0.5,0)
  147. Weld2.C1 = CFrame.new(0,0.5,0)
  148. Weld2.Parent = char.Torso
  149. Weld2.Part0 = char.Torso
  150. Weld2.Part1 = char["Right Arm"]
  151. Weld3.C0 = CFrame.new(-1.5,0.5,0)
  152. Weld3.C1 = CFrame.new(0,0.5,0)
  153. Weld3.Parent = char.Torso
  154. Weld3.Part0 = char.Torso
  155. Weld3.Part1 = nil
  156. SpecialMesh2.Parent = Part0
  157. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=10470609"
  158. SpecialMesh2.Scale = Vector3.new(1.5, 1.5, 1.5)
  159. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=10483355"
  160. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  161. SpecialMesh2.Scale = Vector3.new(1.5, 1.5, 1.5)
  162. for i,v in pairs(mas:GetChildren()) do
  163. v.Parent = char
  164. pcall(function() v:MakeJoints() end)
  165. end
  166. mas:Destroy()
  167. for i,v in pairs(cors) do
  168. spawn(function()
  169. pcall(v)
  170. end)
  171. end
  172.  
  173. for i = 1,15 do
  174. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  175. wait()
  176. end
  177.  
  178. canAttack = true
  179.  
  180. char.Humanoid.Died:connect(function()
  181. local sound = Instance.new("Sound",char)
  182. sound.SoundId = "rbxassetid://182003383"
  183. sound.Pitch = 1
  184. sound:Play()
  185. end)
  186.  
  187. mouse.Button1Down:connect(function()
  188. if canAttack == true then
  189. canAttack = false
  190. for i = 1,10 do
  191. Weld2.C0 = Weld2.C0 * CFrame.Angles(0,0,-0.1)
  192. wait()
  193. end
  194. for i = 1,5 do
  195. Weld1.C0 = Weld1.C0 * CFrame.Angles(0,0,0.1)
  196. wait()
  197. end
  198. local drink = Instance.new("Sound", char)
  199. drink.SoundId = "rbxassetid://10722059"
  200. drink.Volume = 5
  201. drink:Play()
  202. wait(3)
  203. char:FindFirstChild("Humanoid").Health = char:FindFirstChild("Humanoid").Health + 20
  204. char:FindFirstChild("Humanoid").WalkSpeed = char:FindFirstChild("Humanoid").WalkSpeed + 0.1
  205. for i = 1,5 do
  206. Weld1.C0 = Weld1.C0 * CFrame.Angles(0,0,-0.1)
  207. wait()
  208. end
  209. for i = 1,10 do
  210. Weld2.C0 = Weld2.C0 * CFrame.Angles(0,0,0.1)
  211. wait()
  212. end
  213. canAttack = true
  214. end
  215. end)
  216.  
  217. mouse.KeyDown:connect(function(key)
  218. if key:lower() == "q" and canAttack == true then
  219. canAttack = false
  220. for i = 1,10 do
  221. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  222. wait()
  223. end
  224. damage = true
  225. for i = 1,19 do
  226. Weld2.C0 = Weld2.C0 * CFrame.Angles(-0.1,0,0)
  227. wait()
  228. end
  229. for i = 1,9 do
  230. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  231. wait()
  232. end
  233. damage = false
  234. canAttack = true
  235. elseif key:lower() == "e" and canAttack == true then
  236. canAttack = false
  237. Weld3.Part1 = char["Left Arm"]
  238. char.Torso["Left Shoulder"].Part1 = nil
  239. for i = 1,15 do
  240. Weld3.C0 = Weld3.C0 * CFrame.Angles(0.1,0,0)
  241. wait()
  242. end
  243. for i = 1,15 do
  244. Weld2.C0 = Weld2.C0 * CFrame.Angles(0,0,0.1)
  245. Weld3.C0 = Weld3.C0 * CFrame.Angles(0,0,-0.1)
  246. wait()
  247. end
  248. damage = true
  249. for i = 1,400 do
  250. char.HumanoidRootPart.RootJoint.C0 = char.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,0.1)
  251. wait()
  252. end
  253. char.HumanoidRootPart.RootJoint.C0 = rootJointC0
  254. damage = false
  255. for i = 1,15 do
  256. Weld2.C0 = Weld2.C0 * CFrame.Angles(0,0,-0.1)
  257. wait()
  258. end
  259. Weld3.C0 = CFrame.new(-1.5,0.5,0)
  260. char.Torso["Left Shoulder"].Part1 = char["Left Arm"]
  261. Weld3.Part1 = nil
  262. canAttack = true
  263. elseif key:lower() == "r" and canAttack == true then
  264. canAttack = false
  265. for i = 1,13 do
  266. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  267. wait()
  268. end
  269. wait(5)
  270. Part0.Transparency = 1
  271. local fake = Part0:Clone()
  272. fake.Parent = char
  273. fake.CanCollide = false
  274. fake.Position = Part0.Position
  275. fake.Transparency = 0
  276. local bodyVelocity = Instance.new("BodyVelocity")
  277. bodyVelocity.Parent = fake
  278. bodyVelocity.Velocity = char.Torso.CFrame.lookVector * 90
  279. fake.Touched:connect(function(hit)
  280. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= char then
  281. hit.Parent:FindFirstChild("Humanoid").Health = hit.Parent:FindFirstChild("Humanoid").Health - 10
  282. hit.Parent:FindFirstChild("Humanoid").Sit = true
  283. fake:Remove()
  284. end
  285. end)
  286. for i = 1,13 do
  287. Weld2.C0 = Weld2.C0 * CFrame.Angles(-0.1,0,0)
  288. wait()
  289. end
  290. for i = 1,100 do
  291. Part0.Transparency = Part0.Transparency - 0.01
  292. wait()
  293. end
  294. Part0.Transparency = 0
  295. canAttack = true
  296. elseif key:lower() == "t" and canAttack == true and mouse.Target ~= nil then
  297. canAttack = false
  298. local victim = mouse.Target.Parent
  299. local humanoid = victim:FindFirstChild("Humanoid")
  300. if humanoid == nil then
  301. canAttack = true
  302. return
  303. end
  304. humanoid.WalkSpeed = 0
  305. char.Humanoid.WalkSpeed = 0
  306. Part0.Transparency = 1
  307. Weld2.C0 = CFrame.new(1.5,0.5,0)
  308. local fake = Part0:Clone()
  309. fake.Parent = char
  310. fake.Transparency = 0
  311. local fakeWeld = Instance.new("Weld")
  312. fakeWeld.C0 = fakeWeld.C0 * CFrame.new(0,-1,-0.5) * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
  313. fakeWeld.Part0 = victim["Right Arm"]
  314. fakeWeld.Part1 = fake
  315. fakeWeld.Parent = victim["Right Arm"]
  316. local armWeld = Instance.new("Weld")
  317. armWeld.C0 = CFrame.new(1.5,0.5,0)
  318. armWeld.C1 = CFrame.new(0,0.5,0)
  319. armWeld.Parent = victim.Torso
  320. armWeld.Part0 = victim.Torso
  321. armWeld.Part1 = victim["Right Arm"]
  322. for i = 1,15 do
  323. armWeld.C0 = armWeld.C0 * CFrame.Angles(0.1,0,0)
  324. wait()
  325. end
  326. for i = 1,10 do
  327. armWeld.C0 = armWeld.C0 * CFrame.Angles(0,0,-0.1)
  328. wait()
  329. end
  330. for i = 1,5 do
  331. fakeWeld.C0 = fakeWeld.C0 * CFrame.Angles(0,0,0.1)
  332. wait()
  333. end
  334. local drink = Instance.new("Sound", victim)
  335. drink.SoundId = "rbxassetid://10722059"
  336. drink.Volume = 5
  337. drink:Play()
  338. wait(3)
  339. fakeWeld:Remove()
  340. victim.Head.BrickColor = BrickColor.new("Medium green")
  341. if victim.Head:FindFirstChild("face") then
  342. victim.Head.face.Texture = "http://www.roblox.com/asset/?id=137852314"
  343. end
  344. humanoid.PlatformStand = true
  345. for i = 1,humanoid.MaxHealth do
  346. humanoid.Health = humanoid.Health - 1
  347. wait()
  348. end
  349. char.Humanoid.WalkSpeed = 16
  350. for i = 1,100 do
  351. Part0.Transparency = Part0.Transparency - 0.01
  352. wait()
  353. end
  354. Part0.Transparency = 0
  355. for i = 1,15 do
  356. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  357. wait()
  358. end
  359. canAttack = true
  360. elseif key:lower() == "y" and canAttack == true and mouse.Target ~= nil then
  361. canAttack = false
  362. local victim = mouse.Target.Parent
  363. local humanoid = victim:FindFirstChild("Humanoid")
  364. if humanoid == nil then
  365. canAttack = true
  366. return
  367. end
  368. humanoid.WalkSpeed = 0
  369. char.Humanoid.WalkSpeed = 0
  370. Part0.Transparency = 1
  371. Weld2.C0 = CFrame.new(1.5,0.5,0)
  372. local fake = Part0:Clone()
  373. fake.Parent = char
  374. fake.Transparency = 0
  375. local fakeWeld = Instance.new("Weld")
  376. fakeWeld.C0 = fakeWeld.C0 * CFrame.new(0,-1,-0.5) * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
  377. fakeWeld.Part0 = victim["Right Arm"]
  378. fakeWeld.Part1 = fake
  379. fakeWeld.Parent = victim["Right Arm"]
  380. local armWeld = Instance.new("Weld")
  381. armWeld.C0 = CFrame.new(1.5,0.5,0)
  382. armWeld.C1 = CFrame.new(0,0.5,0)
  383. armWeld.Parent = victim.Torso
  384. armWeld.Part0 = victim.Torso
  385. armWeld.Part1 = victim["Right Arm"]
  386. for i = 1,15 do
  387. armWeld.C0 = armWeld.C0 * CFrame.Angles(0.1,0,0)
  388. wait()
  389. end
  390. for i = 1,10 do
  391. armWeld.C0 = armWeld.C0 * CFrame.Angles(0,0,-0.1)
  392. wait()
  393. end
  394. for i = 1,5 do
  395. fakeWeld.C0 = fakeWeld.C0 * CFrame.Angles(0,0,0.1)
  396. wait()
  397. end
  398. local drink = Instance.new("Sound", victim)
  399. drink.SoundId = "rbxassetid://10722059"
  400. drink.Volume = 5
  401. drink:Play()
  402. wait(3)
  403. fake:Remove()
  404. humanoid.Health = humanoid.Health + 20
  405. char.Humanoid.WalkSpeed = 16
  406. for i = 1,10 do
  407. armWeld.C0 = armWeld.C0 * CFrame.Angles(0,0,0.1)
  408. wait()
  409. end
  410. for i = 1,15 do
  411. armWeld.C0 = armWeld.C0 * CFrame.Angles(-0.1,0,0)
  412. wait()
  413. end
  414. for i = 1,100 do
  415. Part0.Transparency = Part0.Transparency - 0.01
  416. wait()
  417. end
  418. Part0.Transparency = 0
  419. for i = 1,15 do
  420. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  421. wait()
  422. end
  423. canAttack = true
  424. elseif key:lower() == "u" and canAttack == true and mouse.Target ~= nil then
  425. canAttack = false
  426. local victim = mouse.Target.Parent
  427. local humanoid = victim:FindFirstChild("Humanoid")
  428. if humanoid == nil then
  429. canAttack = true
  430. return
  431. end
  432. humanoid.WalkSpeed = 0
  433. char.Humanoid.WalkSpeed = 0
  434. Part0.Transparency = 1
  435. Weld2.C0 = CFrame.new(1.5,0.5,0)
  436. local fake = Part0:Clone()
  437. fake.Parent = char
  438. fake.Transparency = 0
  439. local fakeWeld = Instance.new("Weld")
  440. fakeWeld.C0 = fakeWeld.C0 * CFrame.new(0,-1,-0.5) * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
  441. fakeWeld.Part0 = victim["Right Arm"]
  442. fakeWeld.Part1 = fake
  443. fakeWeld.Parent = victim["Right Arm"]
  444. local armWeld = Instance.new("Weld")
  445. armWeld.C0 = CFrame.new(1.5,0.5,0)
  446. armWeld.C1 = CFrame.new(0,0.5,0)
  447. armWeld.Parent = victim.Torso
  448. armWeld.Part0 = victim.Torso
  449. armWeld.Part1 = victim["Right Arm"]
  450. for i = 1,15 do
  451. armWeld.C0 = armWeld.C0 * CFrame.Angles(0.1,0,0)
  452. wait()
  453. end
  454. for i = 1,10 do
  455. armWeld.C0 = armWeld.C0 * CFrame.Angles(0,0,-0.1)
  456. wait()
  457. end
  458. for i = 1,5 do
  459. fakeWeld.C0 = fakeWeld.C0 * CFrame.Angles(0,0,0.1)
  460. wait()
  461. end
  462. local drink = Instance.new("Sound", victim)
  463. drink.SoundId = "rbxassetid://10722059"
  464. drink.Volume = 5
  465. drink:Play()
  466. wait(3)
  467. local freezing = Instance.new("Sound", victim)
  468. freezing.SoundId = "rbxassetid://268249319"
  469. freezing.Volume = 5
  470. freezing:Play()
  471. local value = Instance.new("BoolValue",victim)
  472. value.Name = "Frozen"
  473. value.Value = true
  474. for i,v in pairs(victim:GetChildren()) do
  475. if v.ClassName == "Part" then
  476. v.BrickColor = BrickColor.new("Bright blue")
  477. v.Anchored = true
  478. end
  479. end
  480. char.Humanoid.WalkSpeed = 16
  481. for i = 1,100 do
  482. Part0.Transparency = Part0.Transparency - 0.01
  483. wait()
  484. end
  485. Part0.Transparency = 0
  486. for i = 1,15 do
  487. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  488. wait()
  489. end
  490. canAttack = true
  491. end
  492. end)
  493.  
  494. Part0.Touched:connect(function(hit)
  495. if damage == true then
  496. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= char then
  497. hit.Parent:FindFirstChild("Humanoid").Health = hit.Parent:FindFirstChild("Humanoid").Health - 10
  498. hit.Parent:FindFirstChild("Humanoid").Sit = true
  499. local hit0 = Instance.new("Sound", hit)
  500. hit0.SoundId = "rbxassetid://260430060"
  501. hit0.Volume = 3
  502. local hit1 = Instance.new("Sound", hit)
  503. hit1.SoundId = "rbxassetid://138087186"
  504. hit1.Volume = 3
  505. local hit2 = Instance.new("Sound", hit)
  506. hit2.SoundId = "rbxassetid://131237241"
  507. hit2.Volume = 3
  508. local hit3 = Instance.new("Sound", hit)
  509. hit3.SoundId = "rbxassetid://278062209"
  510. hit3.Volume = 3
  511. hit3.TimePosition = 0.33
  512. local math1 = math.random(1,4)
  513. if math1 == 1 then
  514. hit0:Play()
  515. end
  516. if math1 == 2 then
  517. hit1:Play()
  518. end
  519. if math1 == 3 then
  520. hit2:Play()
  521. end
  522. if math1 == 4 then
  523. hit3:Play()
  524. end
  525. if hit.Parent:FindFirstChild("Frozen") then
  526. local hit0 = Instance.new("Sound", hit)
  527. hit0.SoundId = "rbxassetid://516789356"
  528. hit0.Volume = 5
  529. hit0:Play()
  530. hit.Parent.Frozen:Remove()
  531. for i,v in pairs(hit.Parent:GetChildren()) do
  532. if v.ClassName == "Part" then
  533. v.Anchored = false
  534. end
  535. end
  536. end
  537. end
  538. end
  539. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement