DylanD2003

Untitled

Sep 24th, 2017
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.98 KB | None | 0 0
  1. ------------------
  2. --FIJJET SPINNUH--
  3. ------------------
  4. --By --
  5. --CKbackup-
  6. -----------
  7.  
  8. player = game.Players.LocalPlayer
  9. chara = player.Character
  10. debby = game.Debris
  11. Mouse = player:GetMouse()
  12. rs = game:GetService("RunService").RenderStepped
  13. speedo = 20
  14. mode = "Drop"
  15.  
  16. sound = Instance.new("Sound", Character)
  17. sound.SoundId = "rbxassetid://164854108"
  18. sound.Volume = 100000000
  19. sound.EmitterSize = 25
  20. sound:Play()
  21. sound.Looped = true
  22. Face = Head.face
  23. Neck = Torso.Neck
  24. it = Instance.new
  25. vt = Vector3.new
  26. cf = CFrame.new
  27. rad = math.rad
  28. euler = CFrame.fromEulerAnglesXYZ
  29. angles = CFrame.Angles
  30. Mouse = Player:GetMouse()
  31. coroutine.resume(coroutine.create(function()
  32. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  33. Text = "Dance time. :3";
  34. Color = Color3.new(0, 1, 1);
  35. Font = Enum.Font.Code;
  36. FontSize = Enum.FontSize.Size24
  37.  
  38. --Outfit--
  39. New = function(Object, Parent, Name, Data)
  40. local Object = Instance.new(Object)
  41. for Index, Value in pairs(Data or {}) do
  42. Object[Index] = Value
  43. end
  44. Object.Parent = Parent
  45. Object.Name = Name
  46. return Object
  47. end
  48.  
  49.  
  50. SpinnerWeldBlock = New("Part",chara,"SpinnerWeldBlock",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.600000024, 0.200000003, 0.599999964),CFrame = CFrame.new(-27.7000008, 2.10000014, 9.10000038, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  51. Weld = New("ManualWeld",SpinnerWeldBlock,"Weld",{Part0 = SpinnerWeldBlock,Part1 = chara["Right Arm"],C1 = CFrame.new(-0.200000763, -0.899999619, -0.600000143, 1, 0, 0, 0, 0, 1, -0, -1, -0),})
  52. FIJJETSPINNUH = New("Part",chara,"FIJJETSPINNUH",{BrickColor = BrickColor.new("Bright red"),Size = Vector3.new(1.4000001, 0.200000003, 1.39999998),CFrame = CFrame.new(-27.7000008, 2.10000014, 9.10000038, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.768628, 0.156863, 0.109804),})
  53. FidgetSpinnerMesh = New("SpecialMesh",FIJJETSPINNUH,"FidgetSpinnerMesh",{Offset = Vector3.new(0, 0, -0.135000005),Scale = Vector3.new(3.5, 6, 3.5),MeshId = "rbxassetid://785024366",MeshType = Enum.MeshType.FileMesh,})
  54. SpinnerWeightOverlay = New("Decal",FIJJETSPINNUH,"SpinnerWeightOverlay",{Face = Enum.NormalId.Top,Texture = "rbxassetid://785492382",})
  55. FIJJETSPINNUHWELD = New("ManualWeld",FIJJETSPINNUH,"FIJJETSPINNUHWELD",{Part0 = FIJJETSPINNUH,Part1 = SpinnerWeldBlock,})
  56.  
  57. ScreenGui = New("ScreenGui",player.PlayerGui,"ScreenGui",{})
  58. Frame = New("Frame",ScreenGui,"Frame",{Size = UDim2.new(0, 150, 0, 200),Position = UDim2.new(1,0,.5,0),AnchorPoint = Vector2.new(1,0)})
  59. ColourLabel = New("TextLabel",Frame,"ColourLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Text = "Spinner BrickColor"})
  60. BrickColorBox = New("TextBox",Frame,"BrickColorBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.1,0),Text = "(BrickColor here)"})
  61. TextureBox = New("TextBox",Frame,"TextureBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.3,0),Text = "(Decal ID here)"})
  62. TextureLabel = New("TextLabel",Frame,"TextureLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.2,0),Text = "Spinner Texture"})
  63. RefTraLabel = New("TextLabel",Frame,"RefTraLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.4,0),Text = "Reflect/Transparent"})
  64. ReflectBox = New("TextBox",Frame,"ReflectBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.1,0,.5,0),Text = "0"})
  65. TransBox = New("TextBox",Frame,"TransBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.5,0,.5,0),Text = "0"})
  66. SpeedLabel = New("TextLabel",Frame,"SpeedLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.6,0),Text = "Spin Speed"})
  67. SpeedBox = New("TextBox",Frame,"SpeedBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.7,0),Text = "20"})
  68. ModeLabel = New("TextLabel",Frame,"ModeLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.8,0),Text = "Mode (Switch with Q or E)"})
  69. CurrentModeLabel = New("TextLabel",Frame,"CurrentModeLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.9,0),Text = "Drop"})
  70. CloseButton = New("TextButton",ScreenGui,"CloseButton",{Size = UDim2.new(0, 50, 0, 25),Position = UDim2.new(),AnchorPoint = Vector2.new(1,1),Position = UDim2.new(1,0,.5,0),Text = "Close"})
  71.  
  72. CloseButton.MouseButton1Click:connect(function()
  73. if Frame.Visible == true then
  74. Frame.Visible = false
  75. CloseButton.Text = "Open"
  76. elseif Frame.Visible == false then
  77. Frame.Visible = true
  78. CloseButton.Text = "Close"
  79. end
  80. end)
  81.  
  82. TextureBox.Changed:connect(function()
  83. FidgetSpinnerMesh.TextureId = TextureBox.Text
  84. end)
  85.  
  86. BrickColorBox.Changed:connect(function()
  87. FIJJETSPINNUH.BrickColor = BrickColor.new(BrickColorBox.Text)
  88. FidgetSpinnerMesh.TextureId = ""
  89. end)
  90.  
  91. ReflectBox.Changed:connect(function()
  92. FIJJETSPINNUH.Reflectance = ReflectBox.Text
  93. end)
  94.  
  95. TransBox.Changed:connect(function()
  96. FIJJETSPINNUH.Transparency = TransBox.Text
  97. end)
  98.  
  99. SpeedBox.Changed:connect(function()
  100. if SpeedBox.Text ~= "" then
  101. speedo = SpeedBox.Text
  102. end
  103. end)
  104.  
  105. function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
  106. local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
  107. local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
  108. local TEff = New("Trail",parent,"TrailEff",{Color = ColorSequence.new({ColorSequenceKeypoint.new(0,BrickColor.new(color1).Color),ColorSequenceKeypoint.new(1,BrickColor.new(color2).Color)}),Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.5),NumberSequenceKeypoint.new(1,1)}),Attachment0 = Att1,Attachment1 = Att2,Enabled = false,Lifetime = .5,MinLength = .001})
  109. return TEff
  110. end
  111.  
  112. --Clerp Animations--
  113. TC = chara.HumanoidRootPart.RootJoint
  114. HC = chara.Torso.Neck
  115. RAC = chara.Torso["Right Shoulder"]
  116. LAC = chara.Torso["Left Shoulder"]
  117. RLC = chara.Torso["Right Hip"]
  118. LLC = chara.Torso["Left Hip"]
  119. TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  120. HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  121. RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  122. LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  123. RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  124. LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  125. RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  126. LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  127. RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  128. LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  129. RW = Instance.new("Weld",HC.Parent)
  130. RW.Part1 = HC.Parent
  131. RW.Part0 = chara["Right Arm"]
  132. RW.C0 = RWF
  133.  
  134. function clerp(a,b,c)
  135. return a:lerp(b,c)
  136. end
  137.  
  138. --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  139. --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
  140. --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  141. --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
  142.  
  143. RW.C0 = RWF
  144.  
  145. --Idle Clerp--
  146. IRWF = (RWF - Vector3.new(-.2,-.8,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-10),0)
  147.  
  148. function res()
  149. RW.C0 = IRWF
  150. end
  151. res()
  152.  
  153. --Mouse Functions--
  154. function onKeyDown(key)
  155. if key == "q" then
  156. mode = "Drop"
  157. CurrentModeLabel.Text = mode
  158. elseif key == "e" then
  159. mode = "Throw"
  160. CurrentModeLabel.Text = mode
  161. end
  162. end
  163. function onButton1Down()
  164. if mode == "Drop" then
  165. local spinnah = FIJJETSPINNUH:Clone()
  166. spinnah.Parent = workspace
  167. spinnah.Position = FIJJETSPINNUH.Position
  168. spinnah:BreakJoints()
  169. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  170. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  171. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  172. debby:AddItem(spinnah,60)
  173. elseif mode == "Throw" then
  174. local spinnah = FIJJETSPINNUH:Clone()
  175. spinnah.Parent = workspace
  176. spinnah.Position = FIJJETSPINNUH.Position + chara.HumanoidRootPart.CFrame.lookVector*5
  177. spinnah:BreakJoints()
  178. debby:AddItem(spinnah,60)
  179. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  180. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  181. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  182. local faws = Instance.new("BodyForce",spinnah)
  183. faws.Force = Vector3.new(0,spinnah:GetMass()*workspace.Gravity,0)
  184. spinnah.Velocity = chara.HumanoidRootPart.CFrame.lookVector*speedo
  185. spinnah.Touched:connect(function(hit)
  186. if hit.Parent ~= chara and hit.Parent:FindFirstChild("Humanoid") and faws ~= nil then
  187. faws:Destroy()
  188. faws = nil
  189. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(10,20))
  190. spinf:Destroy()
  191. wait(5)
  192. for i = 0, 1, .1 do
  193. wait(.01)
  194. spinnah.Transparency = i
  195. end
  196. spinnah:Destroy()
  197. end
  198. end)
  199. end
  200. end
  201.  
  202. --Mouse Activation--
  203. if Mouse then
  204. Mouse.KeyDown:connect(onKeyDown)
  205. Mouse.Button1Down:connect(onButton1Down)
  206. end
  207.  
  208. --Loop--
  209. while true do
  210. rs:wait()
  211. FIJJETSPINNUHWELD.C0 = FIJJETSPINNUHWELD.C0 * CFrame.fromEulerAnglesXYZ(0,math.rad(speedo),0)
  212. end
Advertisement
Add Comment
Please, Sign In to add comment