Patriotic Module notes (test available)

---- development started 1/8/2020

1 Like

1/9/2020 12:06 PM GST : status
lines - 656
physicalproperties - 40%
instances - 75%
functions - 80%
raycasting - 100%
camera - 35%
events - 15%
inputs - 50%
sound - 90%
advertisement - 45%

code
local Patriotic = require(game.ReplicatedStorage.Patriotic)
local AD = Patriotic.NewAD(game.Players.LocalPlayer.PlayerGui,{AssetID = 7791477;Player = game.Players.LocalPlayer;Heading = 'New AD';Picture = 4335957255;})
local Speed = 2
local Height = 16
local Zoomed = false
local RayDetails = {['Width'] = .4, ['Height'] = .4}
local IceRayDetails = {['Width'] = 3, ['Height'] = 3}
local A = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(255, 0, 0), Size = Vector3.new(1,1,1), Position = Vector3.new(25,10,25), Anchored = true})
local B = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(0, 255, 0), Size = Vector3.new(1,1,1), Position = Vector3.new(-25,10,-25), Anchored = true})
local C = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(0, 0, 255), Size = Vector3.new(1,1,1), Position = Vector3.new(0,10,0), Anchored = true})
local D = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(0, 255, 255), Size = Vector3.new(1,1,1), Position = Vector3.new(0,10,0), Anchored = true, Orientation = Vector3.new(-90, 0, 0)})
local DOT = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(255, 255, 0), Size = Vector3.new(.5,.5,.5), Position = Vector3.new(0,10,0), Anchored = true, CanCollide = false, Material = Enum.Material.Neon})
local ICE = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(128, 187, 219), Size = Vector3.new(7,7,7), Position = Vector3.new(0,45,0), Anchored = false, CanCollide = true, Material = Enum.Material.Ice, CustomPhysicalProperties = Patriotic.PhysicalPresets.Ice})
local BIG_ICE = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(128, 187, 219), Size = Vector3.new(15,15,15), Position = Vector3.new(0,200,0), Anchored = false, CanCollide = true, Material = Enum.Material.Ice, CustomPhysicalProperties = Patriotic.PhysicalPresets.Ice})
local E = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(0, 0, 255), Size = Vector3.new(1,1,1), Position = Vector3.new(0,10,0), Anchored = true, CanCollide = false, Transparency = 0.6, Material = Enum.Material.Neon,})
local MarketplaceService = Patriotic:GetService('MarketplaceService')

Patriotic:GetMagnitudeBetweenParts(A,B,C,RayDetails)
Patriotic:CastRayAsDot(D,DOT,CFrame.new(0, 0, 0),{game.Players.LocalPlayer.Character,workspace.Terrain,D,DOT})
Patriotic:GetMagnitudeBetweenParts(BIG_ICE,ICE,E,IceRayDetails)

Patriotic.GetInputBegan(Enum.KeyCode.E):Connect(function()
	if Zoomed == false then
		Zoomed = true
		Patriotic:ZoomCamera(20,.5)
	end
end)
	
Patriotic.GetInputEnded(Enum.KeyCode.E):Connect(function()
	if Zoomed == true then
	    Zoomed = false
	    Patriotic:ZoomCamera(70,.5)	
	end
end)

Patriotic.GetInputBegan(Enum.KeyCode.Q):Connect(function()
	AD:Show()
end)

Patriotic:CreateLifeLink(workspace.Link1.HumanoidRootPart,workspace.Link2.HumanoidRootPart,workspace.Link1.Humanoid,workspace.Link2.Humanoid)
Patriotic.RenderLoop(function()
	local t = tick()
	local tt = tick()
	
	A.CFrame = A.CFrame * CFrame.new(0,-(math.sin(t * Speed) / Height),0)
	B.CFrame = B.CFrame * CFrame.new(0,(math.sin(t * Speed) / Height),0)
			
	Patriotic:GetMagnitudeBetweenParts(A,B,C,RayDetails)
	Patriotic:GetMagnitudeBetweenParts(BIG_ICE,ICE,E,IceRayDetails)
	Patriotic:CastRayAsDot(D,DOT,CFrame.new(0, 0, 0),{game.Players.LocalPlayer.Character,workspace.Terrain,D,DOT})
end)

AD:PurchaseClicked(function()
	MarketplaceService:PromptPurchase(game.Players.LocalPlayer,7791477)
	AD:Hide()
end)
1 Like

1/9/2020 11:02 PM GST : status
lines - 718
physicalproperties - 60%
instances - 90%
functions - 80%
raycasting - 100%
camera - 35%
events - 80%
inputs - 80%
sound - 90%
advertisement - 45%

code
local Patriotic = require(game.ReplicatedStorage.Patriotic)
local AD = Patriotic.NewAD(game.Players.LocalPlayer.PlayerGui,{AssetID = 7791477;Player = game.Players.LocalPlayer;Heading = 'New AD';Picture = 4335957255;})
local Speed = 2
local Height = 16
local Zoomed = false
local RayDetails = {['Width'] = .4, ['Height'] = .4}
local IceRayDetails = {['Width'] = 3, ['Height'] = 3}
local A = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(255, 0, 0), Size = Vector3.new(1,1,1), Position = Vector3.new(25,10,25), Anchored = true})
local B = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(0, 255, 0), Size = Vector3.new(1,1,1), Position = Vector3.new(-25,10,-25), Anchored = true})
local C = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(0, 0, 255), Size = Vector3.new(1,1,1), Position = Vector3.new(0,10,0), Anchored = true})
local D = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(0, 255, 255), Size = Vector3.new(1,1,1), Position = Vector3.new(0,10,0), Anchored = true, Orientation = Vector3.new(-90, 0, 0)})
local DOT = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(255, 255, 0), Size = Vector3.new(.5,.5,.5), Position = Vector3.new(0,10,0), Anchored = true, CanCollide = false, Material = Enum.Material.Neon})
local ICE = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(128, 187, 219), Size = Vector3.new(7,7,7), Position = Vector3.new(0,45,0), Anchored = false, CanCollide = true, Material = Enum.Material.Ice, CustomPhysicalProperties = Patriotic.PhysicalPresets.Ice})
local BIG_ICE = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(128, 187, 219), Size = Vector3.new(15,15,15), Position = Vector3.new(0,200,0), Anchored = false, CanCollide = true, Material = Enum.Material.Ice, CustomPhysicalProperties = Patriotic.PhysicalPresets.Ice})
local E = Patriotic:Create('Part', {Parent = workspace, Color = Color3.fromRGB(0, 0, 255), Size = Vector3.new(1,1,1), Position = Vector3.new(0,10,0), Anchored = true, CanCollide = false, Transparency = 0.6, Material = Enum.Material.Neon,})
local MarketplaceService = Patriotic:GetService('MarketplaceService')
local Controls = Patriotic.CreateControls()
local PlayerActions = Controls.GetPlayerActions()
local e1 = Patriotic.CreateEvent("Iran")
local e2 = Patriotic.CreateEvent("American")
local interactionguitoggled = false
local e11 = e1.Event():Connect(function(a,b,c)
	print(a + b + c)
end)
local e22 = e2.Event():Connect(function(a,b,c)
	print(a - b - c)
end)

Patriotic:GetMagnitudeBetweenParts(A,B,C,RayDetails)
Patriotic:CastRayAsDot(D,DOT,CFrame.new(0, 0, 0),{game.Players.LocalPlayer.Character,workspace.Terrain,D,DOT})
Patriotic:GetMagnitudeBetweenParts(BIG_ICE,ICE,E,IceRayDetails)

Patriotic.GetInputBegan(Enum.KeyCode.F):Connect(function()
	if Zoomed == false then
		Zoomed = true
		Patriotic:ZoomCamera(20,.5)
	end
end)
	
Patriotic.GetInputEnded(Enum.KeyCode.F):Connect(function()
	if Zoomed == true then
	    Zoomed = false
	    Patriotic:ZoomCamera(70,.5)	
	end
end)

Patriotic.GetInputBegan(Enum.KeyCode.V):Connect(function()
	PlayerActions:Disable()
end)

Patriotic.GetInputEnded(Enum.KeyCode.V):Connect(function()
	PlayerActions:Enable()
end)

Patriotic.GetInputBegan(Enum.KeyCode.R):Connect(function()
	local Materials = {"Plastic","SmoothPlastic","Neon","Wood","WoodPlanks","Marble","Slate","Concrete","Granite","Brick","Pebble","Cobblestone","CorrodedMetal","DiamondPlate","Foil","Metal","Grass","Sand","Fabric","Ice"}
	Patriotic:Create('Part', {Parent = workspace, Size = Vector3.new(math.random(100,400)*0.01, math.random(100,400)*0.01, math.random(100,400)*0.01), CustomPhysicalProperties = Patriotic.PhysicalPresets.Bounce, CFrame = game.Players.LocalPlayer.Character.Head.CFrame * CFrame.new(0,0,-10), Color = Color3.new(math.random(),math.random(),math.random()), Material = Materials[math.random(#Materials)],})
end)

Patriotic.GetInputBegan(Enum.KeyCode.Q):Connect(function()
	AD:Show()
end)

Patriotic:CreateLifeLink(workspace.Link1.HumanoidRootPart,workspace.Link2.HumanoidRootPart,workspace.Link1.Humanoid,workspace.Link2.Humanoid)
Patriotic.RenderLoop(function()
	local t = tick()
	local tt = tick()
	
	A.CFrame = A.CFrame * CFrame.new(0,-(math.sin(t * Speed) / Height),0)
	B.CFrame = B.CFrame * CFrame.new(0,(math.sin(t * Speed) / Height),0)
			
	Patriotic:GetMagnitudeBetweenParts(A,B,C,RayDetails)
	Patriotic:GetMagnitudeBetweenParts(BIG_ICE,ICE,E,IceRayDetails)
	Patriotic:CastRayAsDot(D,DOT,CFrame.new(0, 0, 0),{game.Players.LocalPlayer.Character,workspace.Terrain,D,DOT})
end)
AD:PurchaseClicked(function()
	MarketplaceService:PromptPurchase(game.Players.LocalPlayer,7791477)
	AD:Hide()
end)

Patriotic.RenderLoop(function()
	if not game.Players.LocalPlayer.Character then return end
	if Patriotic:IsBelowMagnitude(game.Players.LocalPlayer.Character:WaitForChild('HumanoidRootPart'),workspace.Interact,4) and interactionguitoggled == false then
		interactionguitoggled = true
		local Interaction = script.InteractGui:Clone()
		Interaction.Parent = workspace.Interact
		Interaction.Enabled = true
		game:GetService("TweenService"):Create(Interaction,TweenInfo.new(.2,Enum.EasingStyle.Sine),{Size = UDim2.new(1,0,1,0)}):Play()
	elseif
		not Patriotic:IsBelowMagnitude(game.Players.LocalPlayer.Character:WaitForChild('HumanoidRootPart'),workspace.Interact,4) and interactionguitoggled == true and workspace.Interact:FindFirstChild('InteractGui') then
		interactionguitoggled = false
		game:GetService("TweenService"):Create(workspace.Interact.InteractGui,TweenInfo.new(.2,Enum.EasingStyle.Sine),{Size = UDim2.new(.1,0,.1,0)}):Play()
		Patriotic.Spawn(function()
			wait(.2)
			workspace.Interact.InteractGui:Destroy()
		end)
	end
end)

1/10/2020 11:37 AM GST : status
lines - 738
physicalproperties - 40%
instances - 85%
functions - 80%
raycasting - 100%
camera - 35%
events - 75%
inputs - 70%
sound - 80%
advertisement - 65%

code
local Patriotic = require(game.ReplicatedStorage.Patriotic)

--[[-----------------------------------------------------------------------------------------------------------------]]
--[[
	Booleans
--]]
--[[-----------------------------------------------------------------------------------------------------------------]]

local interactionguitoggled = false

--[[-----------------------------------------------------------------------------------------------------------------]]
--[[
	Sounds
--]]
--[[-----------------------------------------------------------------------------------------------------------------]]

local InteractEnabled = Patriotic:CreateAudio({Name = 'InteractEnabled', SoundId = 'rbxassetid://1289263994', PlaybackSpeed = 1, Parent = game.SoundService, Volume = 0.5})
local InteractDisabled = Patriotic:CreateAudio({Name = 'InteractDisabled', SoundId = 'rbxassetid://1289263994', PlaybackSpeed = 0.8, Parent = game.SoundService, Volume = 0.5})
local InteractUsed = Patriotic:CreateAudio({Name = 'InteractUsed', SoundId = 'rbxassetid://1289263994', PlaybackSpeed = 1.4, Parent = game.SoundService, Volume = 0.5})

--[[-----------------------------------------------------------------------------------------------------------------]]
--[[
	Controls
--]]
--[[-----------------------------------------------------------------------------------------------------------------]]

local Controls = Patriotic.CreateControls()
local PlayerActions = Controls.GetPlayerActions()

--[[-----------------------------------------------------------------------------------------------------------------]]
--[[
	Events
--]]
--[[-----------------------------------------------------------------------------------------------------------------]]

local e1 = Patriotic.CreateEvent("Iran")
local e2 = Patriotic.CreateEvent("American")
local e11 = e1.Event:Connect(function(a,b,c) 
	print(a + b + c) 
end)
local e22 = e2.Event:Connect(function(a,b,c) 
	print(a - b - c) 
end)

--[[-----------------------------------------------------------------------------------------------------------------]]
--[[
	Functions
--]]
--[[-----------------------------------------------------------------------------------------------------------------]]

do -- interaction
local function OnInteract()
	if not interactionguitoggled then return end
	local size = Vector3.new(math.random(100,400)*0.01, math.random(100,400)*0.01, math.random(100,400)*0.01)
	local position = game.Players.LocalPlayer:GetMouse().Hit.p
	local Materials = {"Plastic","SmoothPlastic","Neon","Wood","WoodPlanks","Marble","Slate","Concrete","Granite","Brick","Pebble","Cobblestone","CorrodedMetal","DiamondPlate","Foil","Metal","Grass","Sand","Fabric","Ice"}
	local Part = Patriotic:Create('Part', {Parent = workspace, Size = size, CustomPhysicalProperties = Patriotic.PhysicalPresets.Weightless, Position = position - Vector3.new(0,size.Y,0), Color = Color3.new(math.random(),math.random(),math.random()), Material = Materials[math.random(#Materials)], Anchored = true,})
	game:GetService("TweenService"):Create(Part,TweenInfo.new(1),{Position = Part.Position + Vector3.new(0,size.Y*2,0)}):Play()
	InteractUsed.play()
	Patriotic.Delay(1,function()
		Part.Anchored = false	
	end)
	Patriotic.Delay(5,function()
		game:GetService("TweenService"):Create(Part,TweenInfo.new(1),{Transparency = 1}):Play()
		wait(.5)
		Part.CanCollide = false
	end)
	game.Debris:AddItem(Part,6)
end
Patriotic.RenderLoop(function()
	if not game.Players.LocalPlayer.Character then return end
	local _, withinScreenBounds = workspace.CurrentCamera:WorldToScreenPoint(workspace.Interact.Position)
		
	if withinScreenBounds and Patriotic:IsBelowMagnitude(game.Players.LocalPlayer.Character:WaitForChild('HumanoidRootPart').CFrame,workspace.Interact,6) and interactionguitoggled == false then
		do
		interactionguitoggled = true
		local Interaction = script.InteractGui:Clone()
		Interaction.Parent = workspace.Interact
		Interaction.Enabled = true
		InteractEnabled.play()
		game:GetService("TweenService"):Create(Interaction,TweenInfo.new(1,Enum.EasingStyle.Bounce),{Size = UDim2.new(4,0,4,0)}):Play()
	end
	elseif
		not Patriotic:IsBelowMagnitude(game.Players.LocalPlayer.Character:WaitForChild('HumanoidRootPart').CFrame,workspace.Interact,6) and interactionguitoggled == true and workspace.Interact:FindFirstChild('InteractGui') then
		do
		interactionguitoggled = false
		game:GetService("TweenService"):Create(workspace.Interact.InteractGui,TweenInfo.new(1,Enum.EasingStyle.Bounce),{Size = UDim2.new(0,0,0,0)}):Play()
		InteractDisabled.play()
		Patriotic.Spawn(function()
			wait(1)
			workspace.Interact.InteractGui:Destroy()
		end)
	end
	end
end)
Patriotic.GetInputBegan(Enum.KeyCode.E):Connect(OnInteract)
end

Taking a long break. 2-5 weeks.

Patriotic V1 is out! Simplifies lua basically

https://www.roblox.com/library/4617989370/Patriotic-V1

1 Like

1/21/2020 7:52 PM GST : status
lines - 789
physicalproperties - 65%
instances - 95%
functions - 90%
raycasting - 100%
camera - 55%
events - 85%
inputs - 90%
sound - 85%
advertisement - 65%

code
local Patriotic = require(game.ReplicatedStorage.Patriotic)

local RL = Patriotic.RenderLoop(function()
	print('Lol')
end)

Patriotic:CreateLifeLink(workspace.Dummy1.HumanoidRootPart, workspace.Dummy2.HumanoidRootPart, workspace.Dummy1.Humanoid, workspace.Dummy2.Humanoid)


Patriotic:pairs(Enum.KeyCode:GetEnumItems(),function(i,v)
	local x = Patriotic:GetInput(v)
	x.Began:Connect(function()
		print(v,'began.')
	end)
	x.Ended:Connect(function()
		print(v,'ended.')
	end)
end)

RL:Run()

wait(5)

RL:Pause()